secret-scan

secret-scan is a skill for Claude Code from KhaledSaeed18/dotclaude. It costs 49 tokens per session (517 once invoked), scanned A, original, MIT.

A code and change scan for exposed credentials such as API keys, tokens, passwords, private keys, and connection strings. By default, it checks the staged changes or, if there are none, the working tree.

In plain words
What is it for?
Scanning code, diffs, selected paths, or history for credential patterns, private-key files, secret-containing URLs, risky files such as .env files, and high-entropy strings that may be secrets.
Why use it?
It helps catch secrets before they enter source control or ship to users, while separating likely examples and uncertain matches from confirmed findings.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the security plugin — 3 skills, 1 command, 1 agent shipped together

Good fit Scanning code, diffs, selected paths, or history for credential patterns, private-key files, secret-containing URLs, risky files such as .env files, and high-entropy strings that may be secrets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khaledsaeed18/dotclaude/secret-scan
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add KhaledSaeed18/dotclaude --skill secret-scan
Clone the repo
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaude

Made for: Claude Code.

Or install security, the plugin that ships this one along with the rest of its 3 skills, 1 command, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for secret-scan

README.md
[![agentmods](https://agentmods.dev/badge/skills/khaledsaeed18/dotclaude/secret-scan.svg)](https://agentmods.dev/skills/khaledsaeed18/dotclaude/secret-scan)
Your own site
<a href="https://agentmods.dev/skills/khaledsaeed18/dotclaude/secret-scan"><img src="https://agentmods.dev/badge/skills/khaledsaeed18/dotclaude/secret-scan.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 517 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.00517
Opus 5 $0.00024 $0.00259
Sonnet 5 $0.00010 $0.00103
Haiku 4.5 $0.00005 $0.00052

Measured 7d ago against content hash cabb1e4f7dcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

secret-scan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude-plugin/plugins/security/skills/secret-scan/SKILL.md · 30 lines

What it actually says

Find secrets that should never be in source control, then advise on remediation. Default scope: the staged diff if there is one, otherwise the working tree. Scan history or a specific path only when asked.

What to look for

  • Known credential patterns: cloud keys (AWS AKIA…, GCP, Azure), provider API tokens (Stripe, GitHub ghp_…, Slack, OpenAI, etc.), OAuth client secrets, JWTs.
  • Private keys & certs: -----BEGIN … PRIVATE KEY----- blocks, .pem / .p12 / keystore contents.
  • Credentials in URLs/config: connection strings and URLs with embedded passwords (scheme://user:pass@host), basic-auth headers.
  • Generic secrets: assignments to names like password, secret, token, api_key, access_key, client_secret, plus high-entropy strings that look like keys.
  • Risky files committed by mistake: .env, credential JSON, *.key, and their presence in history.

Reduce false positives

Distinguish real secrets from example/placeholder values (xxxxx, your-key-here, changeme), test fixtures, public keys, and sample docs. When genuinely unsure, label a finding "review" rather than asserting a leak, but err toward reporting over silence.

Report and remediate

For each finding give: the file and line, the kind of secret, and a confidence (high / review). Then recommend remediation:

  • Rotate the credential immediately. Assume anything committed (even briefly, even if later removed) is compromised. Deleting it from the latest commit is not enough; it remains in history.
  • Move the value to an environment variable or a secrets manager and reference it instead of inlining.
  • Add the offending file pattern to .gitignore; consider a pre-commit hook or scanner to prevent recurrence.

This is a defensive check. Report findings so the owner can secure their own project; do not exfiltrate, store, or transmit any secret you find.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 30 lines · 49 tokens per session scan A cabb1e4f7dcd

Subscribe to this mod's changes

secret-scan is a skill published in the GitHub repository KhaledSaeed18/dotclaude (5 stars, last pushed 6d ago), licensed MIT. It adds 49 tokens to every session and 517 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.