From git-flow
Use this skill when the user asks an agent to create, split, validate, or repair Git commits with strict atomic boundaries and Conventional Commit messages. It is for safe commit crafting, staged-diff review, gh-assisted issue or PR context, and disciplined commit history work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/git-flow:commitThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this workflow whenever you create commits for a user. Optimize for
Use this workflow whenever you create commits for a user. Optimize for precision, reviewability, and safety over speed.
The goal is a linear series of independently understandable commits where each commit represents exactly one logical change and uses a valid Conventional Commit message.
git add ., git add -A, git add --all, or broad pathspecs.git restore, git reset --hard, git clean,
git checkout --, git switch, git rebase, git merge, or force-push
commands unless the user explicitly approves the exact action.--no-verify.scripts/validate.py validates a Conventional Commit message
before git commit.references/checklist.md contains the required staging,
review, and scoring gates. Read it before the first commit in a session and
whenever a commit is borderline.Establish context safely:
git status --short.git diff -- path/to/file.gh for repository context when helpful:
gh issue view <number>, gh pr view <number>,
gh pr diff <number>, or gh auth status.gh to mutate issues, PRs, branches, or remotes unless the
user explicitly asked for that action.Partition work by intent:
For each intended commit, write these two sentences before staging:
Stage narrowly:
git add -p path/to/file when a file contains mixed concerns.git add path/to/file only when every change in that file belongs to
the commit intent.git diff --cached.Validate before committing:
references/checklist.md.Validate the commit message:
<type>[optional scope][!]: <description>feat, fix, docs, style, refactor, perf, test, build,
ci, chore, revert.! only for breaking changes and include a BREAKING CHANGE:
footer.update, changes, fixes, or misc.Validate the proposed message before committing:
python3 scripts/validate.py --message-file /path/to/message.txt
If writing the message inline, validate with stdin:
printf '%s\n' 'fix(api): reject empty tokens' | python3 scripts/validate.py
Commit:
git commit --file /path/to/message.txt for multi-line messages or
git commit -m "type(scope): subject" for single-line messages.Repeat for the next intent:
git status --short after each commit.Every commit must score yes on all items before it is created:
Single responsibility: yes/no
Minimal diff: yes/no
Clear intent: yes/no
Conventional commit compliance: yes/no
Independently testable: yes/no
If any answer is no, do not commit. Split, revise, or ask the user how to
handle the ambiguity.
git status --short
git diff -- path/to/file
git add -p path/to/file
git add path/to/new-file
git diff --cached
git commit --file /tmp/commit-message.txt
gh issue view 123
gh pr view 456 --json title,body,files
Avoid convenience commands that operate on the whole worktree. When in doubt, choose the smallest path-specific or hunk-specific command and explain why.
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 liljamesjohn-archive/codecave --plugin git-flow