agentleFS
eugnmueller-87eugnmueller-87/claude-blueprint/.claude/skills/secrets-check/SKILL.md

secrets-check

Skill1 starsChanged 5 months agoMITView on GitHub

On-demand full-repo secret sweep — scan the working tree, staged changes, and git history for leaked keys, tokens, and credentials. The manual complement to the automatic scan-secrets PreToolUse hook, for auditing a repo before making it public or after a scare. Trigger phrases "check for secrets", "am I leaking anything", "scan the repo for secrets".

  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Confirm ignore hygiene first: Check .gitignore covers .env, .env.*, *.pem, *.key, secrets/, *.pfx, credential files.

    line 18
  2. Distinctive:

    Scan tracked files (working tree): Search for high-signal patterns — do NOT print matched values in full, mask the middle:

    line 22
  3. Distinctive:

    NOT print matched values in full, mask the middle:

    line 23

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

secrets-check

Trigger: "check for secrets" / "am I leaking anything" / "scan the repo for secrets"

Standing rules: ../_conventions.md.

The scan-secrets hook guards new writes; this is the whole-repo audit. Report every hit honestly — a false negative here can leak a key. Never print a real secret value in full; mask it.

Steps

  1. Confirm ignore hygiene first. Check .gitignore covers .env, .env.*, *.pem, *.key, secrets/, *.pfx, credential files. If .env is NOT ignored, that's finding #1 — flag it loud.
  2. Scan tracked files (working tree). Search for high-signal patterns — do NOT print matched values in full, mask the middle:
    • Anthropic: sk-ant- keys.
    • OpenAI: sk- / sk-proj- keys.
    • AWS: AKIA[0-9A-Z]{16} access key ids.
    • GitHub: ghp_ / gho_ / ghs_ tokens.
    • Slack: xoxb- / xoxp- tokens.
    • Google: AIza[0-9A-Za-z_\-]{35}.
    • Private keys: -----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----.
    • Generic: password/secret/token/api_key assigned a quoted literal (not a os.environ[...] / os.getenv(...) reference).
    • Connection strings with inline credentials (://user:pass@host).
  3. Scan staged changes. git diff --cached for anything about to be committed.
  4. Scan history (the dangerous one). git log -p grep for the same patterns, or run a dedicated tool if available (gitleaks detect, trufflehog). A key removed from HEAD but still in history is still leaked. If found, say plainly: the key must be rotated AND history rewritten — removal from HEAD is not enough.
  5. Report (terse): findings by severity — location: <pattern> (masked) — history hits first. For each: the required action (rotate the key + where to move it to an env var). If clean, say the repo is clean across tree, staged, and history — and only because you scanned all three.

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.