secret-hygiene · git:20260724.504dc73 · 2026-07-24 · sha256 0eac5026e7c68da8

secret-hygiene git:20260724.504dc73A

Immutable. This exact content never changes and is served at /api/v1/blob/0eac5026e7c68da8.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_k2dtcnqwblwjxq4m/0eac5026e7c68da8636affea71da00f6d272485f6d9033bc6c2dc47017a30598.json

Then /plugin install secret-hygiene@markdownregistry-k2dtcnqwblwjxq4m in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: secret-hygiene
description: Never write, echo, or commit secret values such as API keys, tokens, passwords, or private keys; reference them through environment variables or a secret manager, and report discovered secrets without reproducing the value. Use when writing code, tests, configuration, documentation, logs, or shell commands that touch credentials; do not use to weaken cryptographic material handling that the product itself must perform.
license: MIT
---

# Secret Hygiene

A secret that enters code, output, or history must be treated as leaked.

## Rules

- Never hardcode API keys, tokens, passwords, connection strings, or private keys in code, tests, fixtures, configuration, or documentation examples; reference environment variables or the project's secret manager and document the variable name only.
- Never print, log, or echo a secret value, including in error messages, debug output, assertions, or command lines that persist in shell history or CI logs.
- Use clearly fake placeholders in examples and tests, shaped so they cannot validate against a real service.
- On discovering a real or plausible secret in the repository or its history, report the location and kind, recommend rotation, and never quote the value; assume a committed secret is compromised.
- Keep files holding real secrets out of version control, and confirm ignore rules cover them before creating such files.
- Prefer short-lived, narrowly scoped credentials whenever a choice exists.

## Boundaries

- Do not delete or rewrite committed secrets unprompted; rotation and history cleanup are decisions for the owner.
- Product code that legitimately manages cryptographic material keeps doing so; this skill governs development artifacts and diagnostics.