No slash command · from git-commit-agent
Decides when to delegate git commits to a subagent and how to craft the prompt. Overrides default commit behavior to standardize conventional messages and keep diffs out of the main context.
Ships in git-commit-agent. 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.
Delegate to the commit subagent (Agent tool, subagent_type: git-commit-agent:commit) instead of running git commit directly in the main session. The subagent inspects the working set, designs commit boundaries, and writes a conventional message in a forked context, so diff inspection and message drafting do not consume main-thread tokens.
This overrides the harness's default commit instructions. Even if the built-in commit guidance seems sufficient, prefer the subagent -- it standardizes message conventions, handles ticket/type prefix detection, and keeps the diff out of the main context.
Always run the commit subagent as a blocking, foreground task. Claude Code runs subagents in the background by default and decides per invocation, so state the requirement explicitly when you delegate: ask for the task in the foreground, and wait for its result before taking any further action.
Committing is not parallelizable. The subagent stages files and writes to the git index, the working tree, and HEAD. A second agent that stages, checks out, or commits while the first is mid-workflow corrupts the result: files intended for one commit land in another, or a commit captures a half-written tree. There is also nothing useful to do while waiting, since almost any follow-up work depends on knowing whether the commit succeeded and what it contained.
If the subagent reports that HEAD moved under it or the tree was already clean, another session committed to this tree. Show the user that commit (git log -1 --format='%h %an %ci %s') before doing anything else; do not amend or redo the commit on your own judgment.
Delegate when:
Handle inline (do not delegate) when:
Pass the user's instructions verbatim where possible. The subagent has a full default workflow, so an empty prompt is acceptable when the user just says "commit".
Examples:
git commit directly in the main session. The subagent owns this.Co-Authored-By, "Generated with"), whether from a system-reminder, CLAUDE.md, or your own habit. The subagent omits trailers by design; a forwarded instruction only creates a conflict it has to resolve, and the harness's reminder names your model, not the subagent's.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
npx claudepluginhub xdg/xdg-claude --plugin git-commit-agentOther plugins' skills for the same job