pre-commit-check
Skill1 starsChanged 3 months agoMITView on GitHub
在 git commit 之前运行的检查清单,确保不把半成品提交进去
- Reads credentials
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- rikvanriel/code-hygienetheir own version, first seen Sep 17, 2026
- SID-SURANGE/cursor-team-opstheir own version, first seen Aug 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- rikvanriel/code-hygiene★ 0same name
- SID-SURANGE/cursor-team-ops★ 0same 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 repository10 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- brainstormingSkill
- code-reviewSkill
- debug-productionSkill
- frontend-tasteSkill
- handoffSkill
- plain-writingSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- writing-plansSkill
The file
Files
Pre-commit 检查
触发条件
任何时候要执行 git commit 之前,必须按本清单走一遍。
步骤
- 看一眼将要提交什么:
git status和git diff --stat。如果有意外文件(构建产物、.env、日志、IDE 配置),先处理。 - 跑测试:
- Java:
./mvnw test或./gradlew test - Python:
pytest -x -q - Node:
pnpm test(或npm test,看项目 lock) - 没测试套件:跑 lint / typecheck(
tsc --noEmit/ruff check .)
- Java:
- grep 一遍敏感信息:
命中要确认是不是硬编码。git diff --cached | grep -iE "(api[_-]?key|secret|password|token|AKIA|sk-)" - 写 commit message:按
global/git-workflow.md的 Conventional Commits 规范。 - commit,但不要 push。push 等用户明确说。
验收标准
- 测试全绿(或用户明确豁免)
- diff 里没有敏感信息
- commit message 符合规范
git status干净,没有误提交的文件
常见坑
- 改了代码但忘了重新生成 lock 文件(
pnpm install/pip install后没 commit lock)。 - 把调试用的
console.log/print()/System.out.println留在代码里。 - 一次 commit 里混了多个不相关改动——拆。
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.

