commit

Instructions for creating a focused Git commit, a saved set of related code changes, that follows the repository's conventions.

In plain words
What is it for?
Use it to inspect the working tree, check project commit rules and history, stage only relevant files, and create the commit.
Why use it?
It helps avoid mixing unrelated files into a commit and produces a clear message that explains the change.

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

Made for: Claude Code, Codex.

Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 614 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.00035 $0.00614
Opus 5 $0.00017 $0.00307
Sonnet 5 $0.00007 $0.00123
Haiku 4.5 $0.00003 $0.00061

Measured yesterday against content hash 25b43615f6e5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

skills/commit/SKILL.md · 65 lines

How it starts

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

Commit Skill

Use this skill when the work is already implemented and the next step is to create a clean git commit.

Goals

  • Keep the commit scoped to the intended change
  • Write a concise, descriptive commit message
  • Avoid including unrelated modified files

Workflow

  1. Inspect the working tree before committing.
  2. Confirm which files belong to the requested change.
  3. Detect the repository's commit-message rules and style.
  4. Stage only the relevant files.
  5. Write a commit message that follows the detected style and summarizes the user-visible change.
  6. Create the commit without rewriting unrelated history.

Commit Message Style

Before writing the message, check for explicit rules in repository instructions such as AGENTS.md, CONTRIBUTING.md, README.md, pull request templates, package scripts, or commitlint configuration. Explicit project or user rules override history.

If no explicit rule exists, inspect recent commits:

git log --format=%s -n 20
git log --format=%B -n 5

Use the dominant style from relevant recent history:

  • Conventional commits: use type(scope): subject or type: subject when recent history uses prefixes such as feat:, fix:, docs:, chore:, ci:, refactor:, or scoped variants.
  • Simple subjects: use a concise imperative subject such as Update skill validation workflow when history uses plain sentence-style commit subjects.
  • Multiline commits: include a blank line and body when recent non-merge commits commonly include bodies, when the change needs context, or when the user asks for references/explanations. Keep the subject aligned with the detected subject style.
  • Mixed history: prefer the style used by recent commits touching the same area. Do not imitate merge commits.

Guidelines

  • Respect what the user already staged: inspect git diff --cached before staging anything, treat pre-staged content as intentional, and do not unstage it unless it clearly does not belong to the requested change — call that out instead.
  • If a pre-commit hook fails, fix the reported problem and retry the commit. If a hook rewrites files, restage only the hook-modified files and commit again. Do not bypass hooks with --no-verify unless the user explicitly asks.
  • Do not stage unrelated files just to make the tree clean.
  • Prefer one focused commit over a mixed commit.
  • Use imperative subjects unless the repository's explicit rules or dominant history use another style.
  • If the tree contains unexpected changes, call them out before committing.
  • Do not amend existing commits unless explicitly requested.

Read the full file on GitHub · 65 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 65 lines · 35 tokens per session scan A 25b43615f6e5

Subscribe to this mod's changes

commit is a skill published in the GitHub repository denysdovhan/agents (17 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 614 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.