# Secrets Management

> Use when: handle credentials, keys, and tokens without leaking them into code, logs, or history.

- Skill: `kimtth/secrets-management` (Agent Skill)
- Install (CLI): `npx skillmds@latest add kimtth/secrets-management`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kimtth/secrets-management/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: kimtth (https://skillmd.com/u/kimtth)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kimtth/secrets-management

---


Goal: keep secrets out of source and accessible only to what needs them.

Use for:
- storing API keys, passwords, and certificates
- wiring secrets into apps and CI safely
- responding to a leaked credential

Workflow:
1. Keep secrets out of source control entirely.
2. Load them from environment or a secrets manager at runtime.
3. Scope each secret to least privilege.
4. Rotate secrets regularly and on any suspicion of leak.
5. Keep secrets out of logs, errors, and crash dumps.
6. Scan the repo and history for accidental commits.

Practices:
- a secrets manager or vault over plaintext files
- per-environment secrets, never shared across stages
- short-lived credentials where supported
- pre-commit secret scanning

Rules:
- never commit a secret; if you do, rotate it immediately
- never log or echo secret values
- grant least privilege and rotate on a schedule
- do not pass secrets on the command line where they leak to history

