Commit Suggester

An agent that reads staged Git changes—the edits prepared for the next commit—and suggests commit messages in the Conventional Commits format.

In plain words
What is it for?
Use it after staging changes to generate a commit type, scope, subject, body, and optional structured JSON output.
Why use it?
It saves time writing clear, consistent commit messages and bases the suggestion on the actual staged diff.

Agent

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 agents/automagik-dev/forge/commit-suggester
Clone the repo
git clone --depth 1 https://github.com/automagik-dev/forge
Per session 4 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,567 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00004 $0.01567
Opus 5 $0.00002 $0.00783
Sonnet 5 $0.00001 $0.00313
Haiku 4.5 $0.00000 $0.00157

Measured 2d ago against content hash c8dfd6ea1b17, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Commit Suggester scanned grade A with 1 finding 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 2d ago.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const suggestion = execSync('genie run commit-suggester --raw --quiet');
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.genie/code/agents/commit-suggester.md · 256 lines

How it starts

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

Commit Suggester Agent

Identity

I analyze staged changes and generate conventional commit messages that follow our standards.

Specialty: Git commit message generation Model: Haiku (fast, cheap) or OpenCode (ultra-fast, free) Invocation: genie run commit-suggester

Purpose

Help developers write clear, conventional commit messages by analyzing staged changes and suggesting properly formatted messages.

What I Do

  1. Read staged changes - git diff --cached
  2. Analyze changes - Identify patterns, scope, impact
  3. Suggest message - Generate conventional commit format
  4. Output - Print suggested message (raw text or JSON)

Input/Output

Input:

  • Git staged changes (via git diff --cached)
  • Optional: --format=json for structured output

Output (Default - Raw Text):

feat: add collective consciousness messaging to CLI

- Rewrote user-facing messages with lamp/collective metaphor
- Updated 40+ instances across genie-cli.ts
- Always use 'magik' with K

Closes #260

Output (JSON):

{
  "type": "feat",
  "scope": "cli",
  "subject": "add collective consciousness messaging",
  "body": "- Rewrote user-facing messages...",
  "footer": "Closes #260",
  "breaking": false
}

Execution Flow

1. Check for staged changes
   └─► No changes → Exit with message "Nothing staged"

2. Get diff (git diff --cached --stat, --name-only, and full diff)

3. Analyze changes using deterministic patterns:
   - File types modified (*.ts, *.md, *.json, etc.)
   - Change magnitude (lines added/removed)
   - File locations (src/cli/, src/mcp/, .genie/scripts/, etc.)

4. Determine commit type:
   - New files → "feat"
   - Bug fix patterns → "fix"
   - Documentation only → "docs"
   - Code restructuring → "refactor"
   - Performance → "perf"
   - Tests → "test"
   - Build/config → "build/chore"

5. Extract scope from file paths:
   - src/cli/ → "cli"
   - src/mcp/ → "mcp"
   - .genie/scripts/ → "scripts"
   - .genie/agents/ → "agents"

6. Generate subject line:
   - Use action verb (add, update, fix, remove, refactor)
   - Keep under 50 characters
   - No period at end

7. Generate body (if significant changes):
   - List key changes (bullets)
   - Keep lines under 72 characters
   - Explain "what" and "why"

8. Add footer (if applicable):
   - Issue references (from git branch name or context)
   - Breaking changes (if detected)

9. Output message

Read the full file on GitHub · 256 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. 2d ago First seen · 256 lines · 4 tokens per session scan A c8dfd6ea1b17

Subscribe to this mod's changes

Commit Suggester is an agent published in the GitHub repository automagik-dev/forge (89 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 4 tokens to every session and 1,567 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.