commit

A guide for creating a Git commit, including checking changes, staging files, handling pre-commit hooks, running checks, and updating related documentation when needed. Git is the tool used to record versions of code and files.

In plain words
What is it for?
Use it when preparing and committing code changes, especially in projects with pre-commit hooks, Python linting or type checks, or project-specific README and API documentation rules.
Why use it?
It helps produce commits that pass the project’s checks and keeps generated formatting or documentation changes from being missed. It also protects environment files from being changed during the process.

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

Made for: Claude Code, Codex.

Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,323 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.00122 $0.02323
Opus 5 $0.00061 $0.01162
Sonnet 5 $0.00024 $0.00465
Haiku 4.5 $0.00012 $0.00232

Measured yesterday against content hash c3288d6d0c66, 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • commit — 100% identical, 0 lines differ
.claude/commands/commit/SKILL.md · 174 lines

How it starts

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

Commit

Create a git commit with automatic precommit hook handling, test fixing, README updates, and API reference updates.

Note: Steps 5 and the API Reference Update Guidelines are specific to the Reflexio project. They are skipped automatically when the referenced paths do not exist.

Workflow

  1. Check git status - Run git status and git diff --cached --name-only to see staged/unstaged changes
  2. Sync AI instruction files (only if CLAUDE.md changed) — Run git diff --cached --name-only and check if CLAUDE.md is in the staged changeset. If yes, copy CLAUDE.md content to GEMINI.md and AGENTS.md, then stage them. If CLAUDE.md is NOT staged, skip this step entirely — do not overwrite other instruction files that may have been intentionally edited independently.
  3. Stage files - Add relevant untracked/modified files if needed. Do not modify or change gitignored files, such as .env. Never change .env file even if it is modified.
  4. Check README updates - Run through the README Update Guidelines checklist below. If ANY criteria match, update README files before proceeding.
  5. Update API Reference docs (Reflexio-specific) — If the files reflexio/reflexio_client/reflexio/client.py or reflexio/reflexio_commons/reflexio_commons/api_schema/service_schemas.py exist AND are in the staged changeset, update reflexio/public_docs/api-reference/ (see API Reference Update Guidelines below). Otherwise skip.
  6. Run lint and type checks on staged Python files a. Get the list of staged Python files:
    git diff --cached --name-only --diff-filter=ACMR -- '*.py'
    
    If no Python files are staged, skip this step entirely. b. Ruff auto-fix: Run ruff check --fix <files>. Re-stage any modified files with git add <files>. c. Ruff format: Run ruff format <files>. Re-stage any modified files with git add <files>. d. Ruff remaining errors: Run ruff check <files>. If any errors remain that ruff could not auto-fix, read each error, understand the issue, and fix the code yourself. Re-stage fixes. Do NOT proceed with unfixed ruff errors. e. Pyright type check: Run pyright <files>. If any type errors are reported, read each error, understand the type issue, and fix the code yourself. Re-stage fixes. Do NOT proceed with unfixed pyright errors. f. Get the list of staged TypeScript/JavaScript files:
    git diff --cached --name-only --diff-filter=ACMR -- '*.ts' '*.tsx' '*.js' '*.jsx' '*.mts'
    
    If no TS/JS files are staged, skip steps 6g-6i entirely. g. Biome auto-fix: Run npx biome check --write <files> from the relevant project root (reflexio/website/ or reflexio/public_docs/ depending on file path). Re-stage any modified files with git add <files>. h. Biome remaining errors: Run npx biome check <files>. If any errors remain that Biome could not auto-fix, read each error, understand the issue, and fix the code yourself. Re-stage fixes. Do NOT proceed with unfixed Biome errors. i. TypeScript type check: Run npx tsc --noEmit from the relevant project root. If any type errors are reported, read each error, understand the type issue, and fix the code yourself. Re-stage fixes. Do NOT proceed with unfixed tsc errors.
  7. Attempt commit - Run git commit which triggers precommit hooks
  8. Handle hook results:
    • If hooks modify files (formatting, linting): Stage the modified files with git add -u and retry commit
    • If unit tests fail: Fix the failing tests, stage fixes, and retry commit
    • If hooks pass: Commit succeeds
  9. Do NOT push - Only commit locally

Read the full file on GitHub · 174 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. yesterday First seen · 174 lines · 122 tokens per session scan A c3288d6d0c66

Subscribe to this mod's changes

commit is a skill published in the GitHub repository ReflexioAI/claude-smart (774 stars, last pushed 3d ago), licensed Apache-2.0. It adds 122 tokens to every session and 2,323 once invoked, about $0.0006 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.