agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when handling credentials, API keys, and certificates. Covers secret storage, rotation, injection into applications, detection of leaked secrets, and what to do when one is exposed. Trigger on "i committed an api key", "where should we store secrets", "rotate the database
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill secrets-management --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill secrets-management -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill secrets-management -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill secrets-management -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill secrets-management -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill secrets-management -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill secrets-management -a windsurf -y
name: secrets-management description: Use when handling credentials, API keys, and certificates. Covers secret storage, rotation, injection into applications, detection of leaked secrets, and what to do when one is exposed. Trigger on "i committed an api key", "where should we store secrets", "rotate the database password", "scan the repo for leaked keys". Do not use for vulnerabilities in code logic — see the security-review skill. metadata: category: security version: 1.0.0 tags: [secrets, credentials, rotation, vault, leak]
Keep credentials out of code, out of logs, and out of git history — and be able to rotate them quickly when, inevitably, one leaks.
1. **Eliminate static credentials first** — Prefer workload identity: IAM roles, OIDC federation, managed identities. A secret that does not exist cannot leak. This is the single most effective change available. 2. **Store what remains in a secret manager** — Never in code, never in a config file in the repository, never in a container image layer. 3. **Inject at runtime** — Mounted file or environment variable, fetched from the manager at start. The application never contains the value. 4. **Redact in logs** — Structured logging with a redaction filter on known secret field names, and never logging the full request body of an auth endpoint. 5. **Scan continuously** — A pre-commit hook and a CI scan on the full history. Detection after the fact is far better than not detecting it. 6. **Rotate on a schedule and on exposure** — And test the rotation before you need it in an emergency.
**Workload identity: the secret that does not exist:**
# Instead of an AWS access key in a Kubernetes Secret, the pod assumes a role.
# There is no long-lived credential anywhere to leak.
apiVersion: v1
kind: ServiceAccount
metadata:
name: orders-api
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/orders-api
---
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
serviceAccountName: orders-api # the SDK now obtains temporary credentials
containers:
- name: api
env:
- name: DATABASE_URL # what genuinely must be a secret is
valueFrom: # mounted from a manager, not baked in
secretKeyRef: { name: orders-db, key: url }**Responding to an exposed secret — in the right order:**
1. ROTATE. Immediately, before anything else. The old credential is dead. Do not investigate first; the investigation can happen while the new credential is deploying. 2. REVOKE the old credential at the provider. Rotation without revocation means the leaked value still works. 3. AUDIT the access logs for use of the old credential between the leak and the revocation. Assume it was used until you have evidence otherwise. 4. REMOVE it from the code and the history if practical (git-filter-repo, or ask the host to purge). This is cleanup, not remediation. 5. PREVENT the recurrence: add the pattern to the pre-commit scanner, and ask why a human had access to a raw credential at all.
**Scanning the history, not just the tree:**
gitleaks detect --source . --log-opts="--all" # every commit on every branch trufflehog git file://. --only-verified # verifies the key is live
A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.