commit

commit is a command for Claude Code, Cursor from codeready-toolchain/tarsy. It costs 0 tokens per session (1,180 once invoked), scanned A, original, Apache-2.0.

A command for reviewing uncommitted Git changes, creating a suitable branch when needed, and committing the work with a structured message. Git is a system for tracking changes to source code.

In plain words
What is it for?
Use it to inspect changes, determine the default branch, create feature or fix branches, and prepare a commit.
Why use it?
It organizes the steps before a commit and helps prevent new work from being committed directly to the repository's default branch.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

Good fit Use it to inspect changes, determine the default branch, create feature or fix branches, and prepare a commit.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/codeready-toolchain/tarsy/commit
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.

Clone the repo
git clone --depth 1 https://github.com/codeready-toolchain/tarsy

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 commit

README.md
[![agentmods](https://agentmods.dev/badge/commands/codeready-toolchain/tarsy/commit/github.svg)](https://agentmods.dev/commands/codeready-toolchain/tarsy/commit)
Your own site
<a href="https://agentmods.dev/commands/codeready-toolchain/tarsy/commit"><img src="https://agentmods.dev/badge/commands/codeready-toolchain/tarsy/commit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for commit

Your own site · 80×15
<a href="https://agentmods.dev/commands/codeready-toolchain/tarsy/commit"><img src="https://agentmods.dev/badge/commands/codeready-toolchain/tarsy/commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 1,180 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.01180
Opus 5.5 $0.00000 $0.00472
Sonnet 5.5 $0.00000 $0.00236
Haiku 4.5 $0.00000 $0.00118

Measured 1mo ago against content hash 41a8067e67d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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/commands/commit.md · 116 lines

How it starts

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

Commit Changes

Analyze uncommitted changes, create a branch if needed, and commit with a well-structured message.


Step 1: Detect the default branch

Run git remote show origin (or fall back to checking which of main/master exists locally) to determine the default branch name.

Step 2: Branch management

If currently on the default branch

All uncommitted changes belong to a new feature/fix. Create a new branch before committing:

  1. Analyze the changes (see Step 3) to understand their purpose.
  2. Create a descriptive branch name: <type>/<short-slug> where type is feat, fix, refactor, docs, chore, test, etc.
  3. Run git checkout -b <branch-name>.

If currently on a non-default branch

Ask the user:

You're on branch <current-branch>. Do you want to:

  1. Commit to this branch
  2. Create a new branch from <default-branch>

If the user picks option 2, explicitly branch from <default-branch>:

  1. If there are uncommitted changes that would prevent checkout, ask the user whether to stash them first or abort.
  2. git fetch origin
  3. git checkout <default-branch>
  4. git pull --ff-only
  5. Re-apply stashed changes if applicable (git stash pop).
  6. Analyze the changes (see Step 3) and create a branch: git checkout -b <branch-name>.

Step 3: Analyze changes

Run these commands in parallel to understand the full picture:

  • git status — see all tracked/untracked changes
  • git diff — unstaged changes
  • git diff --cached — staged changes
  • git diff HEAD — combined view of all uncommitted changes Also run git log --oneline -10 to glance at recent commit style. If the existing messages are well-structured and consistent, adopt their conventions (prefix style, tense, etc.) alongside the format rules below. If they are messy or inconsistent, ignore them and follow this command's format exclusively.

Review all changes carefully. Understand what changed and why before writing the commit message.

Step 4: Stage and commit

Read the full file on GitHub · 116 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. 1mo ago First seen · 116 lines · 0 tokens per session scan A 41a8067e67d5

Subscribe to this mod's changes

commit is a command published in the GitHub repository codeready-toolchain/tarsy (10 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,180 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.