Agent skill

Commit

by ZhangShenao in ZhangShenao/harness9

A skill your agent uses when the user invokes /commit or asks to commit changes, after a code review has been completed and the changes are confirmed ready to stage and commit to git.

MITAuto-check: notesDevelopment

Install Commit

skills CLI
$ npx skills add ZhangShenao/harness9 --skill commit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ZhangShenao/harness9 commit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ZhangShenao/harness9.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/commit .claude/skills/commit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
commit
GitHub stars
141
Token cost
~327 tokens
SKILL.md length
96 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user invokes /commit or asks to commit changes, after a code review has been completed and the changes are confirmed ready to stage and commit to git.

  • Works in 5 steps: 确认变更范围 → 精确暂存文件 → 起草提交信息 → …
  • The user invokes /commit
  • SKILL.md covers Overview, 前置条件检查, 执行步骤 and 常见错误
  • Calls git

What it does

Commit is an agent skill from ZhangShenao/harness9. Use when the user invokes /commit or asks to commit changes, after a code review has been completed and the changes are confirmed ready to stage and commit to git.

Its SKILL.md is about 330 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Commit messages and Code review. It works with Git. The repository describes itself as: Local-First · 轻量级 · 功能完备 · 生产可用的通用 Agent 框架. The licence is MIT.

When your agent uses it

  • The user invokes /commit
  • Asks to commit changes
  • After a code review has been completed and the changes are confirmed ready to stage and commit to git

Example prompts

  • “/commit”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 确认变更范围
  2. 精确暂存文件
  3. 起草提交信息
  4. 执行提交
  5. 确认结果

What it can do on your machine

Read from SKILL.md and the folder at commit 5a51b57. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Commit loads about 327 tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 96 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~327

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:37
    - `.env`、包含敏感信息的文件 → 不暂存,提示用户确认

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ZhangShenao/harness9 at commit 5a51b57, republished under its MIT licence (© ZhangShenao). 96 words, ~327 tokens.

Download SKILL.mdSave it as .claude/skills/commit/SKILL.md (or your agent's skills folder).
name
commit
description
Use when the user invokes /commit or asks to commit changes, after a code review has been completed and the changes are confirmed ready to stage and commit to git.

commit — Stage & Commit

Overview

在 Code Review 通过后,将有效的代码变更暂存并提交到本地 Git 仓库。

前置条件检查

  1. 确认本次对话中已执行过 /cr(Code Review)
  2. 若 Review 报告存在 Critical 问题,停止执行,提示用户先修复
  3. 若未执行过 /cr,先调用 cr skill 完成 Review,再继续

执行步骤

1. 确认变更范围
bash
git status
git diff --stat
git diff --cached --stat
2. 精确暂存文件

不使用 git add -A 或 git add .,逐文件或逐目录添加:

bash
git add <具体文件或目录>

排除规则:

  • .env、包含敏感信息的文件 → 不暂存,提示用户确认
  • 与本次功能无关的临时文件 → 不暂存
3. 起草提交信息

参考以下格式(优先遵循仓库现有风格,通过 git log --oneline -10 判断):

<type>: <简明描述>(50 字符以内)

<可选正文:说明 why,不是 what>

常用 type:feat / fix / docs / refactor / test / chore

禁止在提交信息中添加任何 AI 工具相关的署名,例如 Co-Authored-By: Claude 或类似内容。

4. 执行提交
bash
git commit -m "$(cat <<'EOF'
<提交信息>
EOF
)"
5. 确认结果
bash
git log --oneline -3   # 确认提交已记录
git status             # 确认工作区干净

输出提交的 hash 与摘要,告知用户提交成功。

常见错误

问题处理
pre-commit hook 失败修复 hook 报告的问题,重新 git add 后创建新 commit,不使用 --amend
暂存了不该提交的文件git restore --staged <file> 取消暂存,重新操作
工作区已无变更告知用户没有可提交的内容

© ZhangShenao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/commit of ZhangShenao/harness9.

Open the folder on GitHubat commit 5a51b57

Compare with similar skills

Commit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Commit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Commit this skillZhangShenao/harness9141—~327Automated safety check: NotesMIT
GitHub Workflowtransilienceai/communitytools559—~812Automated safety check: NotesMIT
Ship Thisplanetabhi/riseofmachine111—~2.9kAutomated safety check: PassCustom licence
Aube Bumpnubjs/nub4.4k—~4.3kAutomated safety check: WarnMIT
Dev Code Reviewhashgraph-online/awesome-codex-plugins1.2k—~1.7kAutomated safety check: PassApache-2.0
Cr Commit CheckLeoYeAI/openclaw-master-skills2.2k—~943Automated safety check: PassMIT

Similar skills

  • GitHub Workflow

    transilienceai/communitytools

    GitHub workflow automation — branching, committing, pushing, pull requests, issues, and code review.

    559 GitHub stars~812 tokensUpdated 2 mo ago
    DevelopmentAuto-check: notes
  • Ship This

    planetabhi/riseofmachine

    Load this skill before shipping a UI change, to statically review the diff for design-craft regressions (accessibility, motion, responsive, and visual or UX drift), correctness and security issues…

    111 GitHub stars~2.9k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Aube Bump

    nubjs/nub

    Bump nub's vendored aube engine to a newer jdx/aube upstream.

    4.4k GitHub stars~4.3k tokensUpdated today
    DevelopmentAuto-check: warnings
  • Dev Code Review

    hashgraph-online/awesome-codex-plugins

    Review a requested Git diff for bugs, regressions, integration gaps, and material risks before commit.

    1.2k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Cr Commit Check

    LeoYeAI/openclaw-master-skills

    【Code Review 子 Agent · 门控一】校验本迭代所有 commit 是否符合 Conventional Commits 规范及项目可追溯性格式。输入 git log 片段和项目元数据,输出结构化校验报告并以 STATUS=OK|FAIL 结尾。由 spec-driven-dev 的 codereview 阶段自动调用,不建议单独触发。

    2.2k GitHub stars~943 tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Spec Driven Dev

    LeoYeAI/openclaw-master-skills

    在克隆的 Git 仓库中驱动完整的规格驱动开发生命周期(init→requirements→architecture→processdesign→projectplan→coding→test→bugfix→codereview→release)。阶段门控、产物强制输出、多语言支持,内置 commit message 检查、代码门控与 LOGAF Checklist 评审,支持任意阶段…

    2.2k GitHub stars~4.8k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from ZhangShenao/harness9

  • Architecture Overview

    ZhangShenao/harness9

    A skill your agent uses when asked about harness9 architecture, module design, or how components interact — explains the system design

    141 GitHub stars~717 tokensUpdated today
    Auto-check passed
  • Debugging Guide

    ZhangShenao/harness9

    A skill your agent uses when debugging Go errors, test failures, or unexpected behavior — step-by-step diagnosis approach

    141 GitHub stars~563 tokensUpdated today
    Auto-check passed
  • Go Coding Standards

    ZhangShenao/harness9

    A skill your agent uses when writing or reviewing Go code — explains harness9 project coding conventions and patterns

    141 GitHub stars~719 tokensUpdated today
    Auto-check passed
  • Cr

    ZhangShenao/harness9

    A skill your agent uses when the user invokes /cr, requests a code review, or before committing to verify correctness, security, and quality of new or modified code in the working tree.

    141 GitHub stars~304 tokensUpdated today
    Auto-check: notes
  • PR

    ZhangShenao/harness9

    A skill your agent uses when the user invokes /pr or asks to push changes and open a pull request, after commits are ready to be pushed to a remote branch and merged into the main branch.

    141 GitHub stars~423 tokensUpdated today
    Auto-check passed
  • Autodev

    ZhangShenao/harness9

    Feature auto-development — clarify requirements, generate spec, dispatch dev sub-agent to implement and merge into current branch

    141 GitHub stars~606 tokensUpdated today
    Auto-check: notes

Works with

Categories

Questions about Commit

What does Commit do?

A skill your agent uses when the user invokes /commit or asks to commit changes, after a code review has been completed and the changes are confirmed ready to stage and commit to git. Commit is an agent skill from ZhangShenao/harness9. Use when the user invokes /commit or asks to commit changes, after a code review has been completed and the changes are confirmed ready to stage and commit to git.

When should I use Commit?

Commit fits situations like: the user invokes /commit; asks to commit changes; after a code review has been completed and the changes are confirmed ready to stage and commit to git.

How do I install Commit in Claude Code?

Run `npx skills add ZhangShenao/harness9 --skill commit -a claude-code`. Or copy the skill folder (skills/commit in ZhangShenao/harness9) into .claude/skills/commit in your project. Claude Code loads it when a task matches its description.

How do I install Commit in Codex?

Run `npx skills add ZhangShenao/harness9 --skill commit -a codex`. Or copy the skill folder (skills/commit in ZhangShenao/harness9) into .agents/skills/commit in your project. Codex loads it when a task matches its description.

Can I use Commit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ZhangShenao/harness9 --skill commit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/commit, .gemini/skills/commit, .github/skills/commit and .opencode/skills/commit in your project.

What does Commit need to run?

Going by SKILL.md and its folder, Commit needs the command-line tools its instructions call (git).

Does Commit access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Commit safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Commit use?

Commit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Commit use?

About 327 tokens (SKILL.md is roughly 1.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Commit?

Skills that share tags, products or a category with Commit: GitHub Workflow (transilienceai/communitytools, 559 stars), Ship This (planetabhi/riseofmachine, 111 stars), Aube Bump (nubjs/nub, 4.4k stars) and Dev Code Review (hashgraph-online/awesome-codex-plugins, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Commit?

ZhangShenao (a GitHub user) maintains it in ZhangShenao/harness9, which has 141 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 7, 2026.

Source: ZhangShenao/harness9 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.