pre-push
Skill1 starsChanged 5 months agoMITView on GitHub
Pre-flight safety gate that checks whether the project is actually safe to commit/push to GitHub (or any remote) RIGHT NOW. Use when the user asks "is this ready to push?", "can I commit this?", "check before I push", "did I leave any secrets in", "ready for GitHub?". Inspects the real git state — staged diff, tracked files, source, and history — for secrets/API keys, .env/.venv being tracked, PII, leftover debug/conflict markers, and .gitignore gaps. Read-only; reports a clear ready/blockers verdict and defers to the gitignore and security-audit skills for fixes.
- Reads credentials
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
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
- Very specific: line 62
If rules are missing → defer to the gitignore skill.
- Distinctive: line 85
Always end with the safe next actions, e.g.:
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pre-Push Readiness Gate
Answer one question: "If I push right now, will I regret it?" This is a fast, focused pre-flight check of what is actually about to be published — not a deep code review. Run read-only, then give a clear verdict.
Key principle: a file being in .gitignore does NOT mean it's safe. .gitignore
only affects untracked files. A secret that was committed before being ignored, a
key hardcoded in source, or a secret in history will still push. This gate checks
reality (git state), not just the rules.
What this skill is (and isn't)
- It is a gate: a quick checklist run right before commit/push.
- It is not the
gitignoreskill (which writes ignore rules) orsecurity-audit(deep OWASP review). When this gate finds a rules gap or wants depth, it defers: "Your.gitignoreis missing X — want me to run thegitignoreskill?" Skills can't call each other programmatically, so recommend and let the user trigger them.
Step 1 — Read the real git state
git status --porcelain— what's staged / modified / untracked.git diff --cached— exactly what the next commit will contain.git ls-files— what's already tracked (the stuff.gitignorecan't save you from).- Current branch (
git branch --show-current) and whether commits are ahead of remote.
Step 2 — Run the checklist
A. Secrets about to ship (highest priority)
Scan the staged diff, tracked files, AND source contents for:
- API keys / tokens:
api[_-]?key,secret,token,Bearer,AKIA[0-9A-Z]{16}(AWS), Google/Stripe/GitHub token shapes, high-entropy strings. - Private keys:
-----BEGIN (RSA |EC |OPENSSH )?PRIVATE KEY-----. - Hardcoded passwords / connection strings (
password=,mongodb://user:pass@). - Secret files being tracked:
.env,.env.*(except.env.example),*.pem,*.key, credential JSON,.npmrc/.pypircwith tokens. - Check both: is the secret file tracked (
git ls-files)? Is a secret hardcoded in committed source? Either is a blocker even if.gitignorelists the file.
B. Environment / dependency dirs being tracked
.venv/venv/env/(Python),node_modules/,__pycache__/, build output (dist/,build/,.next/,target/). If tracked, that's bloat/leakage — flag it.
C. Personal / sensitive information (PII)
- Real emails, full names, phone numbers, addresses, real customer data, internal hostnames/IPs in committed content. Distinguish placeholders from real data.
D. Repo hygiene
- Leftover merge-conflict markers:
<<<<<<<,=======,>>>>>>>. - Debug leftovers:
console.logdumps,debugger,print()debugging,TODO/FIXMEthat block release, commented-out secrets. - Large/binary files that shouldn't be in git (consider Git LFS).
- Empty or nonsense commit, or committing on the wrong branch (e.g. straight to
main).
E. .gitignore sanity
- Are
.env,.venv,node_modules, build dirs ignored and not already tracked? - If rules are missing → defer to the
gitignoreskill.
Step 3 — Verdict
Give a clear, scannable result:
Pre-push check — <branch> — <date>
⛔ BLOCKERS (do not push)
- [SECRET] AWS key hardcoded in src/config.js:12
- [TRACKED] .env is tracked (git ls-files) — will publish DB password
⚠️ WARNINGS (review)
- .venv/ is tracked (412 files) — bloat
- Leftover console.log at src/app.js:88
✅ OK
- No conflict markers, .gitignore covers build output
Verdict: NOT READY — 2 blockers.Always end with the safe next actions, e.g.:
- Untrack a committed file (keep it locally):
git rm --cached .env && echo ".env" >> .gitignore - If a secret already reached a commit/history: removing it from tracking does NOT
scrub history. Recommend rotating the secret immediately, and history rewrite
(
git filter-repo/ BFG) if it must be purged. - Offer to run
gitignore(fix rules) orsecurity-audit(deep review) as follow-ups.
Rules
- Read-only. Report the verdict; don't commit, push, or edit. Fix only what the
user approves, and surface
git rm --cachedrather than running it silently. - Blocker vs warning: secrets/keys/PII about to publish = BLOCKER. Bloat, debug leftovers, style = WARNING. Be explicit which is which.
- Don't echo full secret values — show the location and a masked snippet; the goal is to flag, not to reprint the secret.
- Rotate, don't just delete: any secret that already reached a commit must be treated as compromised — say so.
- Defer, don't duplicate: lean on
gitignoreandsecurity-auditfor fixes/depth.
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- strands-agents/sdk-python★ 9ksame name
- strands-agents/harness-sdk★ 8.9ksame name
- AlexZio00/sovereign-skills★ 149same name
- Sanexxxx777/curated-claude-code★ 16same name
- AcKeskin/contexture★ 2same name
- chenson42/stackkeel★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- gitignoreSkill
- optimizeSkill
- pdf-summarySkill
- qnaSkill
- security-auditSkill
- tidySkill
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.

