scan-before-publish
Skill0 starsChanged 38 days agoMITView on GitHub
Scan a repo for leaked secrets (API keys, tokens, DB URLs, credentials) with ggshield before pushing, open-sourcing, or sharing a build. Use whenever the user is about to publish, push, release, or hand off code — or says "scan before publish", "check for secrets", "/scan-before-publish".
In this repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- templates/CLAUDE.mdCLAUDE.md
- analyze-sessionsSkill
- anti-sleepSkill
- ask-and-buildSkill
- claude-checkupSkill
- clone-websiteSkill
- compoundSkill
- content-machineSkill
- context-artifactsSkill
- diagram-makerSkill
- grillingSkill
- grill-meSkill
- hydrateSkill
- level-upSkill
- managerSkill
- no-mistakesSkill
- pdf-craftSkill
- personal-agentsSkill
- setup-helpSkill
- signal-from-expertSkill
- teachSkill
- techdebtSkill
- tutor-setupSkill
- tutorSkill
- verify-changeSkill
- visualizeSkill
- web-debugSkill
- workflow-tuneSkill
- youtube-transcriptSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 18
Pick the target repo: Default to the current directory.
- Very specific: line 21
Check auth once: Run ggshield-py api-status.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
scan before publish
Runs GitGuardian's ggshield over a repo's git history and working tree
and reports any leaked secrets with file + line, before the code goes anywhere
public.
On this machine ggshield is installed via pip --user. The working command name
is ggshield-py (the plain ggshield binary is missing its bundle). If
ggshield-py is not found, run python -m ggshield instead.
Steps
- Pick the target repo. Default to the current directory; if the user named
a project,
cdthere. Confirm it's a git repo (git rev-parse --is-inside-work-tree). - Check auth once. Run
ggshield-py api-status. If it reports no token / not authenticated, stop and tell the user to run:
(or! ggshield-py auth login! ggshield-py auth login --method oobif the browser flow fails). The token is stored globally, so this is a one-time step. - Scan git history:
ggshield-py secret scan repo . - Scan the working tree (catches gitignored / uncommitted files on disk).
It prompts to confirm when >20 files; pipe
yesto auto-confirm:yes | ggshield-py secret scan path -r . - Report.
- Clean → say so plainly: history and working tree both clean, safe to publish.
- Findings → list each: secret type, file, line, and whether it's in committed history (harder to fix — needs history rewrite or key rotation) or only in a working-tree file (just remove / gitignore it). Do not paste the secret value itself. Recommend rotating any real key that was ever committed.
Notes
.gitignore'd files (config.json,client_secret.json,clients.xlsx, logs) are expected to contain secrets — that's fine as long as the history scan shows they were never committed. Call that out explicitly.- To make ggshield run automatically on every commit in a repo:
ggshield-py install -m local -t pre-commit - Exit code 1 from a scan means secrets were found; exit 0 means clean.
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
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.

