/git-workflow:commit [message | --amend | files...]from git-workflow
Use when committing code changes, including amending the last commit or adding files to it. Enforces intentional file selection, conventional commits, and why-focused messages.
Ships in git-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
$ARGUMENTS
Never use git -C <path> — always run git commands from the current working directory. The -C flag rewrites the command in a way that doesn't match allowed-tools patterns, forcing unnecessary user approval. Plain git status, git log, etc. already operate on the repo you're in.
git add and git commit are pre-approved so you can complete a commit without a prompt at the mutating step — the safety gate for this skill is the intentional file-selection process in step 2, not a runtime approval.
Run in parallel:
git status — see staged/unstaged/untracked filesgit diff --cached — see what's stagedgit diff — see unstaged changesgit log --oneline -5 — recent commit style referenceIf git status shows a clean tree with nothing staged or unstaged, stop and tell the user there's nothing to commit — don't invent a commit.
Never use git add -A or git add . — be intentional about every file.
Decision tree:
Use git diff --name-only to review changed files. Include only:
Exclude:
If the diff spans unrelated concerns (e.g., a bug fix mixed with an unrelated refactor or a dependency bump), stop before committing. Propose splitting into separate commits, stage the first logical group, and ask the user to confirm before proceeding to the next.
Format: Conventional Commits
<type>(<scope>): <subject>
[optional body explaining WHY]
Type and subject grammar: see conventional-commits.md for the full type table and decision tree (shared with the pr skill's title step) — imperative mood, lowercase after the colon, no trailing period.
Commit-specific rules on top of that:
git log --oneline and GitHub's PR/commit list view from truncating the line — a tighter budget than a PR title's 50, since PR titles don't carry an emoji)git log without a pager reflowing it)Message source:
Issue references (optional): if the diff looks like it addresses an open issue, check issue-detection.md for the matching heuristics and issue-linking.md for which keyword (Fixes, Refs, etc.) to add to the body. Don't force a reference that isn't there — this is a nice-to-have, not a required step.
Mood emoji: End every subject line with a GitHub emoji that reflects the content and vibe of this specific change, not the conventional-commit type (feat is not always :sparkles:, fix is not always :bug:). Quick picks:
| Emoji | Shortcode | Mood |
|---|---|---|
| :sparkles: | :sparkles: | excited about something new |
| :bug: | :bug: | squashing something annoying |
| :relieved: | :relieved: | finally fixed, weight off shoulders |
| :broom: | :broom: | tidying up, chores |
| :rocket: | :rocket: | shipping, deploying, launching |
For the full palette and guidance on picking a non-obvious emoji, see mood-emoji.md.
Before running git commit, scan the subject + body and convert any British spellings to American English. Applies to commit messages and any PR/issue copy drafted alongside them — not to code identifiers or third-party names that legitimately ship British spellings (e.g. Element.cloneNode).
| British | American |
|---|---|
| colour, favourite, behaviour, honour, flavour | color, favorite, behavior, honor, flavor |
| normalise, organise, customise, optimise, recognise, prioritise, summarise | normalize, organize, customize, optimize, recognize, prioritize, summarize |
| cancelled, labelled, signalled, modelled, travelled | canceled, labeled, signaled, modeled, traveled |
| centre, theatre, fibre, metre, litre | center, theater, fiber, meter, liter |
| analyse, paralyse, catalyse | analyze, paralyze, catalyze |
| licence (noun), defence, offence, pretence | license, defense, offense, pretense |
| catalogue, dialogue, analogue | catalog, dialog, analog |
| grey, programme (computing), whilst, amongst | gray, program, while, among |
| judgement, acknowledgement, ageing | judgment, acknowledgment, aging |
git commit -m "$(cat <<'EOF'
type(scope): subject line here :emoji:
Optional body explaining why this change was made.
EOF
)"
If git commit doesn't succeed:
--no-verify unless the user explicitly asks for it.git status; the file selection in step 2 likely didn't stage what you intended.Only proceed to step 7 once git commit actually succeeds.
Run git status to confirm clean state or show remaining changes.
If arguments include --amend:
git show --stat HEADgit commit --amendWarning: Only amend unpushed commits.
/commit → assess changes, draft message, commit
/commit fix login redirect → stage relevant files, commit with message
/commit --amend → amend previous commit
/commit src/auth.ts src/login.ts → stage specific files, draft message, commit
Example commit messages with mood:
feat(auth): add OAuth2 login flow :sparkles:
fix(auth): resolve login redirect loop :relieved:
chore(deps): bump mise tool versions :broom:
refactor(cli): remove dead argument parser :coffin:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub meaganewaller/marketplace --plugin git-workflow4 skills in this plugin
/issueCreate well-structured GitHub issues with clear titles, descriptions, and acceptance criteria. Use when filing bugs, requesting features, or structuring issue content./prCreates a pull request and opens it in the browser for final human review before submission. Use when the user asks to open a PR, create a pull request, or ship the current branch for review./split-prAnalyzes the current diff and proposes how to split it into smaller, reviewable PRs, grouped by logical concern with a suggested creation order. Use when a changeset feels too large to review, the user says a PR is "too big" or "should be split up", or before opening a PR with many unrelated files changed.