commit-readiness-review
Skill9 starsChanged 23 days agoMITView on GitHub
Use before any Claude-initiated git commit - "ready to commit", "commit that", "quick commit", "prêt à commit", "commit ça", "vite un commit", time pressure to ship, diff containing test/debug leftovers or touching multiple stacks.
- Reads credentials
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adversarial-feature-challengeSkill
- api-contract-versioningSkill
- bug-ticket-root-causeSkill
- bug-triage-structuredSkill
- ci-pipeline-orchestrationSkill
- commit-readiness-reviewSkill
- comprehensive-test-strategySkill
- database-schema-evolutionSkill
- ddd-backend-implementationSkill
- design-system-component-lifecycleSkill
- detection-sweepSkill
- domain-glossarySkill
- domain-modeling-designSkill
- frontend-fullstack-implementationSkill
- frontend-spec-call-site-auditSkill
- merge-request-reviewSkill
- performance-profilingSkill
- recording-decisionsSkill
- recurring-bug-root-causeSkill
- refactoring-shared-component-apiSkill
- validating-features-end-to-endSkill
- visual-regression-checkSkill
- writing-robust-testsSkill
- adversarial-feature-challengeSkill
- api-contract-versioningSkill
- audit-architectureSkill
- audit-ci-cdSkill
- audit-complianceSkill
- audit-industrialisationSkill
- audit-observabilitySkill
- audit-performance-frontendSkill
- audit-qualitySkill
- audit-reportSkill
- audit-securitySkill
- audit-testingSkill
- bug-ticket-root-causeSkill
- bug-triage-structuredSkill
- ci-pipeline-orchestrationSkill
- comprehensive-test-strategySkill
- daily-workflow-optimizationSkill
- database-schema-evolutionSkill
- ddd-backend-implementationSkill
- design-system-component-lifecycleSkill
- detection-sweepSkill
- domain-glossarySkill
- domain-modeling-designSkill
- frontend-fullstack-implementationSkill
- frontend-spec-call-site-auditSkill
- merge-request-reviewSkill
- performance-profilingSkill
- production-incident-diagnosticSkill
- qa-session-intakeSkill
- recording-decisionsSkill
- recurring-bug-root-causeSkill
- refactoring-shared-component-apiSkill
- validating-features-end-to-endSkill
- visual-regression-checkSkill
- writing-robust-testsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 16
This skill: when: an agent-initiated commit is imminent - "commit that", "ready to commit", a diff with debug leftovers or touching several …
- Very specific: line 17
validating-features-end-to-end: instead if: the question is "does it work" (functional proof), not "is it committable" - Very specific: line 18
The repo's git skill: if it exists: the project's branch/message/tracker conventions win over this generic checklist
- Very specific: line 29
Before the commit, never after: - no catch-up via --amend once pushed
- Distinctive: line 47
Stage file by file: - never a blind git add -A/git add ..
- Very specific: line 74
Test procedure: scripts/precommit-scan.test.ts - deterministic behavioral test of the script (positive + negative fixture).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Commit Readiness Review - self-review before committing
If the current repo has a project-specific pre-commit skill, it wins - it knows the exact commands.
This skill vs. others
- This skill when: an agent-initiated commit is imminent - "commit that", "ready to commit", a diff with debug leftovers or touching several stacks, time pressure
validating-features-end-to-endinstead if: the question is "does it work" (functional proof), not "is it committable"- The repo's git skill if it exists: the project's branch/message/tracker conventions win over this generic checklist
Context to gather (before acting)
git status+git diff --stat: real scope, stacks touched, at-risk files- Per-stack format/lint/typecheck/test commands (
package.json/Makefile/ CI config) - The repo's message format:
git log --oneline -5 - The associated ticket (number to put in
Closes #if the convention requires it)
Principle
- Before the commit, never after - no catch-up via
--amendonce pushed - Time pressure does not change the checklist - a committed secret costs a key rotation + history purge, not a revert
- Targeted scope: check what changed, not the whole suite
Workflow
- Map the diff:
git status+git diff --stat. Identify the stacks touched (each extension → its checks) and at-risk files (.env,*.pem,*.key, credentials) → immediate STOP if present. - Secret scan on the content. Two levels:
- Dedicated tool if available (preferred, fewer false negatives):
gitleaks protect --staged --redacton the staged diff, orgitleaks detect --no-git --redacton the tree. If it is not installed, do not block on it - fall back to the grep below. - Fallback grep:
git diff HEAD | grep -iE "(password|api[_-]?key|secret|token|sk_live|ghp_|glpat-|AKIA[0-9A-Z]{16}|-----BEGIN [A-Z ]*PRIVATE KEY-----)\s*[:=]?"plus at-risk filesgit diff --name-only HEAD | grep -iE "\.env|\.pem|\.key|credentials|secret". - Any detection = show the line to the user and wait for their decision. "It's just for debugging" is not an exception. False positive: exclude it ad hoc with a
gitleaks:allowcomment on the line, or systemically via the allowlist of a repo-level.gitleaks.tomlconfig - never by loosening the global scan. - Tooling details and post-leak procedure: see
rules/pre-commit-secret-detection.mdfor gitleaks install, pre-commit hook, allowlist and the rotation procedure if a secret is already pushed.
- Dedicated tool if available (preferred, fewer false negatives):
- Per touched stack, in order format → lint → typecheck → targeted tests (commands:
package.jsonscripts,Makefile, repo conventions). Test the changed scope only; the full suite is for before push. - Problematic patterns in the diff (added lines only):
- hardcoded waits in tests (
waitForTimeout,sleep) - debug leftovers (
console.log,print(,dbg!,debugger) TODO/FIXMEadded → track in a ticket or remove- disabled tests (
.skip,xit,#[ignore]) with no justification
- hardcoded waits in tests (
- Stage file by file - never a blind
git add -A/git add .. Verify each staged file belongs to the change. - Summary + confirmation: files, check results (real ✅/❌, not assumed), proposed message in the repo format (
git log --oneline -5for the format). Ask for confirmation beforegit commitunless an autonomous mode is explicitly active.
Traps & rationalizations
| Excuse | Reality |
| "It's just for debugging, I'll commit the secret for 2 min" | A pushed secret = key rotation + history purge. No exception |
| "We're in a hurry, I'll skip the lint" | Pressure does not change the checklist. A rushed broken commit costs more |
"git add -A is faster" | Blind staging pulls in .env, builds, files from other changes. File by file |
"--no-verify to get past the hook" | The hook protects the branch. No --no-verify without an explicit user request |
| "The checks will probably pass" | ✅ = executed with pasted output, never assumed |
"I'll fix it with --amend after the push" | No --amend on a pushed commit. Verify beforehand |
Exit condition
- Format/lint/typecheck green on each touched stack (real output)
- Targeted tests of the changed scope passed - or, when the suite was already red before this change, that failure named and shown to predate it
- Zero secret / sensitive file in the diff
- Zero forbidden pattern (debug, hardcoded wait, disabled test, TODO) or explicitly justified
- Files staged one by one, all legitimate
- Message in the repo format + user confirmation obtained (unless autonomous mode)
A missing box = no commit. The one exception is a failure that predates the change: it does not block the commit, it has to be stated. Silently committing on a red suite and refusing to commit at all are both wrong, and the second is how a checklist read literally forbids every commit in a repository that has been red for a fortnight.
Tooling
- Test procedure:
scripts/precommit-scan.test.ts- deterministic behavioral test of the script (positive + negative fixture). Runnpx tsx scripts/precommit-scan.test.tsfrom the canonical repo after any change to the script (also picked up bynpm test). Not distributed to target repos. scripts/precommit-scan.ts- scans the staged diff (npx tsx scripts/precommit-scan.ts): secrets via gitleaks or regex fallback, sensitive files, debug leftovers. Read-only, exit 1 on a secret/sensitive file. Wireable as a hook (seehooks/).
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.

