This skill should be used when the user asks to "commit", "smart commit", "split commit", "論理的にコミット", "diff を見てコミット", "変更をコミット", or wants to logically analyze staged/unstaged changes and create well-structured Conventional Commits. Dispatches a Sonnet subagent to review diffs, group related changes, and produce split commits.
Ships in 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.
Analyze git diffs with a Sonnet subagent, logically group related changes, and create well-structured Conventional Commits split by concern.
/commit or asks for a "smart commit"Run these commands in parallel to collect context:
git status
git diff # unstaged changes
git diff --cached # staged changes
git log --oneline -10 # recent commit style reference
If nothing is staged and there are unstaged changes, use the AskUserQuestion tool to ask
the user which files to include before proceeding. Do not auto-stage everything.
Launch an Agent (model: sonnet) to analyze the diff. The subagent prompt must include:
Subagent instructions template:
Analyze this git diff and group the changes into logical commits.
Rules:
- Each group must be a coherent, self-contained unit of work
- Use Conventional Commits format: type(scope): description
- Types: feat, fix, refactor, chore, docs, style, test, perf, ci, build
- Scope is optional but recommended (e.g., feat(auth): add login)
- Description must be lowercase, imperative mood, no period at end
- Keep descriptions under 72 characters
- If all changes belong to one logical unit, return a single group
- Order groups so that foundational changes come first
Return ONLY a JSON array (no markdown fences) with this structure:
[
{
"type": "feat",
"scope": "optional-scope",
"message": "add user authentication flow",
"files": ["src/auth.ts", "src/middleware.ts"],
"reason": "These files together implement the auth feature"
}
]
Files changed:
{FILE_LIST}
Diff:
{DIFF_CONTENT}
After receiving the subagent's response:
Proposed commits:
1. feat(auth): add login endpoint
Files: src/auth.ts, src/middleware.ts
2. chore(deps): update typescript to v5.8
Files: package.json, pnpm-lock.yaml
AskUserQuestion tool to ask the user to confirm, modify, or reject the planFor each approved commit group, in order:
git add <files>
git commit -m "<type>(scope): message"
Append the Co-Authored-By trailer to the final commit message, naming the model that is actually running (Claude Code gives the exact line), e.g.:
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use HEREDOC format for commit messages to ensure proper formatting.
Run git log --oneline -N (where N = number of new commits) to confirm all commits
were created successfully. Show the result to the user.
AskUserQuestion — when confirmation or input is needed, always use
the AskUserQuestion tool instead of plain text questionsmodel: "sonnet" for the analysis subagent to keep cost low
while maintaining qualityWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
2 skills in this plugin
/workflow:smart-commitfrom workflow
npx claudepluginhub naporin0624/astro-agent-starter --plugin workflow