commit

commit is a command for Claude Code from fengshao1227/ccg-workflow. It costs 17 tokens per session (1,327 once invoked), scanned A, original, MIT.

A Git commit command that reviews your changes and creates a Conventional Commits message, a standard format for describing what a change does.

In plain words
What is it for?
Checking repository state, staging changes, suggesting how to split them, and creating or amending commits with options such as scope, type, sign-off, or emoji.
Why use it?
It reduces the manual work of inspecting changes, staging files, writing commit messages, and spotting unrelated changes that may belong in separate commits.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ccg plugin — 58 skills, 12 commands, 7 agents shipped together

Good fit Checking repository state, staging changes, suggesting how to split them, and creating or amending commits with options such as scope, type, sign-off, or emoji.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/fengshao1227/ccg-workflow/commit
About the project

CCG is a command-line workflow engine that coordinates Claude, Codex, Gemini, and other models as specialized collaborators on coding tasks. It is used to analyze requests, choose a strategy, delegate work to model-specific roles, and combine their results. The catalogue entries provide the skills, commands, agents, and plugin that implement this workflow.

fengshao1227/ccg-workflow · 5,947 stars · on GitHub · ccg.fengshao1227.com

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.

Clone the repo
git clone --depth 1 https://github.com/fengshao1227/ccg-workflow

Made for: Claude Code.

Or install ccg, the plugin that ships this one along with the rest of its 58 skills, 12 commands, 7 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/commands/fengshao1227/ccg-workflow/commit/github.svg)](https://agentmods.dev/commands/fengshao1227/ccg-workflow/commit)
Your own site
<a href="https://agentmods.dev/commands/fengshao1227/ccg-workflow/commit"><img src="https://agentmods.dev/badge/commands/fengshao1227/ccg-workflow/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/commands/fengshao1227/ccg-workflow/commit"><img src="https://agentmods.dev/badge/commands/fengshao1227/ccg-workflow/commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,327 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.00017 $0.01327
Opus 5.5 $0.00007 $0.00531
Sonnet 5.5 $0.00003 $0.00265
Haiku 4.5 $0.00002 $0.00133

Measured 1mo ago against content hash 59548e39c6d2, 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.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • commit — 100% identical, 0 lines differ
templates/commands/commit.md · 152 lines

How it starts

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

Commit - 智能 Git 提交

分析当前改动,生成 Conventional Commits 风格的提交信息。

使用方法

/commit [options]

选项

选项 说明
--no-verify 跳过 Git 钩子
--all 暂存所有改动
--amend 修补上次提交
--signoff 附加签名
--emoji 包含 emoji 前缀
--scope <scope> 指定作用域
--type <type> 指定提交类型

执行工作流

🔍 阶段 1:仓库校验

[模式:检查]

  1. 验证 Git 仓库状态
  2. 检测 rebase/merge 冲突
  3. 读取当前分支/HEAD 状态

📋 阶段 2:改动检测

[模式:分析]

  1. 获取已暂存与未暂存改动
  2. 若暂存区为空:
    • --all → 执行 git add -A
    • 否则提示选择

✂️ 阶段 3:拆分建议

[模式:建议]

按以下维度聚类:

  • 关注点(源代码 vs 文档/测试)
  • 文件模式(不同目录/包)
  • 改动类型(新增 vs 删除)

若检测到多组独立变更(>300 行 / 跨多个顶级目录),建议拆分。

✍️ 阶段 4:生成提交信息

[模式:生成]

格式:[emoji] <type>(<scope>): <subject>

  • 首行 ≤ 72 字符
  • 祈使语气
  • 消息体:动机、实现要点、影响范围

语言:根据最近 50 次提交判断中文/英文

📦 阶段 5:Context 自动归档(若 .context/ 存在)

[模式:上下文归档]

前置判断:

  • 若 .context/ 目录不存在 → 在提交成功后输出提示:💡 建议执行 /ccg:context init 启用决策追踪,不阻断
  • 若 .context/ 存在 → 执行以下步骤

从 git diff 自动生成 ContextEntry:

  1. 获取当前分支名:git branch --show-current
  2. 获取暂存区变更:git diff --cached --stat + git diff --cached(完整 diff)
  3. 分析 diff 生成 ContextEntry:
    • summary:从阶段 4 生成的 commit message 中取首行
    • decisions:分析 diff 中的关键变更(新增依赖、架构调整、接口变更、配置修改),推断决策理由
    • bugs:若 commit type 为 fix,从 diff 中提取 bug 症状、根因、修复方式
    • changes.files:从 git diff --cached --name-only 提取
    • tests:若变更包含测试文件,记录测试相关信息
  4. 合并 session.log(可选):若 .context/current/branches/<branch>/session.log 存在且非空,将其中的手动记录合并到 decisions/bugs 中,然后清空 session.log
  5. 脱敏:扫描 token/key/password/secret 模式 → 替换为 [REDACTED]
  6. 追加:将 ContextEntry 作为一行追加到 .context/history/commits.jsonl
  7. 重生成:更新 .context/history/commits.md 人类视图
  8. 暂存:git add .context/history/
  9. Trailer:在 commit message 中添加 Context-Id: <uuid> trailer

ContextEntry 格式参见 /ccg:context 命令中的 Schema 定义。

失败降级:若归档过程出错,不阻断提交。写入 minimal ContextEntry(仅 summary + files),继续正常提交。

✅ 阶段 6:执行提交

[模式:执行]

git commit [-S] [--no-verify] [-s] -F .git/COMMIT_EDITMSG

Read the full file on GitHub · 152 lines

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 First seen · 152 lines · 17 tokens per session scan A 59548e39c6d2

Subscribe to this mod's changes

commit is a command published in the GitHub repository fengshao1227/ccg-workflow (5,947 stars, last pushed 6d ago), licensed MIT. It adds 17 tokens to every session and 1,327 once invoked, about $0.0001 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.