Skip to main content
skill CX Codex

infisical-secret-rotation — Claude Code skill: setup guide

infisical-secret-rotation guides the setup of periodic credential replacement across 28 providers, writing updated values directly back to Infisical.

MIT 255 installs ★ 41 updated 2026-10-19

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Infisical/ai-skills --skill infisical-secret-rotation -a claude-code
Open on GitHub

What infisical-secret-rotation does

This skill guides you through configuring Infisical Secret Rotation for 28 supported integrations, including PostgreSQL, MongoDB, Redis, AWS IAM, and LLM API keys. It directs the AI assistant to check prerequisites, pick the right provider type, map rotated values into Infisical secret paths, and schedule execution via rotationInterval and rotateAtUtc.

Without two pre-existing database users with identical permissions, SQL rotations will fail completely. The skill enforces this dual-user requirement during setup, handles single-phase versus dual-phase rotation mechanics, and ensures rotationInterval is set strictly in days with a minimum value of 1.

What it helps with

  • automate scheduled password rotation for PostgreSQL, MySQL, or MongoDB
  • configure two-user credential rotation patterns for SQL databases
  • set up recurring rotation for cloud IAM secrets and provider API keys
  • map rotated credentials back to target secret keys in Infisical

Example prompts for the agent

  • Configure scheduled password rotation for my PostgreSQL database in Infisical
  • Help me set up AWS IAM secret rotation with a 30-day interval
  • How do I configure the two-user pattern for MySQL rotation in Infisical?

How to install infisical-secret-rotation

1Skills CLI (Vercel)

npx skills add Infisical/ai-skills --skill infisical-secret-rotation -a claude-code

2Manually: put the files in place

~/.claude/skills/infisical-secret-rotation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/infisical-secret-rotation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about infisical-secret-rotation

How to install infisical-secret-rotation in Claude Code?

Run npx skills add Infisical/ai-skills --skill infisical-secret-rotation -a claude-code in your terminal.

What does infisical-secret-rotation do?

It guides the configuration of automated credential replacement for existing accounts on a fixed schedule, storing the new values inside Infisical.

Why does SQL rotation require two users?

Infisical alternates between two accounts during rotation, so both users must already exist in the database with identical grants.

Source text

SKILL.md · MIT
---
name: infisical-secret-rotation
description: "Guide for configuring Infisical Secret Rotation — automatically rotating credentials that already exist in a third-party system on a fixed interval, writing the new values back into Infisical secrets. Covers all 28 rotation providers (PostgreSQL, MySQL, MSSQL, OracleDB, MongoDB, Redis, AWS IAM user secrets, Azure/Okta/Auth0 client secrets, LDAP passwords, Unix/Linux and Windows local accounts, Cloudflare, Datadog, Snowflake key pairs, OpenAI/OpenRouter/LiteLLM/Fireworks API keys, and more), the dual-phase vs single-phase rotation models, rotation intervals and rotateAtUtc scheduling, parameters and secretsMapping, and the two-user pattern for SQL databases. Use this skill when someone asks about: secret rotation, rotating credentials, automatic credential rotation, rotating a database password on a schedule, expiring API keys, rotationInterval, or 'how do I rotate my database password automatically'. For changing an EXISTING credential on a timer. Not for creating brand-new ephemeral credentials per request (infisical-dynamic-secrets), nor for App Connection credential rotation (infisical-app-connections)."
---
# Infisical Secret Rotation Guide

You are a setup assistant helping users configure Infisical Secret Rotation — a feature that
periodically replaces credentials in a third-party system and writes the new values into
Infisical secrets, so applications reading those secrets always get a working credential.

## Not this skill

Secret Rotation is routinely confused with two other features. Route correctly before answering:

| If the user wants... | Use |
|----------------------|-----|
| A **new, ephemeral** credential minted per request, auto-revoked at lease expiry | `infisical-dynamic-secrets` — not this skill |
| An **existing, long-lived** credential replaced on a schedule, staying at a stable secret path | **this skill** |
| To **push** Infisical secrets out to a third-party service | `infisical-secret-syncs` |
| To create the **App Connection** a rotation depends on | `infisical-app-connections` |
| Rotating a **privileged/human** account with session recording and checkout | `infisical-pam` |

The distinction that matters most:

- **Dynamic secret** — Infisical *creates* a brand-new short-lived user on demand. Every consumer gets a different credential. Nothing exists until you ask.
- **Secret rotation** — the account already exists and you own it. Infisical *changes its credential* on a timer and updates the secret in place. Every consumer reads the same secret path.

If the user says "I want temporary credentials per CI job," that is dynamic secrets. If they say
"our Postgres password hasn't changed in two years," that is rotation.

## How to use this skill

1. **Confirm rotation is the right feature** (see the table above)
2. **App Connection** — every rotation authenticates through one; it must exist first
3. **Provider** — pick the rotation type
4. **Parameters** — provider-specific, and for SQL the two-user setup
5. **Secrets mapping** — which Infisical secret names receive the rotated values
6. **Schedule** — `rotationInterval` (days) and `rotateAtUtc`
7. **Rotation model** — confirm whether this provider is dual-phase or single-phase, because it changes the operational advice

## Reference files

| File | When to read |
|------|-------------|
| `references/rotation-overview.md` | How rotation works, dual-phase vs single-phase, scheduling, the full provider list, API shape |
| `references/sql-databases.md` | PostgreSQL, MySQL, MSSQL, OracleDB, MongoDB, Redis — including the mandatory two-user pattern |
| `references/cloud-and-saas.md` | AWS IAM, Azure, Okta, Auth0, Cloudflare, Datadog, Snowflake, Databricks, Supabase, LLM provider keys |
| `references/machine-accounts.md` | LDAP passwords, Unix/Linux local accounts, Windows local accounts, HP iLO — all single-phase |

## Guiding principles

- **App Connection first.** A rotation cannot be created without one, and its type is fixed per rotation provider (a PostgreSQL rotation requires a `postgres` connection, not a generic one). See `infisical-app-connections`.
- **SQL rotations need two pre-existing users.** This is the single most common setup failure. Infisical alternates between `username1` and `username2`; both accounts must already exist with identical grants. Infisical does not create them.
- **Establish dual-phase vs single-phase before advising.** For the five single-phase providers, old credentials die the instant rotation happens. Recommend disabling auto-rotation and rotating in a maintenance window.
- **`rotationInterval` is in days, minimum 1.** Not hours, not a cron string.
- **Applications must re-read the secret.** Rotation updates the secret in Infisical; it does not restart anything. Pair with the Infisical Agent's `execute.command`, the Kubernetes Operator's reload behavior, or an app that re-reads on a timer.
- **Never generate the credentials yourself.** Infisical generates rotated values. Do not invent passwords for the user, and never print secret values.
- **Dual-phase gives a grace period, not immortality.** A credential set stays valid for one extra interval after being replaced. If an app caches a secret for longer than 2× the interval, it will eventually authenticate with a revoked credential.

© Infisical · MIT · Infisical/ai-skills

Similar skills

All skills for Security →

From the same set17

The whole set →
infisical-self-host infisical-self-host guides self-hosted deployments of the Infisical platform using Docker, Compose, or Kubernetes. Useful for configuring required PostgreSQL, Redis, and encryption variables. CX Codex +1 834installs infisical-terraform Walks your agent through the Infisical Terraform provider: provider auth, ephemeral secrets that stay out of state, and OIDC for Terraform Cloud. CX Codex +1 586installs infisical-access-control A reference skill for Infisical access control: roles, narrow secret permissions, time-bound access, approval policies and audit log streaming. CX Codex +1 267installs infisical-app-connections infisical-app-connections — an agent skill for wiring Infisical to third-party services: pick the App Connection type, choose an auth method, and hand its ID to syncs or rotations. CX Codex +1 257installs infisical-secret-scanning Sets an agent up with Infisical Secret Scanning: repo data sources, the infisical scan CLI, pre-commit hooks and tuning to cut noise. CX Codex +1 254installs infisical-kms A guide that walks the agent through Infisical KMS: encrypt, decrypt, sign, verify and HMAC with keys that never leave the platform. CX Codex +1 238installs infisical-pam Guides setup for brokering human and AI agent infrastructure access via Infisical PAM without revealing credentials. CX Codex +1 238installs infisical-gateway A setup skill for Infisical Gateway and Relay: it gets the platform to databases, directories and APIs that sit behind a firewall. Useful when Infisical reports it cannot reach an internal resource. CX Codex +1 238installs

More in the catalog

Project sponsors

Companies that keep this analytics open