commit

commit is a skill for Claude Code, Codex from ZhangShenao/harness9. It costs 36 tokens per session (1,922 once invoked), scanned B, original, MIT.

A Git workflow that stages selected files and creates a local commit after the code has passed review. Git is a tool for tracking changes to code.

In plain words
What is it for?
Use it to inspect changed files, stage only the intended ones, write a commit message, create the commit, and confirm the resulting commit and workspace status.
Why use it?
It helps avoid committing unrelated files or sensitive files such as environment settings. It also checks that a review was completed and reports whether the commit succeeded.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect changed files, stage only the intended ones, write a commit message, create the commit, and confirm the resulting commit and workspace status.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhangshenao/harness9/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 ZhangShenao/harness9 --skill commit
Clone the repo
git clone --depth 1 https://github.com/ZhangShenao/harness9

Made for: Claude Code, Codex.

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/zhangshenao/harness9/commit/github.svg)](https://agentmods.dev/skills/zhangshenao/harness9/commit)
Your own site
<a href="https://agentmods.dev/skills/zhangshenao/harness9/commit"><img src="https://agentmods.dev/badge/skills/zhangshenao/harness9/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/zhangshenao/harness9/commit"><img src="https://agentmods.dev/badge/skills/zhangshenao/harness9/commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,922 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00036 $0.01922
Opus 5.5 $0.00014 $0.00769
Sonnet 5.5 $0.00007 $0.00384
Haiku 4.5 $0.00004 $0.00192

Measured 14d ago against content hash d8dad7a8b969, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

commit scanned grade B with 1 finding 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 14d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 700 "$AUDIT_DIR"
.dsh/skills/commit/SKILL.md · 167 lines

How it starts

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

Commit Reviewed Changes

DSH 斜杠命令:输入 /commit 会把本技能全文注入当前回合,/commit 之后的文本作为参数;模型也可按描述自动加载。

Overview

Create one local commit containing only the intended, reviewed changes. Treat review, exact staging, and post-commit evidence as mandatory gates even when asked to hurry or bypass them.

Workflow

  1. Inspect the repository before changing Git state:

    git status --porcelain=v1 -z --untracked-files=all
    git diff --stat
    git diff --cached --stat
    git log -10 --pretty=format:'%s'
    

    Derive the intended file set from the current task. Parse the NUL-delimited status as Git's XY record, not by splitting filenames. Before any staging:

    • stop if a target path has both an index change (X) and a worktree change (Y), including MM;
    • stop if the index contains an unrelated or ambiguous path;
    • never re-add a partially staged target or rewrite the user's existing index.

    Ask the user to resolve ambiguity. Never equate "all changes" with the intended scope.

  2. Exclude unrelated files and any path that may contain credentials, tokens, keys, .env data, or other secrets. Do not inspect a suspected secret merely to decide whether to stage it; report the path and leave it untouched.

  3. Stage each unstaged intended file with literal pathspec semantics:

    git --literal-pathspecs add -- "$path"
    

    Pass exactly one explicit file path per invocation. Never use plain git add -- "$path" because names such as :(glob)* are pathspec magic. Never use git add -A, git add ., git add -u, a directory, or a glob.

  4. Audit the index and reject an empty staged diff:

    git diff --cached --name-status
    git diff --cached --stat
    git diff --cached --check
    

    Compare the staged paths with the intended reviewed set. Commit only when they match exactly and the staged diff is non-empty.

  5. Record the exact candidate commit before final review:

    AUDIT_DIR=
    cleanup_audit() {
      [ -n "$AUDIT_DIR" ] || return 0
      if ! python3 - "$AUDIT_DIR" <<'PY'
    import os
    import stat
    import sys
    
    audit_dir = sys.argv[1]
    descriptor = os.open(
        audit_dir,
        os.O_RDONLY
        | getattr(os, "O_DIRECTORY", 0)
        | getattr(os, "O_NOFOLLOW", 0),
    )
    for name in ("expected-paths", "current-paths", "actual-paths"):
        try:
            metadata = os.stat(
                name,
                dir_fd=descriptor,
                follow_symlinks=False,
            )
        except FileNotFoundError:
            continue
        if not stat.S_ISREG(metadata.st_mode):
            raise SystemExit("unexpected audit artifact type")
        os.unlink(name, dir_fd=descriptor)
    os.close(descriptor)
    os.rmdir(audit_dir)
    PY
      then
        return 1
      fi
      test ! -e "$AUDIT_DIR" || return 1
      AUDIT_DIR=
    }
    trap cleanup_audit EXIT
    trap 'exit 129' HUP
    trap 'exit 130' INT
    trap 'exit 143' TERM
    previous_umask=$(umask)
    umask 077
    AUDIT_DIR=$(mktemp -d)
    umask "$previous_umask"
    chmod 700 "$AUDIT_DIR"
    test "$(stat -f '%Lp' "$AUDIT_DIR" 2>/dev/null || stat -c '%a' "$AUDIT_DIR")" = 700
    BASE_HEAD=$(git rev-parse HEAD)
    EXPECTED_TREE=$(git write-tree)
    git diff --cached --name-only -z --no-renames > "$AUDIT_DIR/expected-paths"
    

Read the full file on GitHub · 167 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. 14d ago Changed · +88 lines · +1 tokens per session scan A → B d8dad7a8b969
  2. 3mo ago First seen · 79 lines · 35 tokens per session scan A c960915e2c5d

Subscribe to this mod's changes

commit is a skill published in the GitHub repository ZhangShenao/harness9 (166 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 1,922 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

commit compared with skills from other repositories

commit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
commitZhangShenao/harness9Skill166yesterdayMITB36Claude Code, Codex
create-prprisma/ormSkill48kyesterdayApache-2.0A47Claude Code, Codex
git-commitThinkInAIXYZ/deepchatSkill6.4kyesterdayApache-2.0A15Claude Code, Codex
engineer-bot-opsmakecindy/cindySkill11ktodayApache-2.0A57Claude Code, Codex
mcore-split-prNVIDIA/skillsSkill4.4kyesterdayApache-2.0A25Claude Code
contributingHugoRCD/evlogSkill2.0k7d agoMITA68Claude Code, Codex
git-commit-writermergisi/awesome-openclaw-agentsSkill4.1k1mo agoMITA53Claude Code, Codex