prepare-commit-messages

prepare-commit-messages is a skill for Claude Code, Cursor from lsampaioweb/ai-instructions. It costs 66 tokens per session (623 once invoked), scanned A, original, MIT.

A skill for organizing uncommitted Git changes into feature-focused Conventional Commits, a standard format for commit messages.

In plain words
What is it for?
Inspecting changes, grouping files into atomic commits, naming commits consistently, and identifying missing documentation updates.
Why use it?
It separates unrelated work, checks documentation needs, and prepares a reviewable commit plan before any commits are made.

Skill for Claude CodeCursor

Written for Claude Code and Cursor: disable-model-invocation in frontmatter, but also installed under .cursor/. Also seen: mentions AGENTS.md.

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 skills/lsampaioweb/ai-instructions/prepare-commit-messages
Any agent
npx skills add lsampaioweb/ai-instructions --skill prepare-commit-messages
Clone the repo
git clone --depth 1 https://github.com/lsampaioweb/ai-instructions

Made for: Claude Code, Cursor.

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 prepare-commit-messages

README.md
[![agentmods](https://agentmods.dev/badge/skills/lsampaioweb/ai-instructions/prepare-commit-messages.svg)](https://agentmods.dev/skills/lsampaioweb/ai-instructions/prepare-commit-messages)
Your own site
<a href="https://agentmods.dev/skills/lsampaioweb/ai-instructions/prepare-commit-messages"><img src="https://agentmods.dev/badge/skills/lsampaioweb/ai-instructions/prepare-commit-messages.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 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.1 $0.00066 $0.00623
Opus 5 $0.00033 $0.00311
Sonnet 5 $0.00013 $0.00125
Haiku 4.5 $0.00007 $0.00062

Measured 5d ago against content hash 38052458c9ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

prepare-commit-messages 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 5d 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.

.cursor/skills/prepare-commit-messages/SKILL.md · 70 lines

How it starts

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

Logical Git Commit Engine

  • Obey AGENTS.md (project root).
  • If the user provides a path or feature-scope filter, limit analysis to that scope.

1. Scope & Analysis

  • Inspect uncommitted changes (git status, git diff).
  • Cluster files into atomic, reversible commits.
  • Sort Order: Foundational changes (config, schemas, deps) must be committed before feature layers.
  • Grouping Boundary: Group files strictly by feature domain (e.g., auth, payment).
  • Documentation Gate: If Markdown documentation exists for changed code but contains no corresponding updates, flag the affected docs and recommend running /review-and-sync-docs before proceeding.

2. Resolution Rules

  • Commit Format: Use Conventional Commits only: type(scope): description.
  • Scope Rule: Use a feature domain or infrastructure area.
  • Description Rule: Imperative, present tense, max 50 characters, no trailing period.
  • Body Rule: Document the why and the impact only.
  • Footer Rule: Append Closes #123 or tracking IDs if detected in branch or context.

3. Safety Guards

  • Execution Boundary: Read-only analysis. Do not execute any Git commands until the commit plan is confirmed.
  • Ask for Confirmation: Output: Proceed with executing this automated commit sequence? [yes/no]
  • Post-approval: Run git add and git commit sequentially for each cluster.
  • Verify success after each commit before proceeding to the next cluster.
  • Never group files by technical layer; group strictly by feature domain.
  • Never use technical-layer identifiers as the commit scope.
  • Never list modified files or duplicate diff data in the commit body.
  • If files in a cluster span more than one feature domain, flag the cluster and stop.
  • Never use commit types not defined by the Conventional Commits specification.

4. Review Plan Layout

Output this plan layout:

Proposed Commit Sequence Plan


Commit [N]: type(scope): description

  • Target Files to Stage:
    • path/to/file1
    • path/to/file2
  • Execution Message Blueprint:
    type(scope): description
    
    Why this change is needed and its impact.
    

Read the full file on GitHub · 70 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. 5d ago First seen · 70 lines · 66 tokens per session scan A 38052458c9ab

Subscribe to this mod's changes

prepare-commit-messages is a skill published in the GitHub repository lsampaioweb/ai-instructions (1 stars, last pushed 13d ago), licensed MIT. It adds 66 tokens to every session and 623 once invoked, about $0.0003 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.