commit-message

A set of rules for Test-Driven Development (TDD), a method where you write a test before the code that makes it pass. It requires a failing test, the smallest working implementation, and then cleanup of the code.

In plain words
What is it for?
Use it when implementing features, fixing bugs, refactoring, or changing behavior in the specified RLM development phase.
Why use it?
It prevents production code from being written without first proving that a test detects the intended behavior. This helps keep implementation work tied to a verifiable requirement.

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/spideynolove/claude-dotfiles/commit-message
Clone the repo
git clone --depth 1 https://github.com/spideynolove/claude-dotfiles

Made for: Claude Code.

Per session 16 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,971 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.00016 $0.01971
Opus 5 $0.00008 $0.00986
Sonnet 5 $0.00003 $0.00394
Haiku 4.5 $0.00002 $0.00197

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

Security

Grade A, and why

commit-message 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 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.

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-global-backup/commands/commit-message.md · 360 lines

How it starts

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

Commit Message

Generates commit messages from staged changes (git diff --staged). This command only creates messages and copies them to your clipboard—it doesn't run any git commands.

Usage

/commit-message [options]

Options

  • --format <format> : Choose message format (conventional, gitmoji, angular)
  • --lang <language> : Set language explicitly (en)
  • --breaking : Include breaking change detection

Basic Examples

# Generate message from staged changes (language auto-detected)
# The top suggestion is automatically copied to your clipboard
/commit-message

# Specify language explicitly
/commit-message --lang ja
/commit-message --lang en

# Include breaking change detection
/commit-message --breaking

Prerequisites

Important: This command only works with staged changes. Run git add first to stage your changes.

# If nothing is staged, you'll see:
$ /commit-message
No staged changes found. Please run git add first.

Automatic Clipboard Feature

The top suggestion gets copied to your clipboard as a complete command: git commit -m "message". Just paste and run it in your terminal.

Implementation Notes:

  • Run pbcopy in a separate process from the message output
  • Use printf instead of echo to avoid unwanted newlines

Automatic Project Convention Detection

Important: If project-specific conventions exist, they take priority.

1. CommitLint Configuration Check

Automatically detects settings from the following files:

  • commitlint.config.js
  • commitlint.config.mjs
  • commitlint.config.cjs
  • commitlint.config.ts
  • .commitlintrc.js
  • .commitlintrc.json
  • .commitlintrc.yml
  • .commitlintrc.yaml
  • package.json with commitlint section
# Search for configuration files
find . -name "commitlint.config.*" -o -name ".commitlintrc.*" | head -1
2. Custom Type Detection

Example of project-specific types:

// commitlint.config.mjs
export default {
  extends: ["@commitlint/config-conventional"],
  rules: {
    "type-enum": [
      2,
      "always",
      [
        "feat",
        "fix",
        "docs",
        "style",
        "refactor",
        "test",
        "chore",
        "wip", // work in progress
        "hotfix", // urgent fix
        "release", // release
        "deps", // dependency update
        "config", // configuration change
      ],
    ],
  },
};

Read the full file on GitHub · 360 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 · 360 lines · 16 tokens per session scan A e9753d5dade7

Subscribe to this mod's changes

commit-message is a command published in the GitHub repository spideynolove/claude-dotfiles (2 stars, last pushed 3mo ago), licensed MIT. It adds 16 tokens to every session and 1,971 once invoked, about $0.0001 per session on Opus 5. 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.