commit
Claude Code
npx skills add zainzafar90/skills --skill commitCodex
npx skills add zainzafar90/skills --skill commitCursor
npx skills add zainzafar90/skills --skill commitOpenCode
npx skills add zainzafar90/skills --skill commitGitHub Copilot
npx skills add zainzafar90/skills --skill commitGemini CLI
npx skills add zainzafar90/skills --skill commitMakes one-line commits on a properly named branch, with no AI attribution, and cleans up commits you have not pushed yet.
- Claude Code
- Codex
- Cursor
- OpenCode
- GitHub Copilot
- Gemini CLI
46 lines · v1.0.0 · updated Oct 30, 2026
What makes it different
- One line per commit. Imperative, under 72 characters, no body.
- Real branch names. It renames generated ones like
claude/…after the change. - It only stages what belongs. No blind
git add -A, and it stops if it sees a secret. - Commit is not push. It only does the one you asked for.
The file
Raw file →--- name: commit description: Makes one-line commits on a human-named branch with no Co-Authored-By or AI attribution, and strips attribution from commits not yet pushed. Use when asked to commit, push, name a branch, or clean up commit messages. Commits and pushes only when asked. metadata: version: "1.0.0" ---
Commit
Rules
- Commit only when the user asked in this conversation. Push only when they asked to push. One is not the other.
- One line per commit: imperative, under 72 characters, no trailing period, no body.
- Follow the repo’s prefix style if
git log --oneline -20shows one (feat:,ABC-123). Otherwise none. - No
Co-Authored-By, no “Generated with”, no robot emoji, no AI attribution of any kind. The same goes for PR bodies. - Never
--no-verify. Never rewrite pushed commits or force-push without an explicit yes.
Branch
On main, master, develop, or a generated name (claude/…, worktree-…, random words), name the branch for
the change: lowercase kebab-case, 2 to 5 words, like checkout-webhook-retry. Use the repo’s prefix if its branches
have one. Not pushed yet: git branch -m <name>. Otherwise git switch -c <name>.
Steps
- Read
git status,git diff --staged, andgit diff. - Stage only files that belong to this change, by name. Never
git add -Ablind. A secret (.env, keys) in the change: stop and say so. - Unrelated changes go in separate commits.
git commit -m "<line>"with a single-mand nothing appended.- Check
git log -1 --format=%bprints nothing.
Strip attribution from unpushed commits
- Find the start:
@{u}, or with no upstreamgit merge-base HEAD origin/HEAD(ormain). - List them:
git log <start>..HEAD --format='%h %s%n%b'. - Any commit with a body: with a clean tree (stash first), run
git rebase --exec 'git commit --amend -q -m "$(git log -1 --format=%s)"' <start>. This drops the whole body, attribution included, which matches the one-line rule. - Run step 2 again. Every commit shows a subject only.
Commits already pushed: say which, and rewrite them only after the user says yes to a force push.
Claude Code adds attribution from its own settings. If it keeps coming back, say once that the attribution
setting in ~/.claude/settings.json turns it off. Never change settings without a yes.