Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Phaedra-Solutions/cursor-rulesnpx agentmods add skills/phaedra-solutions/cursor-rules/secrets-scanWrote 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.
[](https://agentmods.dev/skills/phaedra-solutions/cursor-rules/secrets-scan)<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/secrets-scan"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/secrets-scan/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/secrets-scan"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/secrets-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.01377 |
| Opus 5.5 | $0.00029 | $0.00551 |
| Sonnet 5.5 | $0.00015 | $0.00275 |
| Haiku 4.5 | $0.00007 | $0.00138 |
Grade A, and why
secrets-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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Secrets scan
When to use
- Before a commit (the
git-commitskill calls this on staged files). - When the user asks to check for secrets, keys or credentials.
- After a secret was pasted into code, a log, an issue or chat, or committed by mistake.
- As part of
security-audit, which only scans the working tree; this skill also covers history.
Before you start
- Check that gitleaks is installed:
gitleaks version. If it isn't, ask before installing it, and install only from the official source (package manager or the GitHub releases page). - Agree the scope with the user: staged changes (default), the working tree, a commit range, or the full history. A full-history scan can be slow on large repos.
- Never print, echo or paste a secret value, even partly. Always pass
--redactso gitleaks hides values in its output. - Don't write a report file into the repo. If the user wants one, write it outside the working tree with
--redactand delete it when done.
Steps
-
Run the scan for the agreed scope (from the repo root):
Scope Command Staged changes gitleaks git --staged --redact --no-banner -vUnstaged changes gitleaks git --pre-commit --redact --no-banner -vWorking tree (all files, tracked or not) gitleaks dir . --redact --no-banner -vA commit range gitleaks git --log-opts="origin/main..HEAD" --redact --no-banner -vFull history gitleaks git . --redact --no-banner -vExit code 1 means leaks were found; 0 means none. Respect an existing
.gitleaks.tomland.gitleaksignore. -
Triage each finding. For each one, note the rule ID, file, line, commit (for history scans) and author. Decide:
- Real secret: go to step 3.
- Test fixture or example value: confirm it grants no access, then suggest a
gitleaks:allowcomment on that line, or a fingerprint in.gitleaksignore. Ask the user first; never add an ignore on your own. - False positive: same as above, with the reason.
-
Contain a real secret. Explain to the user, in this order:
- Revoke or rotate it first, at the provider (cloud console, GitHub token settings,
npm token revoke, the API vendor's dashboard). A secret that reached a remote, a CI log, a package or chat is compromised even after it's deleted. Removing it from history doesn't make it safe. - Check for misuse: review the provider's access logs for the period since the leak.
- Replace it with a reference to an env var or secret manager (
process.env.STRIPE_SECRET_KEY, a CI secret, a vault). Add the file to.gitignoreif it's a local config file. - Remove it from the code in a normal commit.
- Revoke or rotate it first, at the provider (cloud console, GitHub token settings,
-
Only if the user asks, rewrite history. Explain the cost first:
- every commit hash after the first affected commit changes;
- a force-push is required, and every collaborator must re-clone or rebase; forks, open PRs, caches and existing clones keep the old data;
- on GitHub, cached views and PR refs may need GitHub Support to purge.
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.
- 3d ago First seen · 78 lines · 73 tokens per session scan A 32c899c57f75
secrets-scan is a skill published in the GitHub repository Phaedra-Solutions/cursor-rules (4 stars, last pushed 2d ago), licensed MIT. It adds 73 tokens to every session and 1,377 once invoked, about $0.0003 per session on Opus 5.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-11-01.
Other skills, from other repositories
git-github-flow
Use for branch prep, clean commits, PR descriptions, GitHub issue triage, changelogs, release notes, review response, merge readiness, or publishing a branch safely.
commit
Stage, commit, and push code changes with branch safety and explicit staging. Use when ready to commit work. Invoked by saying "commit", "push", or "commit and push".
commit-all
Batch-commit all uncommitted changes grouped by relevance. Use when multiple accumulated changes need committing. Invoked by saying "commit all" or "commit everything".
autofix-pr
Watch a pull request and fix it from a worktree of its own (or, with --in-place, the user's own checkout) - CI failures, review feedback from trusted authors and merge conflicts are fixed, pushed to the PR branch and answered on the PR under the user's git and gh identity. Usage - /autofix-pr [ | ] [--once]…
ax-extract-workflow
Reconstruct workflow behind a past coding-agent artifact using local ax sessions/commits/skills/tool traces. Use when asked how X was built.
work-unit-commits
Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.