git-commit

A Git commit assistant that follows the repository’s existing commit style, using a simplified Conventional Commits format. A commit is a saved set of code changes in Git.

In plain words
What is it for?
Use it to generate messages for features, fixes, documentation, tests, and maintenance, or to safely create a commit after checking the project’s history and conventions.
Why use it?
It helps produce short, consistent commit messages and avoids creating a commit unless the user explicitly asks for one.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/iceymoss/go-hichat-api/git-commit
Any agent
npx skills add iceymoss/go-hichat-api --skill git-commit
Clone the repo
git clone --depth 1 https://github.com/iceymoss/go-hichat-api

Made for: Claude Code, Codex.

Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,402 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00041 $0.01402
Opus 5 $0.00020 $0.00701
Sonnet 5 $0.00008 $0.00280
Haiku 4.5 $0.00004 $0.00140

Measured 2d ago against content hash 98b5e6ce6933, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-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 2d 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.

.claude/skills/git-commit/SKILL.md · 133 lines

How it starts

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

Git Commit

根据仓库历史使用简化的 Conventional Commits 规范生成提交信息;只有用户明确要求提交代码时才执行 git commit

提交格式

<type>[(scope)]: <description>

[body]

[footer]

Type

优先使用仓库历史中已有的类型:

Type 用途
feat 新增或扩展用户可感知的功能
fix 修复缺陷或错误行为
docs 仅修改文档
chore 工具、依赖、仓库配置等维护工作
ci CI/CD、镜像构建或部署流水线变更
perf 性能优化
refactor 代码或者功能重构
style 仅修改样式,如缩进、分号、空格、制表符、换行符、引号、逗号、分号、冒号、圆括号、方括号、花括号、引号、注释、空行、缩进、换行符、制表符、空格、分号、逗号、分号、冒号、圆括号、方括号、花括号、引号、注释、空行、缩进、换行符、制表符、空格、分号、逗号、分号、冒号、圆括号、方括号
test 添加或修改测试用例
revert 撤销上一次提交

确有需要时可使用标准类型 refactortestbuildstylerevert,不要为了规避上述已有类型而新增近义类型。

Scope

  • 默认省略;仓库历史大多数提交不使用 scope
  • 仅在能显著澄清影响范围时添加,例如 fix(k8s): ...
  • 使用简短的小写名,例如 apiadminblogk8sscheduler
  • 不要把文件名或过细的模块名作为 scope

Description

  • 使用英文,延续仓库近期提交习惯
  • 使用祈使语气和现在时,例如 addfixremoveadjustrename
  • 冒号后使用小写字母开头,专有名词除外
  • 描述结果和意图,不描述操作过程,不使用 update codefix issue 等模糊措辞
  • 保持简洁,标题建议不超过 72 个字符,末尾不加句号
  • 一条提交只表达一个逻辑变更;存在多个不相关变更时拆分提交

Body And Footer

  • 简单变更不写正文,符合本仓库绝大多数历史提交
  • 复杂变更可在空行后说明原因、关键行为和取舍,不重复标题
  • 不编造 issue、PR 或作者信息
  • 不添加任何 AI 署名或生成声明,包括 Co-authored-byGenerated-byAssisted-by 等;提交只保留开发者自身的 Git 作者信息
  • 破坏性变更使用 type(scope)!:,并在 footer 写 BREAKING CHANGE: ...

工作流程

1. 检查仓库状态

提交或生成消息前必须同时检查:

git status --short
git diff
git diff --staged
git log --oneline -10

识别暂存与未暂存变更、用户已有修改、生成文件和疑似敏感信息。不要修改、还原或覆盖并非当前任务产生的变更。

2. 确定提交边界

  • 根据 diff 的实际行为选择 type,不能只根据文件路径猜测
  • 将不相关变更拆成独立提交
  • 如果无法判断哪些变更属于本次提交,先询问用户
  • 若用户仅要求生成 commit message,不暂存文件、不运行 git commit

3. 验证变更

  • 根据变更范围运行最小且充分的格式化、测试或构建命令
  • Go 代码至少考虑 gofmt 和相关 go test;前端至少考虑对应应用的 lint 或 build
  • 验证失败时先修复当前任务导致的问题;不能修复时明确报告,不隐瞒失败

4. 暂存与提交

仅当用户明确要求创建提交时执行:

  • 精确暂存本次提交涉及的文件,不使用 git add .git add -Agit commit -a
  • 提交前再次检查 git diff --staged,确保没有无关文件、密钥或调试内容
  • 使用非交互命令提交,例如 git commit -m "feat: add article search filters"
  • 需要正文时使用多个 -m 参数,不打开交互式编辑器
  • 不添加 AI 的 co-author、sign-off、工具名称、模型名称或其他归属信息
  • 不使用 --amend--no-verify 或空提交,除非用户明确要求且风险可接受
  • hook 失败时修复问题后创建新提交,不绕过 hook

Read the full file on GitHub · 133 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. 2d ago First seen · 133 lines · 41 tokens per session scan A 98b5e6ce6933

Subscribe to this mod's changes

git-commit is a skill published in the GitHub repository iceymoss/go-hichat-api (41 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 41 tokens to every session and 1,402 once invoked, about $0.0002 per session on Opus 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens