commit-suggest

commit-suggest is a command for coding agents from wangke19/gemini-ai-helpers. It costs 11 tokens per session (1,129 once invoked), scanned A, a copy of commit-suggest, Apache-2.0.

A Git helper that studies staged changes or recent commits and suggests Conventional Commits messages, a standard format for describing changes such as fixes and features.

In plain words
What is it for?
Use it to draft messages for staged changes, rewrite one commit, or summarize multiple commits for a pull-request merge.
Why use it?
It reduces the effort of writing consistent commit messages and preparing summaries when several commits are combined.

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/wangke19/gemini-ai-helpers/commit-suggest
Clone the repo
git clone --depth 1 https://github.com/wangke19/gemini-ai-helpers

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for commit-suggest

README.md
[![agentmods](https://agentmods.dev/badge/commands/wangke19/gemini-ai-helpers/commit-suggest.svg)](https://agentmods.dev/commands/wangke19/gemini-ai-helpers/commit-suggest)
Your own site
<a href="https://agentmods.dev/commands/wangke19/gemini-ai-helpers/commit-suggest"><img src="https://agentmods.dev/badge/commands/wangke19/gemini-ai-helpers/commit-suggest.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 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,129 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00011 $0.01129
Opus 5 $0.00005 $0.00564
Sonnet 5 $0.00002 $0.00226
Haiku 4.5 $0.00001 $0.00113

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

Security

Grade A, and why

commit-suggest 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

This is a copy

100% identical to commit-suggest — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

extensions/git/commands/commit-suggest.md · 141 lines

How it starts

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

Name

git:commit-suggest

Synopsis

/git:commit-suggest       # Analyze staged changes
/git:commit-suggest [N]     # Analyze last N commits (1-100)

Description

AI-powered command that analyzes code changes and generates Conventional Commits–style messages.

Modes:

  • Mode 1 (no argument) – Analyze staged changes (git add required)
  • Mode 2 (with N) – Analyze last N commits to rewrite (N=1) or summarize for squash (N≥2)

Use cases:

  • Create standardized commit messages
  • Improve or rewrite existing commits
  • Generate squash messages for PR merges

Difference from /git:summary – That command is read-only, while git:commit-suggest generates actionable commit message suggestions for user review and manual use.

Implementation

The command operates in two modes based on input:

Mode 1 (no argument):

  1. Collect staged changes via git diff --cached
  2. Analyze file paths and code content to identify type (feat/fix/etc.) and scope
  3. Generate 3 commit message suggestions (Recommended, Standard, Minimal)
  4. Display formatted suggestions and prompt user for selection
    • Ask: "Which suggestion would you like to use? (1/2/3 or skip)"
    • Support responses: 1, use option 2, commit with option 3, skip
    • Execute git commit with selected message if user requests

Mode 2 (with N):

  1. Retrieve last N commits using git log
  2. Parse commit messages to extract types, scopes, and descriptions
  3. For N=1: Suggest improved rewrite For N≥2: Merge commits intelligently by type priority (fix > feat > perf > refactor > docs > test > chore)
  4. Generate 3 commit message suggestions (Recommended, Standard, Minimal)
  5. Display formatted suggestions and prompt user for selection
    • Ask: "Which suggestion would you like to use? (1/2/3 or skip)"
    • Support responses: 1, use option 2, amend with option 3, skip
    • Execute git commit --amend (N=1) or squash operation (N≥2) if user requests

Examples

# Generate message for staged files
git add src/auth.ts src/middleware.ts
/git:commit-suggest

# Rewrite last commit message
/git:commit-suggest 1

# Summarize last 5 commits for squash
/git:commit-suggest 5

Read the full file on GitHub · 141 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 · 141 lines · 11 tokens per session scan A 2a381efe2bb2

Subscribe to this mod's changes

commit-suggest is a command published in the GitHub repository wangke19/gemini-ai-helpers (2 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 11 tokens to every session and 1,129 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to commit-suggest, differing in 0 lines, and is treated as a copy.