Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add xdg/xdg-claude --skill how-to-commitgit clone --depth 1 https://github.com/xdg/xdg-claudeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/xdg/xdg-claude/how-to-commit)<a href="https://agentmods.dev/skills/xdg/xdg-claude/how-to-commit"><img src="https://agentmods.dev/badge/skills/xdg/xdg-claude/how-to-commit/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/xdg/xdg-claude/how-to-commit"><img src="https://agentmods.dev/badge/skills/xdg/xdg-claude/how-to-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.00964 |
| Opus 5.5 | $0.00016 | $0.00386 |
| Sonnet 5.5 | $0.00008 | $0.00193 |
| Haiku 4.5 | $0.00004 | $0.00096 |
Grade A, and why
how-to-commit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Handling commit requests
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.
Run the subagent in the foreground
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.
When to delegate vs. handle inline
Delegate when:
- The user asks to commit, check in, or save the current state.
- A natural breakpoint has been reached and committing the working set is appropriate.
- The user names a scope ("commit the auth changes", "commit just the tests").
Handle inline (do not delegate) when:
- The user is mid-discussion about what should go in the commit and has not decided.
- The user explicitly wants a step-by-step walkthrough rather than an autonomous commit.
- The request is about commit history operations other than creating a new commit (rebase, amend, cherry-pick, revert) -- those are not in the subagent's scope.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 19d ago Changed · +4 lines 0ee473090988
- 1mo ago Changed 3baa1e3988a3
- 2mo ago First seen · 50 lines · 39 tokens per session scan A 8a4aec82de74
how-to-commit is a skill published in the GitHub repository xdg/xdg-claude (20 stars, last pushed 6d ago), licensed Apache-2.0. It adds 39 tokens to every session and 964 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
how-to-commit compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| how-to-commitxdg/xdg-claude | Skill | 20 | 6d ago | Apache-2.0 | A | 39 | Claude Code |
| create-prprisma/orm | Skill | 48k | yesterday | Apache-2.0 | A | 48 | Claude Code, Codex |
| git-commitThinkInAIXYZ/deepchat | Skill | 6.4k | yesterday | Apache-2.0 | A | 15 | Claude Code, Codex |
| repo-syncdavidondrej/skills | Skill | 4.3k | 3d ago | MIT | A | 25 | Claude Code, Codex |
| engineer-bot-opsmakecindy/cindy | Skill | 9.3k | yesterday | Apache-2.0 | A | 57 | Claude Code, Codex |
| mcore-split-prNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 25 | Claude Code |
| git-commit-writermergisi/awesome-openclaw-agents | Skill | 4.1k | 2d ago | MIT | A | 53 | Claude Code, Codex |