agentleFS
K95M65K95M65/AI_ONBOARD/skills/secret-management/SKILL.md

secret-management

Skill0 starsChanged 5 months agoMITView on GitHub

Store, inject, scope, and rotate secrets safely — API keys, tokens, DB credentials, signing keys. Use when adding a secret to a project, wiring secrets into an app or CI, or setting up rotation. Complements secret-scan (which detects leaked secrets).

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Never in source or logs: Not in code, config committed to git, error messages, or telemetry.

    line 17
  2. Distinctive:

    Prefer Secrets Store for shared/rotatable secrets across Workers.

    line 30
  3. Very specific:

    Never put secrets in vars (those are plaintext config), only in secrets.

    line 31
  4. Very specific:

    Run secret-scan on the repo and history.

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Secret management

The lifecycle side of secrets: secret-scan finds leaked ones; this is how to handle them so they don't leak in the first place.

When to use

Adding or wiring a secret (env, app, CI/CD), choosing where secrets live, or setting up rotation.

Rules

  1. Never in source or logs. Not in code, config committed to git, error messages, or telemetry. If it's ever been committed, treat it as compromised — rotate.
  2. Store in a secret manager, inject at runtime. Local dev: .env (gitignored). Prod: a real store (cloud KMS/Secrets Manager, Vault, GitHub Actions secrets, Cloudflare wrangler secret put / Secrets Store). App reads from the environment/binding, never from a file in the repo.
  3. Least privilege + short lifetime. Scope each secret to exactly what needs it; prefer short-lived, auto-rotated credentials (OIDC federation, workload identity) over long-lived static keys.
  4. One secret, one purpose, one consumer where practical — so rotation and revocation are surgical.
  5. Rotate on a schedule and on exposure. Have a rotation runbook before you need it; test it.

On Cloudflare

  • Workers secrets: wrangler secret put <NAME> (encrypted, not in wrangler.toml); read via the env binding.
  • Prefer Secrets Store for shared/rotatable secrets across Workers.
  • Never put secrets in vars (those are plaintext config), only in secrets.

Verify

Run secret-scan on the repo and history; confirm no secret is committed and each has a rotation owner.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.