amey-thakur/ai-skills/secrets-management
Claude Code and agent skill by amey-thakur/ai-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Keep credentials out of source by loading them from a controlled store, scanning for leaks, and rotating on a schedule. Use when adding a secret to an app, cleaning one out of a repository, or setting up how a service reads credentials at runtime.
Install
npx vskill@latest install amey-thakur/ai-skills/secrets-managementSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as amey-thakur/ai-skills/secrets-management.
Secrets management
A secret committed to git is compromised the moment it lands, even if you delete it on the next push: the history keeps it and crawlers read history. The job is to keep secrets out of source entirely, load them at runtime from a store you control, and rotate them on a cadence so any leak has a short shelf life.
Method
- Move secrets into a vault, not code. Store credentials in HashiCorp
Vault, AWS Secrets Manager, or GCP Secret Manager, never in source, config files, or Dockerfiles. Reference them by name and fetch at boot or inject them as environment variables through the platform.
- Keep .env files local and git-ignored. Add
.envto.gitignore
before the first commit, check in a .env.example with keys and empty values, and load it with dotenv in development only. A real value must never reach the repository.
- Scan every commit and the whole history. Run gitleaks or trufflehog
in a pre-commit hook and in CI, then scan the full history once with gitleaks detect --source . --log-opts="--all". The hook stops new leaks; the history scan surfaces old ones.
- Rotate on a fixed cadence and after any exposure. Set a 30-to-90-day
interval and automate it where the store supports it, such as Secrets Manager rotation functions. Treat any secret that touched a log, a screenshot, or a public repo as burned and rotate it now.
- Separate secrets per environment. Give staging and production
distinct credentials so a leaked staging key cannot reach production data, and never reuse one API key across services.
- Revoke the old value, do not just add a new one. After rotating,
disable or delete the prior credential at the provider so a copied secret stops working. Rotation without revocation leaves the leak live.
Checks
- Does
gitleaks detectover the full history return zero findings, or a
documented allowlist entry for each?
- Can you name the last rotation date for every production secret?
- Would a leaked staging credential fail when tried against production?
- Is every secret in the repo also in the vault as its source of truth,
rather than the repo being the only copy?
Boundaries
This covers application secrets and their lifecycle, not the access policy on the vault itself (see least-privilege) or how a secret is used in a cryptographic operation (see crypto-usage). Rotation cadence and vault choice follow your platform and compliance requirements; when the two disagree, meet the stricter one.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/security/secrets-management/SKILL.md
Popularity
- 7-day trend score
- 5
Refreshed 18 Oct 2026, a month ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/amey-thakur/ai-skills/secrets-management)