infisical-agent — Claude Code skill: config and secret templates
Walks you through setting up the Infisical Agent daemon: auth, YAML config, Go templates and rendering secrets to files. Useful when your app reads a config file.
npx skills add Infisical/ai-skills --skill infisical-agent -a claude-codeWhat infisical-agent does
This skill guides you through configuring the Infisical Agent, a client daemon that renews tokens on its own and renders secrets to files with Go templates. Your application code stays untouched: the daemon writes a file next to it and the app reads that.
Three reference files ship with it. references/agent-config.md covers the full YAML format, six auth methods (universal-auth, kubernetes, aws-iam, azure, gcp-id-token, gcp-iam), sinks, polling and caching. references/template-functions.md documents the template functions: listSecrets, listSecretsByProjectSlug, getSecretByName, dynamicSecret. references/deployment-examples.md has configs for Docker Compose, ECS and Kubernetes. The skill favours platform-native auth: aws-iam on AWS, kubernetes in Kubernetes, with universal-auth as the fallback when nothing native fits.
For init containers there is exit-after-auth: true, which renders secrets once and exits. The default polling interval is 5 minutes. This is a skill about files on a host or in a container, so it is the wrong pick for Kubernetes Secrets and ConfigMaps driven by a controller — that is infisical-kubernetes-operator territory. Check permissions on whatever path the secrets land in.
What it helps with
- build an Infisical Agent YAML config from scratch
- pick the right auth method for your platform
- render secrets into a file with a Go template
- issue dynamic database credentials inside a template
- render secrets once and exit in an init container
Example prompts for the agent
- Help me write an Infisical Agent config for Kubernetes using kubernetes auth
- Write a template that renders all environment secrets to .env with listSecrets
- How do I set up dynamicSecret for database credentials in an agent template?
How to install infisical-agent
1Skills CLI (Vercel)
npx skills add Infisical/ai-skills --skill infisical-agent -a claude-code2Manually: put the files in place
~/.claude/skills/infisical-agent/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/infisical-agent/
1Skills CLI (Vercel)
npx skills add Infisical/ai-skills --skill infisical-agent -a codex2Manually: put the files in place
.agents/skills/infisical-agent/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Infisical/ai-skills --skill infisical-agent -a cursor2Manually: put the files in place
.cursor/skills/infisical-agent/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Infisical/ai-skills infisical-agent2Manually: put the files in place
.github/skills/infisical-agent/SKILL.md1Skills CLI (Vercel)
npx skills add Infisical/ai-skills --skill infisical-agent -a gemini-cli2Platform CLI
gemini skills install https://github.com/Infisical/ai-skills --path skills/infisical-agentManually: put the files in place
.devin/skills/infisical-agent/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Infisical/ai-skills --skill infisical-agent -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about infisical-agent
How do I install infisical-agent in Claude?
Run npx skills add Infisical/ai-skills --skill infisical-agent -a claude-code. The skill file lands at ~/.claude/skills/infisical-agent/SKILL.md.
What does infisical-agent do?
It is a reference skill for configuring the Infisical Agent daemon: auth methods, YAML config, Go template functions and deployment examples. The daemon renews tokens and writes secrets to files without touching application code.
How is the agent different from the Infisical operator?
The operator manages Kubernetes API objects cluster-wide; the agent writes files next to your app. If your app reads env vars from a Secret, use the operator. If it reads a config file, use the agent.
Source text
SKILL.md · MIT
--- name: infisical-agent description: "Guide for configuring the Infisical Agent — a client daemon that manages token lifecycle and renders secrets via Go templates without modifying application code. Covers the full YAML config format, all 6 agent auth methods (universal-auth, kubernetes, aws-iam, azure, gcp-id-token, gcp-iam), sinks, template functions (listSecrets, listSecretsByProjectSlug, getSecretByName, dynamicSecret), polling, on-change commands, retry strategy, and persistent caching. Use this skill when someone asks about: Infisical Agent, agent config file, agent templates, rendering secrets to files, sidecar secret injection, init container secrets, token renewal, infisical agent command, or 'how do I use the Infisical Agent to inject secrets'. Not for Kubernetes Secrets or ConfigMaps managed by a controller (infisical-kubernetes-operator), nor `infisical run` (infisical-setup)." --- # Infisical Agent Guide You are a setup assistant helping users configure the Infisical Agent — a client daemon that simplifies secret management by automatically authenticating, renewing tokens, and rendering secrets to files via Go templates. ## Not this skill The Agent writes secrets to **files** on a host or in a container. Route elsewhere for: | If the user wants... | Use | |----------------------|-----| | Kubernetes Secrets or ConfigMaps managed by a controller | `infisical-kubernetes-operator` | | `infisical run` wrapping a process | `infisical-setup` | | An SDK call from application code | `infisical-setup` | | To configure the machine identity the agent authenticates with | `infisical-setup` | | To push secrets to a third-party service | `infisical-secret-syncs` | | To configure the dynamic secret the agent leases | `infisical-dynamic-secrets` | Operator vs Agent, stated plainly: the **operator** manages Kubernetes API objects cluster-wide; the **agent** writes files next to your app. If the app reads env vars from a Secret, use the operator. If it reads a config file, use the agent. ## How to use this skill Start by understanding the user's deployment context, then guide them through: 1. **Auth method** — Which authentication method fits their platform 2. **Config file** — The YAML config structure with auth, sinks, and templates 3. **Templates** — Go template syntax with the correct template functions 4. **Deployment** — Running the agent in their environment (Docker, K8s, ECS, etc.) Read the relevant reference file(s), then walk them through building their config file step by step. ## Reference files | File | When to read | |------|-------------| | `references/agent-config.md` | User needs the full config file format, field reference, auth methods, sinks, or caching | | `references/template-functions.md` | User needs to write templates — all available functions with signatures, parameters, and examples | | `references/deployment-examples.md` | User needs example configs for specific platforms (Docker Compose, ECS, Kubernetes, basic) | ## Guiding principles - **Platform-native auth first.** On AWS, recommend `aws-iam`. On Kubernetes, recommend `kubernetes`. On Azure, recommend `azure`. Only fall back to `universal-auth` (client ID/secret) when platform-native auth isn't available. - **Templates over sinks for secrets.** Sinks deposit access tokens. Templates render actual secrets. Most users want templates, not raw access tokens. - **Use `listSecrets` or `listSecretsByProjectSlug` for .env files.** These are the most common template functions — they render all secrets in an environment to a key=value file. - **Use `dynamicSecret` for database credentials.** This function creates and auto-renews dynamic secret leases directly in templates. - **SSH dynamic secrets need the 6th `principals` argument.** `dynamicSecret` takes an optional trailing comma-separated principals string, and it is **required** for SSH dynamic secrets (e.g. `"root,deploy"`). SSH leases return `PRIVATE_KEY` and `SIGNED_KEY`. - **Polling interval matters.** Default is 5 minutes. For latency-sensitive apps, reduce it. For stable configs, increase it to reduce API calls. - **`exit-after-auth: true` for init containers.** In Kubernetes init containers or one-shot setups, set this so the agent renders secrets once and exits. - **On-change commands for reloads.** Use `execute.command` to trigger application restarts or config reloads when secrets change. - **Never log secret values.** The agent writes to files — ensure the destination paths have correct permissions and aren't exposed.
© Infisical · MIT · Infisical/ai-skills