Secrets — inventory, storage in a secret manager or KMS, injection at runtime, rotation and short-lived credentials, OIDC federation instead of static keys, secret scanning (pre-commit, CI, history), leak response, never passing secrets as arguments or logging them. Use whenever secrets are created, used, scanned or leaked (secrets, API keys, rotation, vault, secret scanning, leaked credentials).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Secrets Management?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-secrets-management)
---
name: secrets-management
description: Secrets — inventory, storage in a secret manager or KMS, injection at runtime, rotation and short-lived credentials, OIDC federation instead of static keys, secret scanning (pre-commit, CI, history), leak response, never passing secrets as arguments or logging them. Use whenever secrets are created, used, scanned or leaked (secrets, API keys, rotation, vault, secret scanning, leaked credentials).
metadata:
category: security
---
# Secrets management
## Purpose
Keep secrets out of code, logs and humans' hands, and rotate them routinely.
**Use when:** introducing, using, scanning or rotating secrets.
**Not for:** general encryption design.
## Inputs
- Secret inventory, systems using them.
## Outputs
- Storage and rotation design, scan setup, redacted findings.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "secrets management"` for prior decisions, patterns and anti-patterns.
- [Security standard](../../../standards/security.md)
- [Leaked secrets playbook](../../../playbooks/leaked-secrets.md)
## Steps
1. **Inventory.** List secrets, owners, scope, rotation period.
Done when every secret has an owner.
2. **Store.** Secret manager; inject at runtime; least scope.
Done when no secret in repo or image.
3. **Rotate.** Automate rotation; prefer federation and short-lived tokens.
Done when rotation tested.
4. **Detect.** Pre-commit and CI scanning; leak playbook.
Done when scanning is a gate.
## Best practices
- Report fingerprints, never values.
- Separate secrets per environment.
## Common mistakes
- `.env` files committed.
- Secrets in CI logs via `set -x`.
## Example
CI moved from static cloud keys to OIDC; DB passwords rotated monthly by the secret manager; gitleaks in pre-commit and CI.
## Reusable prompt
```text
Apply the Secrets management skill (.agents/skills/secrets-management/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Inventory the secrets, design storage, injection and rotation, and set up detection — never print values.
Return: Storage and rotation design, scan setup, redacted findings..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```