From common
Analyse staged and unstaged changes, craft a meaningful commit message, and commit. Trigger whenever the user says "commit", "create a commit", "make a commit", "commit these changes", "commit the work", "commit and push", "/commit", or otherwise asks to persist current git changes. Also trigger after any workflow skill completes (e.g. task-implementation, milestone-closing, milestone-breakdown, strategic-planning, project-inception, research-investigation, research-refine, codebase-survey-module, codebase-derive-instructions) and the user signals readiness to commit (e.g. "looks good, commit it", "ship it", "save this"). This is the ONLY commit point across all workflows — every other skill defers commit creation to this skill. Do NOT trigger for purely exploratory git questions ("what's changed?", "show me the diff") that do not request a commit.
How this skill is triggered — by the user, by Claude, or both
Slash command
/common:commit Optional guidance on what to commit or how to slice changesOptional guidance on what to commit or how to slice changessonnetThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are responsible for the **only** commit step across all workflows (milestone-driven,
You are responsible for the only commit step across all workflows (milestone-driven, research, codebase-survey, ad-hoc). No other skill commits directly — they all defer to you.
The blocks below are the captured stdout of shell commands run before this skill loaded. Treat them as the source of truth for Step 1 — do not re-run the same commands. Only run additional git commands if you need information these snapshots don't cover (e.g. the diff of a specific path, or a longer log for style reference).
git status!`git status`
git diff --staged --stat!`git diff --staged --stat`
git diff --staged!`git diff --staged`
git diff --stat (unstaged)!`git diff --stat`
git diff (unstaged)!`git diff`
!`git log -n 10 --pretty=format:'%h %s'`
The user may provide free-text guidance: $ARGUMENTS
When provided, use this to decide which changes to include and how to slice them (e.g. "only the tests", "split config from implementation", "everything in src/"). When empty, commit all related changes as a single logical commit.
git status and diff blocks above.git diff --staged block is non-empty, staged files represent the user's
explicit intent — only operate on the staged changes. Skip unstaged files entirely.git diff (unstaged) block as the candidate set.ROADMAP.md and PLAN.md if they exist, to understand the current milestone
and task context. (These are read via the Read tool, not pre-rendered, because
they may be absent.)If there are no changes matching the guidance (or no changes at all), tell the user and stop.
Determine the nature of the changes:
Which workflow phase produced them? Look for signals:
README.md, CLAUDE.md, INDEX.md, etc.) in a
new or nearly empty project → inception phaseROADMAP.md changed → strategic planning phasePLAN.md written/rewritten + ROADMAP.md status update → breakdown phasePLAN.md task status update → implementation phaseROADMAP.md completion + PLAN.md reset → milestone closing phaseWhat's the scope? List the files changed and summarize the purpose of each change.
Is anything suspicious? Flag files that probably shouldn't be committed:
.env, credentials, secrets, API keysnode_modules/, __pycache__/Write a commit message following conventional commit format:
<type>(<scope>): <short summary>
<optional body — what changed and why>
Type selection:
init: — project inception (initial project structure and foundational files)roadmap: — milestone added or updated in ROADMAP.mdplan: — task breakdown written to PLAN.mdfeat: — new feature or capability (implementation phase)fix: — bug fixtest: — test-only changesrefactor: — code restructuring without behavior changemilestone: — milestone closingimprove: — enhancement or refinement to existing functionalitychore: — tooling, config, or maintenanceIf the task in PLAN.md specifies a commit message, use it as the basis but adjust if
the actual changes diverged from the plan.
The summary line should be under 72 characters. The body (if needed) should explain why, not what — the diff already shows what changed.
git add -A). Exclude any suspicious files identified in Step 2.-m flags, one per
paragraph. Each -m becomes its own paragraph in the final message.
git commit -m "feat(x): short subject" -m "First body paragraph." -m "Second body paragraph."
$TMPDIR/commit-msg.txt via the Write tool,
then commit with -F:
git commit -F "$TMPDIR/commit-msg.txt"
git commit -m "$(cat <<'EOF' … EOF)" or any other heredoc form.
Heredocs bypass the Bash(git commit*) permission match and trigger prompts; they
also produce no diff in the harness. The two forms above cover every case.If relevant, suggest the next workflow step:
git add ...gitignore. Don't override it.git log useful months later.
Take the time to get it right.git -C. Always run git commands from the current working directory.
The -C flag breaks Claude Code's permission system.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub mtrense/skills --plugin common