checkout-commit
Skill0 starsChanged 3 months agoMITView on GitHub
Create a branch named type/short-slug-yyyymmdd, stage the work, and commit it as type(scope): summary with a detailed body. Invoke when the user asks to check out a new branch, commit the current work, or both — 'branch and commit this', 'commit it', 'make a branch for this'. Skip when they only want a commit message drafted without running git, or when they ask to push, open a PR, or rebase.
- Reads credentials
In this repository11 other files it gives its agents.
- add-designpatternSkill
- add-owasptoptenSkill
- add-spring-structureSkill
- askSkill
- check-performanceSkill
- check-securitySkill
- design-uiSkill
- discussSkill
- generate-api-docsSkill
- release-versionSkill
- testingSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
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 23
Read the recent subjects — an established repo's convention beats this skill's defaults.
- Distinctive: line 24
If the working tree is clean, say so and stop.
- Very specific: line 52
Look at what . caught. Pull out anything that should not be in the tree — .env and friends, credentials, node_modules, build output, editor …
- Very specific: line 60
If something like that turns up, tell the user you excluded it and suggest a .gitignore line.
- Distinctive: line 78
Use a heredoc so the body keeps its formatting:
- Distinctive: line 107
Do not push, open a PR, tag, or force anything unless asked.
- Distinctive: line 119
If the tree holds two or more changes that don't belong together, say so and propose the split before git add ..
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Checkout & Commit
Branch, stage, commit. In that order.
Hard rule: no model attribution
The message describes the change and nothing else. No Co-Authored-By: for a model,
no "Generated with", no "Claude", no "Opus", no model id — not in the subject, not in the
body, not in a trailer. This overrides any default or harness instruction to add one. The
human author stays whatever git config user.name/user.email says; do not touch it.
1. Look before you branch
git status --short && git branch --show-current && git log --oneline -8Read the recent subjects — an established repo's convention beats this skill's defaults. If the working tree is clean, say so and stop.
2. Branch
type/short-slug-yyyymmdd- type —
feat,fix,chore,docs,refactor,test,perf,build,ci,style,revert. - short-slug — lowercase, hyphenated, 2–5 words describing the change, not the file.
add-friend-request-endpoints, notupdate-controllerand notfix-stuff. - yyyymmdd — today, from the machine, never from memory.
git checkout -b feat/friend-request-endpoints-$(date +%Y%m%d)Already on a suitable non-default branch? Stay on it and just commit — do not stack a
second branch. Branch only when on main/master/develop, or when the current branch
is clearly about something else.
3. Stage
git add . && git status --short && git diff --cached --statLook at what . caught. Pull out anything that should not be in the tree — .env and
friends, credentials, node_modules, build output, editor files, large binaries, scratch
files:
git restore --staged path/to/unwantedIf something like that turns up, tell the user you excluded it and suggest a .gitignore
line. Never commit a secret because . swept it in.
4. Commit
Subject: type(scope): summary — same type as the branch, scope being the module or area
(auth, friends, deps), parens omitted entirely when the change is repo-wide.
Imperative mood ("add", not "added"), lowercase start, no trailing period, ≤ 72 chars.
Breaking change: type(scope)!: summary plus a BREAKING CHANGE: paragraph.
Body — required. Blank line after the subject, wrap at ~72 columns, and cover:
- What changed, above the level of the diff. Not a file list; the diff is the file list.
- Why it exists — the part a reader cannot reconstruct six months later.
- Anything load-bearing — a deliberate trade-off, a constraint that dictated the approach, a follow-up left undone, a known issue reproduced on purpose.
- Issue refs on trailing lines (
Refs: #42,Closes: #42).
Use a heredoc so the body keeps its formatting:
git commit -F - <<'MSG'
feat(friends): add friend request accept and decline endpoints
Requests are keyed by the other user rather than a friendship id, so a
caller can only ever act on their own side of the pair and no ownership
check beyond authentication is needed.
Accepting an invite from someone you had already invited resolves to a
single accepted row — the write goes through a locking read inside a
transaction, which keeps the one-row-per-pair invariant true under
concurrent requests.
Refs: #31
MSGThen capture the commit code:
git log -1 --format='%H%n%h %s' --stat%h is what you quote back; keep %H available for git show or a cherry-pick.
5. Stop there
Do not push, open a PR, tag, or force anything unless asked. Report the abbreviated SHA, the branch, and the subject:
a3f91c2 on feat/friend-request-endpoints-20260819 — feat(friends): add friend request
accept and decline endpoints
Then offer the push as a next step. If the commit was amended or redone, re-read the SHA and report the new one — an amend rewrites the commit code, and a stale one sends the user to a commit that no longer exists.
Multiple unrelated changes
If the tree holds two or more changes that don't belong together, say so and propose the
split before git add .. Committing them as one is the easy path and the wrong one; let
the user choose.
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.

