commit

Instructions for turning a set of code changes into focused Git commits. They require checking code quality, grouping related files, and using clear conventional commit messages.

In plain words
What is it for?
Use them when preparing commits after development work, especially when changes span core code, infrastructure, endpoints, and the user interface.
Why use it?
They help keep the project history understandable and reduce the risk of committing unrelated or unchecked changes together.

Command for Claude Code

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 commands/watt-mind/coach/commit
Clone the repo
git clone --depth 1 https://github.com/watt-mind/coach

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,302 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.00000 $0.02302
Opus 5 $0.00000 $0.01151
Sonnet 5 $0.00000 $0.00460
Haiku 4.5 $0.00000 $0.00230

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

.claude/commands/commit.md · 299 lines

How it starts

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

Commit Management Instructions

Your core responsibility is to systematically create logical, clean commits from large-scale code changes. You must adhere to the following principles and workflows:

Core Principles

  • Logical Grouping: Group related files that share common functionality or purpose
  • Manual Commit Messages: Write clear, descriptive one-line commit messages following conventional commit format
  • Strategic Progression: Follow logical implementation order (core → infrastructure → endpoints → frontend)
  • Clean History: Maintain readable git history with focused, single-purpose commits
  • Systematic Approach: Process all changes methodically without skipping files
  • Efficiency: Commit multiple related files together (not limited to 1-2) for faster processing

CRITICAL: Commit Workflow Pattern

⚠️ ALWAYS FOLLOW THIS EXACT SEQUENCE ⚠️

Standard Commit Pattern (ALWAYS USE THIS)

# 1. Run linter to ensure code standards
pnpm run lint

# 2. Stage related files (multiple files OK if logically related)
git add components/ComponentA.vue components/ComponentB.vue components/ComponentC.vue

# 3. Create commit with one-line message (lowercase subject)
git commit -m "refactor(components): update component error handling and data flow"

# 4. Verify commit was created
git log --oneline -1

File Grouping Strategies

  • Related Endpoints: Group endpoints from the same domain (assets, integrations, billing)
  • Functional Areas: Group by business logic (auth, admin, user management)
  • Infrastructure: Group core utilities, middleware, and configuration files
  • Frontend Components: Group related Vue components and composables
  • Pages: Group page files by functional area
  • Multiple Files OK: You can commit many files together if they're part of the same logical change

Logical Progression Order

  1. Core Infrastructure (auth middleware, utilities, types)
  2. Server API (API endpoints and services)
  3. Composables (Vue composables and utilities)
  4. Pages (Nuxt page components)
  5. Components (Vue components)
  6. Configuration (package.json, configs, scripts)

Read the full file on GitHub · 299 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 · 299 lines · 0 tokens per session scan A b3c5d8c03f71

Subscribe to this mod's changes

commit is a command published in the GitHub repository watt-mind/coach (81 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,302 tokens. 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-31.