git-commit

A Git command workflow that examines changes and creates Conventional Commits messages. Git is a tool for tracking code changes, while Conventional Commits use a standard format to describe them.

In plain words
What is it for?
It is for staging and committing changes, amending the last commit, adding sign-off lines, and optionally setting the commit type, scope, or emoji.
Why use it?
It reduces the manual work of reviewing changes, deciding how to split commits, and writing consistent commit messages.

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/ufomiao/zcf/git-commit
Any agent
npx skills add UfoMiao/zcf --skill git-commit
Clone the repo
git clone --depth 1 https://github.com/UfoMiao/zcf

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 2,180 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.02180
Opus 5 $0.00020 $0.01090
Sonnet 5 $0.00008 $0.00436
Haiku 4.5 $0.00004 $0.00218

Measured 2d ago against content hash 08a309da411e, 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.

templates/skills/en/git-commit/SKILL.md · 200 lines

How it starts

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

Claude Command: Commit (Git-only)

This command works without any package manager/build tools, using only Git to:

  • Read changes (staged/unstaged)
  • Determine if changes should be split into multiple commits
  • Generate Conventional Commits style messages with optional emoji for each commit
  • Execute git add and git commit as needed (runs local Git hooks by default; use --no-verify to skip)

Usage

/git-commit
/git-commit --no-verify
/git-commit --emoji
/git-commit --all --signoff
/git-commit --amend
/git-commit --scope ui --type feat --emoji

Options

  • --no-verify: Skip local Git hooks (pre-commit/commit-msg etc.).
  • --all: When staging area is empty, automatically git add -A to include all changes in the commit.
  • --amend: Amend the last commit without creating a new one (preserves author and timestamp unless local Git config specifies otherwise).
  • --signoff: Add Signed-off-by line (use when following DCO process).
  • --emoji: Include emoji prefix in commit message (omit for plain text).
  • --scope <scope>: Specify commit scope (e.g., ui, docs, api), written to message header.
  • --type <type>: Force commit type (e.g., feat, fix, docs), overrides automatic detection.

Note: If the framework doesn't support interactive confirmation, enable confirm: true in front-matter to avoid mistakes.


What This Command Does

  1. Repository/Branch Validation

    • Check if in a Git repository using git rev-parse --is-inside-work-tree.
    • Read current branch/HEAD status; if in rebase/merge conflict state, prompt to resolve conflicts first.
  2. Change Detection

    • Get staged and unstaged changes using git status --porcelain and git diff.
    • If staged files = 0:
      • If --all is passed → Execute git add -A.
      • Otherwise prompt choice: continue analyzing unstaged changes for suggestions, or cancel to manually group staging.
  3. Split Suggestions (Split Heuristics)

    • Cluster by concerns, file modes, change types (e.g., source code vs docs/tests; different directories/packages; additions vs deletions).
    • If multiple independent changesets or large diff detected (e.g., > 300 lines / across multiple top-level directories), suggest splitting commits with pathspecs for each group (for subsequent git add <paths>).

Read the full file on GitHub · 200 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 · 200 lines · 41 tokens per session scan A 08a309da411e

Subscribe to this mod's changes

git-commit is a skill published in the GitHub repository UfoMiao/zcf (6,079 stars, last pushed 9d ago), licensed MIT. It adds 41 tokens to every session and 2,180 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.