commit

A command that reviews a code change, fixes safe quality issues, and creates a Conventional Commit, a commit message format with a standard type and description. It checks correctness, design, security, and efficiency.

In plain words
What is it for?
Use it to inspect staged or unstaged changes, stage relevant files, identify issues by file and line, apply safe fixes, and commit a coherent change.
Why use it?
It provides a focused review before committing and catches common problems such as missing error handling, secrets, dead code, and duplicated logic. It also keeps the commit message consistent.

Command

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/jpesewang/solo-dev-workflow/commit
Clone the repo
git clone --depth 1 https://github.com/jpeseWang/solo-dev-workflow
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 828 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.00828
Opus 5 $0.00000 $0.00414
Sonnet 5 $0.00000 $0.00166
Haiku 4.5 $0.00000 $0.00083

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

variants/solo/commands/commit.md · 93 lines

How it starts

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

Commit

Quality-gate the diff, auto-fix safe issues, and write a Conventional Commit.

A focused pipeline: understand the change, hold it to the four quality dimensions, fix the safe stuff, then commit with a clean message. No ceremony — no ticket lookup, no metrics.


Step 1 — Analyze the change

git status
git diff --stat

Read every changed file (staged + unstaged) so you understand the change, not just the lines. If nothing is staged, stage the relevant files (git add -p mindset — only what belongs in this commit). If the diff mixes two unrelated concerns, offer to split it into two commits.

Step 2 — Quality gate (4 dimensions)

Check the diff against the bar in AGENTS.mdCode quality bar:

Dimension Look for
Correctness null safety, error handling, edge cases, exhaustive cases, no placeholder/debug logging
Design clear names, short functions, no magic numbers, no dead code
Security no hardcoded secrets, no logged credentials, validated input
Efficiency no duplicated logic, no reinvented stdlib, no obvious perf traps

Report what you found, grouped by dimension. Be concrete (file:line).

Step 3 — Auto-fix the safe issues

Fix in priority order Correctness → Design → Security → Efficiency. Only fix what is genuinely wrong and behavior-preserving. Leave anything judgment-heavy or risky for the developer — list those instead of touching them. If a fix would change >50% of a file, ask first. Re-stage after fixing.

Step 4 — Write the commit message

Conventional Commits: type(scope): subject

SUBJECT="feat(export): add CSV export to the reports page"   # example

Validate before committing — all must pass:

  • Prefix: one of feat|fix|refactor|perf|test|docs|chore|style|build|ci, optional (scope).
  • Length: subject ≤ 72 chars.
  • Mood: imperative — add, not added/adds/adding.
  • No trailing period.
  • Body: add 1–3 lines explaining why when the subject doesn't make it obvious. Wrap a bug fix's body with what broke and how this fixes it.

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

Subscribe to this mod's changes

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