pre-commit
Skill2 starsChanged 6 months agoMITView on GitHub
Pre-commit quality gate — lint, format, test, validate before committing. Runs automated checks and fixes issues. Use before git commit to ensure code quality.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- TsukiNi22/ai-utilstheir own version, first seen Nov 16, 2026
- 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
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- wellwelwel/poku★ 1.2ksame name
- mihai-dinculescu/tapo★ 870same name
- GoogleCloudPlatform/cloud-solutions★ 140same 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
- flying-dice/pseudoscript★ 2same name
- Pradnyeshp/Claude-Skills★ 2same name
- Docat0209/SoloForge★ 1same name
2 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 repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-skillsSkill
- analyze-localSkill
- analyze-prodSkill
- analyzeSkill
- architectureSkill
- asset-validationSkill
- blog-postSkill
- bugfixSkill
- cloud-platformsSkill
- code-reviewSkill
- content-creationSkill
- context-engineeringSkill
- create-prSkill
- deployment-proceduresSkill
- deploy-productionSkill
- deploy-stagingSkill
- docsSkill
- feature-devSkill
- geo-writerSkill
- humanizerSkill
- infra-changeSkill
- marketing-operationsSkill
- marketingSkill
- ml-pipelineSkill
- planSkill
- productSkill
- project-initSkill
- prompt-engineeringSkill
- qaSkill
- releaseSkill
- run-testsSkill
- security-scanSkill
- seo-reviewSkill
- social-media-managerSkill
- test-localSkill
- test-strategySkill
- ui-ux-designSkill
- worktree-isolationSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Read AGENTS.md and project config files to determine:
- Distinctive: line 34
Stop and inform the user.
- Distinctive: line 38
Run the project's linter on staged files:
- Distinctive: line 47
Completion: If exit code 0 after auto-fix → proceed.
- Distinctive: line 56
Run the project's formatter:
- Distinctive: line 79
Completion: If exit code 0 → proceed. If type errors → report and STOP.
- Distinctive: line 83
Run the project's test suite (unit tests at minimum):
- Distinctive: line 96
If still failing — report and STOP
- Distinctive: line 98
Completion: All tests pass → proceed. Any failure after auto-fix attempt → STOP.
- Distinctive: line 124
If all checks pass, suggest the commit command:
- Distinctive: line 129
Follow Conventional Commits format.
“Common” is measured: kept by at least 6 in 10 of the 12 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
Automated quality gate before committing code. Runs linting, formatting, tests, and validation checks. Fixes auto-fixable issues and reports blockers.
1. Detect Project Stack
Read AGENTS.md and project config files to determine:
- Language(s): TypeScript, Java, Python, Go, etc.
- Package manager: npm/pnpm/yarn, maven/gradle, pip/poetry, go mod
- Linter: ESLint, Checkstyle, ruff/flake8, golangci-lint
- Formatter: Prettier, google-java-format, black/ruff, gofmt
- Test runner: Vitest/Jest, JUnit/Maven, pytest, go test
2. Check Staged Changes
// turbo
git status --shortIdentify which files are staged. If no files are staged:
⚠️ No staged changes found. Stage your changes first:
git add <files>Stop and inform the user.
3. Run Linter
Run the project's linter on staged files:
| Stack | Command |
| TypeScript/JS | npx eslint --fix <files> |
| Python | ruff check --fix <files> or flake8 <files> |
| Java | mvn checkstyle:check or gradle checkstyleMain |
| Go | golangci-lint run <files> |
Completion: If exit code 0 after auto-fix → proceed. If errors remain → report and STOP:
## Lint Issues (must fix)
- [file:line] [rule] description4. Run Formatter
Run the project's formatter:
| Stack | Command |
| TypeScript/JS | npx prettier --write <files> |
| Python | ruff format <files> or black <files> |
| Java | mvn spotless:apply or google-java-format <files> |
| Go | gofmt -w <files> |
Re-stage any auto-formatted files:
git add <formatted-files>Completion: Files formatted and re-staged → proceed.
5. Run Type Checker (if applicable)
| Stack | Command |
| TypeScript | npx tsc --noEmit |
| Python | mypy <files> or pyright <files> |
Completion: If exit code 0 → proceed. If type errors → report and STOP.
6. Run Tests
Run the project's test suite (unit tests at minimum):
| Stack | Command |
| TypeScript/JS | npx vitest run or npx jest |
| Python | pytest -x -q |
| Java | mvn test -q or gradle test |
| Go | go test ./... |
If tests fail:
- Analyze the failure
- Attempt auto-fix if the fix is obvious and safe
- Re-run tests to verify
- If still failing — report and STOP
Completion: All tests pass → proceed. Any failure after auto-fix attempt → STOP.
7. Validate Build (if applicable)
| Stack | Command |
| TypeScript/JS | npm run build or npx tsc --noEmit |
| Java | mvn compile -q |
| Go | go build ./... |
8. Summary
## Pre-Commit Results
| Check | Status | Details |
|------------|--------|---------|
| Lint | ✅/❌ | [issues found/fixed] |
| Format | ✅/❌ | [files formatted] |
| Type check | ✅/❌/⏭️ | [errors or N/A] |
| Tests | ✅/❌ | [passed/failed count] |
| Build | ✅/❌/⏭️ | [success or N/A] |
Ready to commit: [YES / NO — fix issues above first]If all checks pass, suggest the commit command:
git commit -m "<type>(<scope>): <description>"Follow Conventional Commits format.
Integration
- Called by:
feature-devskill,bugfixskill (before commit) - Calls:
run-testsskill - Followed by:
create-prskill
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.

