From commit-as-prompt
Stage, review, and create a structured Git commit with WHAT/WHY/HOW message format optimized as AI context. Use when committing code changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/commit-as-prompt:commit-as-promptThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Creates a Git commit whose message is useful to both humans and future AI sessions — structured, purposeful, and self-contained.
Creates a Git commit whose message is useful to both humans and future AI sessions — structured, purposeful, and self-contained.
!git status -s
!git diff HEAD --stat
<type>(<scope>): <imperative subject>
WHAT: <one sentence — what changed>
WHY: <business context, user need, or bug background>
HOW: <technical approach; note compatibility concerns or verification steps>
Type prefixes:
prompt(scope): — commits intended as AI context (skill files, prompts, docs that feed future sessions)feat, fix, refactor, docs, chore — standard Conventional Commits for regular codeSee examples.md for full worked examples.
1. Review the diff
Check that only relevant changes are staged. Remove debug logs, commented-out code, or unrelated formatting.
When inspecting a specific file, always use:
git diff HEAD -- "filename"
Omitting HEAD misses staged-only changes; omitting -- causes errors on non-ASCII filenames.
2. Stage
If files aren't staged yet, add them:
git add -- "filename"
If the workspace mixes unrelated changes, split into separate commits.
3. Draft the message
Use $ARGUMENTS as your starting point if provided. Otherwise derive the subject from the diff.
Fill in WHAT/WHY/HOW. The WHY is the most important line — don't repeat the subject, explain the reason it was worth changing. See reference.md for principles.
4. Commit
git commit -m "<subject>" -m "WHAT: ...
WHY: ...
HOW: ..."
Input summary: $ARGUMENTS
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 starmountain1997/g-claude --plugin commit-as-prompt