pre-commit
Skill1 starsChanged 7 months agoMITView on GitHub
Pre-commit quality gate. Triggers ONLY when: about to run git commit or git add to stage files. Do NOT trigger when: discussing commit strategy or mentioning commits in conversation.
- Reads credentials
11 other projects use a version of this.
Adopted by
Most recently taken up by
- GoogleCloudPlatform/cloud-solutionstheir own version, first seen Nov 1, 2026
- goulvenclech/dotclaudetheir own version, first seen Oct 13, 2026
- wellwelwel/pokutheir own version, first seen Oct 8, 2026
- mihai-dinculescu/tapotheir own version, first seen Oct 8, 2026
- benyoskovitz/claude-code-workflowtheir own version, first seen Sep 24, 2026
- RealDougEubanks/ClaudeMarketplacetheir own version, first seen Sep 10, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- wellwelwel/poku★ 1.2ksame name
- mihai-dinculescu/tapo★ 870same name
- GoogleCloudPlatform/cloud-solutions★ 139same name
- benyoskovitz/claude-code-workflow★ 8same name
- goulvenclech/dotclaude★ 5same name
- autowarefoundation/autoware-harness★ 4same name
- Cogni-AI-OU/cogni-ai-agent-skills★ 4same name
- alex-voloshin-dev/ai-skills★ 2same name
- flying-dice/pseudoscript★ 2same name
- Pradnyeshp/Claude-Skills★ 2same name
1 more not listed
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 repository30 other files it gives its agents.
- claude.mdCLAUDE.md
- biz-thinkSkill
- biz-validateSkill
- brand-buildSkill
- community-engageSkill
- content-createSkill
- content-distributeSkill
- copy-craftSkill
- data-decideSkill
- finance-opsSkill
- growth-trackSkill
- infra-opsSkill
- issue-createSkill
- legal-guardSkill
- post-mergeSkill
- pre-codeSkill
- pre-prSkill
- product-evalSkill
- project-initSkill
- retroSkill
- roadmap-steerSkill
- sales-closeSkill
- search-evalSkill
- self-reviewSkill
- sopSkill
- staging-verifySkill
- support-opsSkill
- test-gateSkill
- ux-auditSkill
- work-breakdownSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
6
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
- Distinctive: line 13
Never bundle unrelated changes in a single commit.
- Distinctive: line 36
Before every commit, run through ALL of these:
- Very specific: line 39
Commit plan alignment?: If the issue body has a ## Commit Plan section (from work-breakdown), verify this commit matches one of the planned …
- Distinctive: line 52
If git diff --staged shows multiple logical changes:
- Distinctive: line 57
Commit with the appropriate message.
- Distinctive: line 62
After completing work, proactively ask: "Would you like to commit these changes?" Present what will be committed and the proposed commit …
- Distinctive: line 69
All commits done → "Run pre-pr to create PR"
“Common” is measured: kept by at least 6 in 10 of the 11 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-Commit Quality Gate
Atomic Commit Rules
- Each commit = EXACTLY ONE logical change (Google: never mix formatting with logic).
- Self-contained: the project must build and pass existing tests after every commit (new tests may come in the next commit).
- Implementation and tests are TWO separate commits — implementation first, then tests. The implementation commit must not break any existing tests.
- Never bundle unrelated changes in a single commit.
- Sweet spot: 3-5 atomic commits per feature.
Commit Message Format (Chris Beams + Conventional Commits)
Format: <type>[scope]: <description>
Types: feat, fix, refactor, docs, test, chore, perf, ci
Rules:
- Subject line: max 50 chars, imperative mood ("Add feature" not "Added feature"), no period at end.
- Separate subject from body with a blank line.
- Body (if needed): wrap at 72 chars, explain WHAT and WHY — not HOW.
- Breaking changes: append
!after type or addBREAKING CHANGE:footer.
Bad: git commit -m "add upload feature and fix sidebar and update tests"
Good: Three separate commits:
feat: add document upload APIfix: sidebar not collapsing on mobiletest: add upload API integration tests
Pre-Commit Checklist
Before every commit, run through ALL of these:
git diff --staged— read every line. Is this ONE logical change?- Commit plan alignment? If the issue body has a
## Commit Plansection (fromwork-breakdown), verify this commit matches one of the planned commit units. If you're committing something not in the plan, either the plan needs updating or the commit needs splitting. - Multiple logical changes staged? → split (unstage with
git reset HEAD <file>, commit separately). - Commit message follows format? Imperative mood, ≤50 chars, correct type?
- Dead code deleted? (Clean Code: don't comment out code — VCS has the history.)
- No debug statements? (
console.log,print,debugger,binding.pry) - No secrets,
.envfiles, or credentials staged? - No TODO/FIXME comments left behind?
- All compiler/linter warnings addressed? (NASA Rule 10)
- Project still builds and passes tests with this commit?
- Push immediately after commit — never accumulate unpushed commits.
Splitting Oversized Commits
If git diff --staged shows multiple logical changes:
git reset HEAD .git add <specific-files>for the first logical change.git diff --stagedto verify only the intended change is staged.- Commit with the appropriate message.
- Repeat for each remaining logical change.
When Asking the User to Commit
After completing work, proactively ask: "Would you like to commit these changes?" Present what will be committed and the proposed commit message. If the changes span multiple logical units, propose multiple atomic commits with their respective messages.
Next Steps
Report to user: "Committed: [message]. Pushed to [branch]."
Suggested next steps (user decides):
- All commits done → "Run pre-pr to create PR"
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.

