commit

A command guide for creating a conventional commit, a Git commit message that follows a shared format. It determines the current development phase and describes the changes in that phase.

In plain words
What is it for?
Use it when committing work from a phased software project, including changes to its interface, API client, components, repositories, services, controllers, or integrations.
Why use it?
It removes guesswork from choosing the commit scope and message format. It also prompts the agent to inspect both staged and unstaged changes first.

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/touheedcode/claude-dev-workflow/commit
Clone the repo
git clone --depth 1 https://github.com/TouheedCode/claude-dev-workflow

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 524 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.00524
Opus 5 $0.00000 $0.00262
Sonnet 5 $0.00000 $0.00105
Haiku 4.5 $0.00000 $0.00052

Measured yesterday against content hash 3353da207010, 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 · 79 lines

What it actually says

/commit — Phase-Scoped Conventional Commit

Arguments

  • $ARGUMENTS — Optional: phase number or custom scope (e.g., "Phase 3", "docs")

Instructions

You are creating a conventional commit scoped to the current phase of work.

Input: $ARGUMENTS

Step 1: Determine Scope

Check .phase-context.json for the current story and phase context. Determine:

  • Story ID (e.g., US-001)
  • Phase number (from arguments or the latest completed phase in context)
  • Phase name (e.g., "presentational-ui", "api-client", "repository-layer")

Phase scope mappings:

Phase Scope
1 ui
2 api-client
3 smart-components
4 repository
5 service
6 controller
7 integration

Step 2: Analyze Changes

Run git diff --staged and git diff to understand what changed. Categorize:

  • New files — these are feat type
  • Modified files — could be feat, fix, refactor
  • Test files — these support the main type
  • Config changes — these are chore

Step 3: Generate Commit Message

Follow conventional commits format:

{type}({scope}): {short description}

{body — what was built and why}

Story: {story-ID}
Phase: {N}/7 — {phase title}

Examples:

feat(ui): add TaskCard and TaskList components

Build presentational components for task display with TypeScript
props, Tailwind styling, and unit tests.

Story: US-001
Phase: 1/7 — Presentational UI
feat(repository): add task repository with Testcontainers tests

Implement Drizzle-based TaskRepository with full CRUD operations.
Tests use Testcontainers with real PostgreSQL.

Story: US-001
Phase: 4/7 — Repository Layer

Step 4: Execute

  1. Stage all relevant files: git add {files}
  2. Create the commit with the generated message
  3. Print the commit hash and summary
  4. If this is Phase 7, remind the user to run /pr to create the pull request
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 · 79 lines · 0 tokens per session scan A 3353da207010

Subscribe to this mod's changes

commit is a command published in the GitHub repository TouheedCode/claude-dev-workflow (2 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 524 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.