commit

commit is a skill for Claude Code from XRenSiu/claude-code-forge. It costs 216 tokens per session (3,081 once invoked), scanned A, original, MIT.

A skill for making one focused, reviewable Git commit. Git is a version-control system; this skill checks the staged files, commit message format, secrets, debug code, file permissions, and—when used in its larger workflow—change locks and file boundaries.

In plain words
What is it for?
Use it when committing a change that should describe one concern, follow Conventional Commits, contain only relevant files, and pass the available mechanical checks.
Why use it?
It helps prevent unrelated edits, secrets, debugging leftovers, and contract changes from being hidden in a single hard-to-review commit.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions .claude-plugin; mentions CLAUDE.md.

Part of the ai-dlc plugin — 30 skills, 5 agents shipped together

Good fit Use it when committing a change that should describe one concern, follow Conventional Commits, contain only relevant files, and pass the available mechanical checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xrensiu/claude-code-forge/commit
Install

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.

Any agent
npx skills add XRenSiu/claude-code-forge --skill commit
Clone the repo
git clone --depth 1 https://github.com/XRenSiu/claude-code-forge

Made for: Claude Code.

Or install ai-dlc, the plugin that ships this one along with the rest of its 30 skills, 5 agents.

Wrote 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.

agentmods badge for commit

README.md
[![agentmods](https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/commit/github.svg)](https://agentmods.dev/skills/xrensiu/claude-code-forge/commit)
Your own site
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/commit"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/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.

agentmods 80×15 button for commit

Your own site · 80×15
<a href="https://agentmods.dev/skills/xrensiu/claude-code-forge/commit"><img src="https://agentmods.dev/badge/skills/xrensiu/claude-code-forge/commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 216 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00216 $0.03081
Opus 5.5 $0.00086 $0.01232
Sonnet 5.5 $0.00043 $0.00616
Haiku 4.5 $0.00022 $0.00308

Measured 1mo ago against content hash 415d128683fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/commit.sh, scripts/verify_commit.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/ai-dlc/skills/commit/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

commit — 一个关注点,一条能审的记录,三道落地前的闸

产物是一个 git commit:消息按 Conventional Commits 的形状(产物序),暂存集只含这个关注点的 文件。本文件写:commit 在这条流水线里是什么、什么算对、原语与出口、不可豁免的边界。分几次 提、先提哪个是你的份额。

缺口(Judgment + Capability)

deletion 测试:撤掉本 skill,引擎 git add -A && git commit -m "fix stuff"——把三张卡的改动、 一个误留的 .env、一处 console.log 和一条改了 done_when.yaml 的行一起提进去。review 无法 按关注点读,锁形同虚设,白名单从未在落地前被检查。缺的是判据(原子 / 消息 / 不该进的东西) 和把机械半边编译掉的原语。

世界(Σ:git 的性质,不是流程规定)

  • 暂存是按 hunk 的:git add -p 可以只提一个文件里属于本关注点的块。一个 diff 含两个 关注点 → 两次提交,不是一条长消息。
  • 本地 commit 可逆、push 不可逆、amend 改写历史:未推送的 commit 可 --amend / reset --soft; 已推送的永不 amend / rebase(毁 review 锚点、毁协作者基线)。
  • HEAD 不一定是你的提交:同一 checkout 被多个并行 session 共用时,你上一条提交之后对方可能已经 提了几条,--amend 落在对方的 HEAD 上,把他们的消息改成你的(dogfood 2026-09-06,I-53: 一次 amend 覆盖了另一个 session 的报告提交,靠 reflog 找回)。同一工作区还共用一个 git 索引, 你 git add 的东西会进对方的提交。世界的性质是"工作区与索引是进程间共享的可变状态",不是流程规定。
  • 门与落地必须是同一个动作:verify → 读退出码 → commit 三步分开写时,中间任何一层管道 (| jq、| tail)都会把退出码换成最后一段的——被拒的提交照样落地(I-50)。
  • 消息是给六个月后的人读的:subject 说做了什么(祈使、≤ 72 字符、不加句号),body 说 为什么与取舍,footer 说关联(Refs #N / Closes #N)与 breaking change。
  • 卡与锁(在 /ai-dlc 里跑时):卡的 allowed_files 是白名单执行器的输入;.done_when.lock 列出的文件是 G2 冻结物,同一 diff 改它们必须带 change-proposal-*.md。
  • 红-绿证据(TDD 模式下):新增测试的 commit 先于实现的 commit,且前者在基线上必须失败—— 这是堵"driver 写成空断言"的主防线。本 skill 不做红-绿脚本;references/conventions.md 写了手工做法与记录格式(登记为空白)。
  • 关于用户的 Σ:"提一下""存个档"= 用户要的是安全点,不是发布;WIP 允许但消息也要能读 (wip(scope): …),且不进 main。

判据(φ)

  • 原子:暂存文件属于一个关注点;跨 > 3 个顶层目录且无 scope → 可疑(flag,非拒)。
  • 消息:type(scope)?: subject,type ∈ feat/fix/docs/style/refactor/perf/test/chore/ci/build/revert(+ wip 仅限非 main); subject ≤ 72、无句号;body 行 ≤ 100(flag);有 issue 时 footer 含 Refs #N 或 Closes #N(flag); ! 或 BREAKING CHANGE: 时 body 必须解释。
  • 不该进的东西(拒):secret 形态的字符串(AWS / GitHub / Slack / OpenAI token、私钥块); debugger; / pdb.set_trace() / binding.pry;.env、*.pem、id_rsa;node_modules/、 构建产物(除非仓库约定提交)。console.log / print( 新增行 → flag。
  • 白名单(--card):每个暂存文件匹配 allowed_files 且不匹配 forbidden_files;溢出即拒。
  • 锁(--lock):锁内文件被改 → 无变更提案同 diff → 拒;有 → 放行并提示登记 task 回流。 放行时输出集合级 lock_detail:locked_changed(暂存集 ∩ 锁内路径)、proposal_files、 proposal_missing_path(变更提案没提到的被改锁内路径 → flag)。复核提案的人不该手算这个交集。
  • 不在 main / master / develop 上提交(拒,除 --allow-main)。
  • 插件版本同步(本仓库的 CLAUDE.md 规则,编译在预门里):diff 触及 plugins/<p>/skills/** 而 plugins/<p>/.claude-plugin/plugin.json 的 version 未变 → --range / PR 闸门拒;暂存模式只 flag (CLAUDE.md 明写版本 bump 单独提交,暂存模式看不到那一条,拒了就等于拒绝它自己规定的流程)。 marketplace.json 的 version 与 plugin.json 不一致同样拒;skill 自身 SKILL.md 的 frontmatter version 未动 → flag。理由是插件缓存按版本号取目录:不 bump 的修复,装着旧版本的用户永远收不到。
  • amend(拒):--amend 必须声明你以为 HEAD 是哪条(--expect-subject), git log -1 --format=%s 对不上就停——共享 checkout 里那可能是别人的提交。
  • 体量:新增 > 800 行 → flag "考虑拆"。
  • 残差(人 / judge):消息说的"为什么"是不是真的;两个文件到底算不算一个关注点。

Read the full file on GitHub · 127 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 1mo ago Changed 415d128683fc
  2. 1mo ago Changed · +29 lines 5f2f58c97f6b
  3. 1mo ago First seen · 98 lines · 216 tokens per session scan A 706ff33c4868

Subscribe to this mod's changes

commit is a skill published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 1mo ago), licensed MIT. It adds 216 tokens to every session and 3,081 once invoked, about $0.0009 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-09-05.