/skills-developer:secrets-managementfrom Developer Skills
Handle keys properly: vaults, rotation, `.env` hygiene, pre-commit scanning, and purging a key already in git history. Use when managing environment secrets, Vault, KMS, or key rotation.
Ships in Developer Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Hardcoding API keys, database passwords, or private encryption keys into source code or unencrypted configuration files is an existential security threat. Secrets must never be stored in plaintext, never committed to version control, and never shared over insecure channels. Modern secrets management requires centralized key vaults (HashiCorp Vault, AWS Secrets Manager), automated rotation, strict local .env hygiene, pre-commit entropy scanning, and rapid eradication procedures when a secret is accidentally exposed.
.env Standards.env Protocol:
.env.example: Committed to Git. Contains all required variable keys with empty or fake mock values (documentation for developers)..env.local: Ignored by Git. Contains developer's personal local credentials..gitignore: Must explicitly include:
.env
.env.*
!.env.example
*.pem
*.key
id_rsa
gitleaks or trufflehog in local git hooks:
gitleaks protect --verbose --staged
sk-proj-..., ghp_..., AKIA...) is detected, fail the build immediately and block merging.git-filter-repo (never basic git commit amending) to rewrite repository history:git filter-repo --invert-paths --path-match .env
SECRETS-SPEC.md)# Secrets Management Architecture: [System / Application]
## 1. Centralized Vault & Key Topology
- **Vault Provider**: AWS Secrets Manager / HashiCorp Vault
- **Authentication**: IAM Role-based Workload Identity (Zero static root keys)
- **Rotation Cadence**: Automated 30-day rotation for database passwords
## 2. Secrets Registry & Environment Mapping
| Secret Key Name | Storage Vault Path | Scope | Rotation Method |
|---|---|---|---|
| `DATABASE_URL` | `prod/api/db_conn` | Backend Service | Automated RDS Master Rotation |
| `STRIPE_SECRET_KEY` | `prod/api/stripe` | Billing Worker | Manual Bi-annual Rotation |
| `JWT_PRIVATE_KEY` | `prod/auth/jwt_rsa` | Auth Service | KMS Asymmetric Key Pair |
## 3. Pre-Commit Secret Scanner Configuration (`.gitleaks.toml`)
```toml
[allowlist]
description = "Allowed mock keys in test suites"
paths = [
'''tests/fixtures/.*'''
]
---
## Worked Example: Automated Git Secret Eradication
- **Incident**: A junior developer committed an AWS IAM Access Key to a feature branch.
- **Response**:
1. Revoked key in AWS IAM within 4 minutes.
2. Executed `git-filter-repo` to permanently erase the commit from all branches and tags.
3. Force-pushed updated reflog to remote; notified all developers to prune local clones.
4. Installed `gitleaks` pre-commit hook across all team repositories.
- **Outcome**: Zero unauthorized AWS access detected in CloudTrail; recurrence eliminated.
---
## Verification Checklist
- [ ] `.gitignore` explicitly blocks `.env`, `.env.*`, and private key files.
- [ ] `.env.example` provides an up-to-date manifest of all required keys with dummy values.
- [ ] Pre-commit hook runs `gitleaks` or `trufflehog` on staged changes.
- [ ] Production secrets are fetched at runtime via IAM-authenticated vaults.
- [ ] Documented rotation runbook exists for all third-party API credentials.
---
## Anti-Patterns
- **The "Private Repo" Fallacy**: Assuming hardcoded keys are safe because the GitHub repository is currently private.
- **Committing and Amending**: Making a new commit that deletes the secret without purging the commit history where the key remains readable.
- **Slack/Email Secret Sharing**: Pasting production passwords into Slack DMs or email threads.
What SKILL.md sets; muted values are Claude Code's defaults
skills-developer@skillary is listed by poorvith-mp/skillary — review the source before installing
npx claudepluginhub poorvith-mp/skillary --plugin skills-developer135 skills in this plugin
/accessibility-engineerMoved to accessibility-fix in skills-developer. Removed in v4.1./accessibility-fixAudit and refactor code for WCAG 2.1/2.2 AA and AAA: ARIA, keyboard operability, screen readers. Use when auditing or remediating WCAG 2.1/2.2 AA/AAA accessibility issues./ai-data-remediation-engineerMoved to data-pipelines in skills-developer. Removed in v4.1./ai-engineerMoved to ml-deployment in skills-developer. Removed in v4.1.