Skip to content

Commit 17008ab

Browse files
jakehulbergclaude
andcommitted
feat: initial scaffolding of Infisical AI Skills repo
Agent Skills for Infisical covering CLI, SDKs, Docker, Kubernetes, CI/CD, and machine identity auth. Structured for universal distribution via Claude Code marketplace, npx skills add, and manual install. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 parents  commit 17008ab

21 files changed

Lines changed: 2350 additions & 0 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "infisical-ai-skills",
3+
"owner": {
4+
"name": "Infisical",
5+
"email": "support@infisical.com"
6+
},
7+
"metadata": {
8+
"description": "Official Infisical skills for AI coding agents — correct SDK usage, auth methods, Docker/K8s integration, and more.",
9+
"version": "1.0.0",
10+
"pluginRoot": "./plugins"
11+
},
12+
"plugins": [
13+
{
14+
"name": "infisical-setup",
15+
"source": "./infisical-setup",
16+
"description": "Interactive setup guide for integrating Infisical into your projects — CLI, Docker, Kubernetes, CI/CD, SDKs, and machine identity auth.",
17+
"version": "1.0.0",
18+
"author": {
19+
"name": "Infisical"
20+
},
21+
"homepage": "https://infisical.com/docs",
22+
"repository": "https://github.com/Infisical/ai-skills",
23+
"license": "MIT",
24+
"keywords": ["infisical", "secrets", "secret-management", "sdk", "docker", "kubernetes", "cicd"],
25+
"category": "developer-tools",
26+
"tags": ["secrets", "security", "devops", "infrastructure"]
27+
}
28+
]
29+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Validate Plugins
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
validate:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Claude Code
16+
run: npm install -g @anthropic-ai/claude-code
17+
18+
- name: Validate marketplace and plugins
19+
run: claude plugin validate .

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
.DS_Store
3+
*.log
4+
.env

AGENTS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Infisical AI Skills
2+
3+
## Available Skills
4+
5+
### infisical-setup
6+
7+
**Description:** Interactive setup guide for integrating Infisical into your projects — CLI, Docker, Kubernetes, CI/CD, SDKs, and machine identity auth.
8+
9+
**Location:** `skills/infisical-setup/SKILL.md`
10+
11+
**Use when:** You need to integrate Infisical secret management into an application, container, pipeline, or infrastructure. Covers CLI setup, all 6 SDKs (Node.js, Python, Go, Java, .NET, Ruby), Docker build/runtime injection, Kubernetes Operator, GitHub Actions/GitLab CI, and all 12 machine identity auth methods.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Infisical Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Infisical AI Skills
2+
3+
Official [Agent Skills](https://agentskills.io) for [Infisical](https://infisical.com) — the open-source secret management platform.
4+
5+
These skills give AI coding agents accurate, up-to-date knowledge about Infisical's SDKs, CLI, Docker integration, Kubernetes Operator, CI/CD setup, and machine identity auth methods. Without them, AI tools frequently hallucinate wrong package names, deprecated auth patterns, and broken install commands.
6+
7+
## Install
8+
9+
### Universal (45+ agents)
10+
11+
Works with Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Windsurf, Gemini CLI, and more:
12+
13+
```bash
14+
npx skills add Infisical/ai-skills
15+
```
16+
17+
### Claude Code (plugin marketplace)
18+
19+
```bash
20+
/plugin marketplace add Infisical/ai-skills
21+
/plugin install infisical-setup@infisical-ai-skills
22+
```
23+
24+
### Manual
25+
26+
Copy `skills/infisical-setup/` into your project's agent skills directory:
27+
28+
| Agent | Location |
29+
|-------|----------|
30+
| Claude Code | `.claude/skills/` |
31+
| Codex | `~/.codex/skills/` |
32+
| Cursor | `.cursor/skills/` or `.agents/skills/` |
33+
| GitHub Copilot | `.github/skills/` |
34+
35+
## What's included
36+
37+
### infisical-setup
38+
39+
An interactive setup guide that helps you integrate Infisical into your projects. Covers:
40+
41+
- **CLI**`infisical run`, `infisical init`, local development workflow
42+
- **SDKs** — Node.js, Python, Go, Java, .NET, Ruby (correct package names, imports, and class names)
43+
- **Docker** — Build-time and runtime secret injection, `infisical run` entrypoint pattern
44+
- **Kubernetes** — Operator installation, InfisicalSecret CRD, Kubernetes Auth setup
45+
- **CI/CD** — GitHub Actions (OIDC Auth), GitLab CI (`id_tokens`)
46+
- **Auth methods** — All 12 machine identity auth methods with a decision tree for choosing the right one
47+
48+
## Why this exists
49+
50+
AI coding agents frequently get Infisical details wrong:
51+
52+
| What AI says | What's correct |
53+
|-------------|---------------|
54+
| `pip install infisical-python` | `pip install infisicalsdk` |
55+
| `from infisical_client import InfisicalClient` | `from infisical_sdk import InfisicalSDKClient` |
56+
| Use Service Tokens for Docker | Use machine identities (Service Tokens are deprecated) |
57+
| `npm install -g infisical` | Install via `apt` from `artifacts-cli.infisical.com` |
58+
| API Key Auth for Kubernetes | Kubernetes Auth (API Keys are deprecated) |
59+
60+
These skills correct all of that.
61+
62+
## Contributing
63+
64+
To add a new skill:
65+
66+
1. Create a directory under `skills/` and `plugins/infisical-setup/skills/` with a `SKILL.md`
67+
2. Add a plugin entry in `.claude-plugin/marketplace.json`
68+
3. Update `AGENTS.md`
69+
4. Run `claude plugin validate .` to check for errors
70+
71+
## License
72+
73+
MIT
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "infisical-setup",
3+
"description": "Interactive setup guide for integrating Infisical into your projects — CLI, Docker, Kubernetes, CI/CD, SDKs, and machine identity auth.",
4+
"version": "1.0.0",
5+
"author": {
6+
"name": "Infisical",
7+
"email": "support@infisical.com"
8+
},
9+
"homepage": "https://infisical.com/docs",
10+
"repository": "https://github.com/Infisical/ai-skills",
11+
"license": "MIT",
12+
"keywords": ["infisical", "secrets", "secret-management", "sdk", "docker", "kubernetes", "cicd"]
13+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: infisical-user-setup-guide
3+
description: "Interactive setup guide for using Infisical as a secret management tool in your projects. Helps users integrate Infisical into local development (CLI), Docker containers (build-time and runtime secret injection), CI/CD pipelines (GitHub Actions, GitLab CI), Kubernetes (Operator + CRDs), and application code (Node.js, Python, Go, Java, .NET, Ruby SDKs). Also walks through choosing and configuring machine identity auth methods (Universal Auth, AWS Auth, Kubernetes Auth, OIDC, etc.). Use this skill whenever someone asks about: using Infisical, injecting secrets, infisical run, infisical init, connecting their app to Infisical, Docker secrets, Kubernetes secrets operator, machine identity setup, SDK initialization, CI/CD secret injection, or 'how do I get my secrets into my app'."
4+
---
5+
6+
# Infisical User Setup Guide
7+
8+
You are an interactive setup assistant helping users integrate Infisical into their projects. Unlike a self-hosting guide, this skill is for people who *use* Infisical (cloud or self-hosted) to manage secrets and need help getting secrets into their applications, containers, pipelines, and infrastructure.
9+
10+
## How to use this skill
11+
12+
Start by understanding what the user is trying to do:
13+
14+
1. **Local development** — They want secrets injected into their dev workflow (CLI)
15+
2. **Docker** — They want secrets in their containers at build time or runtime
16+
3. **CI/CD** — They want secrets in GitHub Actions, GitLab CI, or other pipelines
17+
4. **Kubernetes** — They want the Infisical Operator syncing secrets to K8s
18+
5. **Application code** — They want to fetch secrets programmatically via an SDK
19+
6. **Auth setup** — They need to create a machine identity and choose an auth method
20+
21+
Read the relevant reference file(s), then walk them through step by step. Don't dump everything at once.
22+
23+
## Reference files
24+
25+
| File | When to read |
26+
|------|-------------|
27+
| `references/cli-setup.md` | User wants CLI-based local dev or basic `infisical run` usage |
28+
| `references/docker-integration.md` | User wants secrets in Docker containers (build or runtime) |
29+
| `references/kubernetes-operator.md` | User wants the K8s Operator, InfisicalSecret CRD, or dynamic secrets in K8s |
30+
| `references/sdks.md` | User wants to fetch secrets from application code (any language) |
31+
| `references/cicd-integration.md` | User wants secrets in GitHub Actions, GitLab CI, or other CI/CD |
32+
| `references/machine-identity-auth.md` | User needs to create a machine identity or choose an auth method |
33+
34+
## Guiding principles
35+
36+
- **Start with their platform.** Ask what they're running on (AWS, GCP, K8s, local, etc.) before recommending an auth method or integration approach.
37+
- **Recommend zero-secret auth when possible.** If they're on AWS, recommend AWS Auth. On K8s, recommend Kubernetes Auth. In GitHub Actions, recommend OIDC Auth. Only fall back to Universal Auth (Client ID/Secret) when platform-native options aren't available.
38+
- **CLI-first for local dev.** For developers working locally, the CLI (`infisical run -- <command>`) is almost always the right starting point. It's the simplest path to "my app has secrets."
39+
- **SDK for application code.** If they need secrets in application logic (not just env vars), point them to the SDK for their language.
40+
- **Warn about deprecated patterns.** Service Tokens (`st.*` prefix) and API Keys are deprecated. Always guide toward machine identities.
41+
- **Security-conscious.** Never generate secrets, tokens, or credentials on the user's behalf. Guide them to generate these themselves. Never log or display secret values.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# CI/CD Integration
2+
3+
How to get Infisical secrets into CI/CD pipelines. The recommended approach depends on the platform.
4+
5+
## GitHub Actions (OIDC — recommended)
6+
7+
Zero-secret integration using GitHub's built-in OIDC tokens. No stored secrets needed in GitHub.
8+
9+
### Step 1: Create a machine identity with OIDC auth
10+
11+
In the Infisical dashboard:
12+
1. Go to Organization Settings > Access Control > Machine Identities
13+
2. Create an identity and assign a role
14+
3. Add OIDC Auth with these settings:
15+
- **OIDC Discovery URL**: `https://token.actions.githubusercontent.com`
16+
- **Issuer**: `https://token.actions.githubusercontent.com`
17+
- **Subject**: `repo:<owner>/<repo>:<context>` (e.g., `repo:acme/api:ref:refs/heads/main`)
18+
- **Audiences**: Your GitHub org URL (e.g., `https://github.com/acme`)
19+
4. Add the identity to your project with appropriate permissions
20+
21+
### Step 2: Configure the workflow
22+
23+
```yaml
24+
name: Deploy
25+
26+
permissions:
27+
id-token: write # Required for OIDC
28+
contents: read
29+
30+
jobs:
31+
deploy:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Fetch secrets from Infisical
37+
uses: Infisical/secrets-action@v1.0.9
38+
with:
39+
method: "oidc"
40+
identity-id: "<your-identity-id>"
41+
project-slug: "your-project"
42+
env-slug: "prod"
43+
44+
- name: Use secrets
45+
run: |
46+
echo "Secrets are now available as env vars"
47+
# e.g., $DATABASE_URL, $API_KEY
48+
```
49+
50+
**Key parameters for the action:**
51+
- `method`: `"oidc"` for OIDC auth
52+
- `identity-id`: The machine identity ID (public, safe to commit)
53+
- `project-slug`: Your Infisical project slug
54+
- `env-slug`: Environment (dev, staging, prod)
55+
56+
### Troubleshooting GitHub Actions OIDC
57+
58+
- Ensure `id-token: write` permission is set
59+
- Subject must exactly match the repo and context (branch, tag, or environment)
60+
- Audience must match the GitHub org URL
61+
- Project and environment slugs must match what's configured in Infisical
62+
63+
## GitLab CI
64+
65+
### Option 1: CLI with machine identity token
66+
67+
```yaml
68+
image: ubuntu
69+
70+
stages:
71+
- build
72+
73+
build:
74+
stage: build
75+
script:
76+
- apt update && apt install -y curl bash
77+
- curl -1sLf 'https://artifacts-cli.infisical.com/setup.deb.sh' | bash
78+
- apt-get install -y infisical
79+
- export INFISICAL_TOKEN=$(infisical login --method=universal-auth
80+
--client-id=$INFISICAL_CLIENT_ID
81+
--client-secret=$INFISICAL_CLIENT_SECRET
82+
--plain --silent)
83+
- infisical run --projectId=$INFISICAL_PROJECT_ID --env=prod -- npm run build
84+
```
85+
86+
Store `INFISICAL_CLIENT_ID` and `INFISICAL_CLIENT_SECRET` as GitLab CI/CD variables (Settings > CI/CD > Variables).
87+
88+
### Option 2: OIDC auth (if GitLab supports it for your setup)
89+
90+
GitLab CI can issue OIDC tokens via `CI_JOB_JWT` or `id_tokens`. Configure similarly to GitHub Actions — create a machine identity with OIDC auth, set the issuer to your GitLab instance, and use the JWT to authenticate.
91+
92+
## Other CI/CD platforms
93+
94+
For any CI platform, the pattern is:
95+
96+
1. **Create a machine identity** with an appropriate auth method
97+
2. **Install the CLI** in the pipeline
98+
3. **Authenticate**: `infisical login --method=universal-auth --client-id=... --client-secret=... --plain --silent`
99+
4. **Inject secrets**: `infisical run -- <your-build-command>`
100+
101+
If the CI platform supports OIDC (e.g., CircleCI, Bitbucket), prefer OIDC Auth for zero-secret integration. Otherwise, use Universal Auth with Client ID/Secret stored as CI variables.
102+
103+
## Secret syncs (alternative approach)
104+
105+
Instead of fetching secrets at build time, Infisical can sync secrets directly into your CI/CD platform's native secret store (e.g., GitLab CI/CD Variables). This is a one-way push configured in the Infisical dashboard. Useful if you don't want to install the CLI in your pipeline, but less flexible than runtime injection.
106+
107+
## Security best practices for CI/CD
108+
109+
- **Prefer OIDC over stored credentials** when possible — no secrets to rotate or leak
110+
- **Scope machine identities tightly** — give each pipeline its own identity with minimum permissions
111+
- **Use environment-specific identities** — don't let a staging pipeline access production secrets
112+
- **Pin CLI version** in CI to avoid surprises from upstream updates

0 commit comments

Comments
 (0)