commit
Skill3 starsChanged 5 months agoMITView on GitHub
Guides pre-commit self-review, optional deslop, scoped lint/typecheck/tests, commit, land, and sync with origin until the working tree is clean and the branch matches its remote. Use when the user invokes /commit, asks to commit, land on main, push, or finish a change with git.
- Deletes or force-pushes
- Commits and pushes
186 other projects use a version of this.
Adopted by
Most recently taken up by
- swjybky/deepwritetheir own version, first seen Nov 30, 2026
- Kindness-Kismet/Stellibertytheir own version, first seen Nov 29, 2026
- DGouron/review-flowtheir own version, first seen Nov 29, 2026
- cyberkaida/reverse-engineering-assistanttheir own version, first seen Nov 29, 2026
- elirantutia/vibeyardtheir own version, first seen Nov 29, 2026
- thoughtbot/the-processtheir own version, first seen Nov 29, 2026
Used with
Projects with it also use act-on-feedback, generate-run-commands and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillact-on-feedback
Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.
Also in 4 projects that use this
MicrosoftSkillgenerate-run-commands
Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.
Also in 4 projects that use this
MindgamesSkillbranch
Use when a user asks to create a new local git branch and start issue work (for example, "create branch" or "start working on issue XYZ"). Use this for issue-based branch naming in the `type/scope-short-description` pattern and for always syncing local `main` from `origin/main` before creating the new branch, creating the local tracking `main` branch first when needed.
Also in 9 projects that use this
decocmsSkilladd-mcp-tools
Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration
Also in 3 projects that use this
thoughtbotSkillimplement-with-tdd
Implement a SPEC, plan, or feature outside-in, with TDD.
Also in 3 projects that use this
thoughtbotSkillmulti-lens-review
Review a change for defects, then against its spec, its codebase's conventions, the domains trying to emerge from it, and whatever still depends on what it replaced.
Also in 3 projects that use this
- +1 more from thoughtbot
Other versions186 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 186
- microsoft/vscode★ 196ksame name
- TryGhost/Ghost★ 56ksame name
- ShareX/ShareX★ 41ksame name
- ToolJet/ToolJet★ 41ksame name
- openai/symphony★ 27ksame name
- ccusage/ccusage★ 20ksame name
- ryoppippi/ccusage★ 20ksame name
- windmill-labs/windmill★ 19ksame name
- EverMind-AI/EverMemOS★ 14ksame name
- EverMind-AI/EverOS★ 14ksame name
176 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 repository18 other files it gives its agents.
- backlogSkill
- copySkill
- coverageSkill
- deslopSkill
- fixSkill
- global-code-reviewSkill
- grand-syncSkill
- implementSkill
- interviewSkill
- pnpm-migrateSkill
- prod-error-fixSkill
- prSkill
- raptorSkill
- soakSkill
- testsSkill
- typesafe-aiSkill
- verify-thisSkill
- worktreeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 11 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
3
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 20
Before running gates, learn this repo’s rules (do not invent):
- Distinctive: line 22
Default branch name (main / master)
- Distinctive: line 58
When the change affects behavior, APIs, ops, skills, or tracked process — or when the diff itself is docs — bring related docs along.
- Distinctive: line 69
Use the smallest commands that cover the diff (project scripts).
- Very specific: line 75
If a commit.local overlay defines extra judgment gates (docs freshness, i18n, etc.), run those here too.
- Distinctive: line 77
All must exit 0 (or explicit accept for judgment warnings) before commit.
- Distinctive: line 82
No secrets or generated junk
- Distinctive: line 83
After commit, continue to land (if needed) and §6 Sync — local-only commit is not finished work
- Very specific: line 87
If the project uses feature worktrees and lands locally (see /worktree):
- Very specific: line 90
Remove the worktree with git worktree remove (not rm -rf)
- Distinctive: line 93
If the project requires PRs: push the feature branch (§6), open/update the PR if that is the repo’s handoff, and treat done as clean …
- Distinctive: line 106
Run full CI / full suite only if the project overlay expects it before push — skip for docs-only / comment-only / skill-markdown changes …
- Distinctive: line 111
Never force-push the default branch without an explicit ask.
- Distinctive: line 113
If push is blocked (permissions, hooks, network), report the blocker and leave status honest — do not claim done.
“Common” is measured: kept by at least 6 in 10 of the 165 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
Commit workflow
Done means: working tree clean and the current branch in sync with its remote (not ahead, not behind). Do not stop after a local-only commit while git status still shows ahead/behind.
Default path: pre-commit gates → commit → land on local default branch when using feature worktrees → push / sync to origin → verify clean + synced.
Prioritize correctness, security, and regressions over style-only nits unless the user asked for polish.
Discover repo conventions
Before running gates, learn this repo’s rules (do not invent):
- Default branch name (
main/master) - Agent conventions (
AGENTS.md,CLAUDE.md, contributing docs) - Lint / typecheck / test scripts (
package.json, Makefile, etc.) - Whether the workflow is solo land-on-main vs PR-required
- Optional focus/WIP file (e.g.
focus.md) — only touch if the project uses it (docs/README.md/AGENTS.md) - Project overlay — if either path exists, read it and apply after this skill (do not invent repo gates):
.cursor/skills/commit.local/SKILL.md(preferred).agents/skills/commit.local/SKILL.mdOverlay owns repo-specific gate matrix, paths, and defaults. Shared/commitstill owns the overall process (review → gates → commit → land → sync). Overlay wins on conflicts for gates/defaults only. Keep overlays thin (~one screen); push general prose back into this skill.
1. Self-review
git fetch origin <default-branch>
git diff origin/<default-branch>...HEAD
git statusTier findings:
- Critical — fix before commit: bugs, secrets, auth/isolation, wrong behavior
- Warning — fix or accept explicitly: missing regression test, risky migration, weak errors
- Note — nits; non-blocking unless polish was requested
Large diffs (>15 files or >500 lines): slice review by directory or parallel subagents.
2. Test expectations
- New/changed behavior → add or update tests
- Bug fixes → regression test (fail without fix)
- Docs/comment-only → skip tests unless documenting untested behavior
Optional: /deslop on agent-heavy branches before gates.
2b. Docs hygiene (before commit)
When the change affects behavior, APIs, ops, skills, or tracked process — or when the diff itself is docs — bring related docs along. Do not leave the tree with stale or forked guidance.
- Up to date — Update the docs that describe what you changed (README, architecture, runbooks, skill text, focus/WIP if the project uses it). If behavior moved, the prose moves in the same commit (or an immediate follow-up in the same
/commitbefore sync). - Single source of truth — Prefer one canonical doc (or skill) and link elsewhere. Do not copy procedure into a second file “for convenience.” If two places already disagree, fix the canonical and delete or shrink the duplicate to a pointer.
- Internally consistent — Touched docs must not contradict each other or the code (commands, paths, defaults, “required vs optional” steps). After edits, skim cross-links you changed for drift.
- Repo map — If
docs/README.md(or equivalent) defines where docs live, follow it; overlays may name extra required files (e.g.focus.md).
Docs-only commits still go through this check — freshness and consistency matter even when CI is skipped.
3. Pre-commit gate
Use the smallest commands that cover the diff (project scripts). Typical order:
- Lint on changed paths
- Typecheck appropriate to touched packages
- Scoped tests via
/tests(log full output; never pipe)
If a commit.local overlay defines extra judgment gates (docs freshness, i18n, etc.), run those here too.
All must exit 0 (or explicit accept for judgment warnings) before commit. Full suite is post-commit / land / push — not every iteration.
4. Commit
- Conventional Commits (
feat:,fix:, …) unless the repo uses another style - No secrets or generated junk
- After commit, continue to land (if needed) and §6 Sync — local-only commit is not finished work
5. Land (solo / worktree workflows)
If the project uses feature worktrees and lands locally (see /worktree):
- From the primary clone: merge feature branch into local default branch
- Remove the worktree with
git worktree remove(notrm -rf) - Then §6 Sync the default branch (or the branch the overlay says to publish)
If the project requires PRs: push the feature branch (§6), open/update the PR if that is the repo’s handoff, and treat done as clean working tree + feature branch synced with its remote (PR merge is separate unless the user asked to merge).
6. Sync with remote (required to finish)
/commit is not complete until:
git status --porcelain # empty
git status -sb # no ahead/behind vs upstreamTypical sequence:
- Run full CI / full suite only if the project overlay expects it before push — skip for docs-only / comment-only / skill-markdown changes (and whenever the overlay says skip)
git fetch+git pull --ff-only(or rebase if that is the repo norm) if remote movedgit push -uas needed so local and upstream match- Re-check status: clean and not ahead/behind
Never force-push the default branch without an explicit ask. Never force-push shared branches unless the user explicitly requests it.
If push is blocked (permissions, hooks, network), report the blocker and leave status honest — do not claim done.
Output
Findings: <critical/warning/note counts, or "none">
Docs: <updated / N/A / fixed SSOT drift>
Pre-commit: <commands + exit codes + log paths>
Commit: <hash + message>
Land: <done / skipped / blocked>
Sync: <pushed / already synced / blocked — reason>
Status: <clean + in sync with origin/<branch> | not done — …>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.

