my_commit

my_commit is a command for Claude Code from anilcancakir/claude-code-plugins. It costs 29 tokens per session (1,908 once invoked), scanned A, original, MIT.

A command for creating a Git commit that follows the project's existing message style. Git is a system for tracking code changes, and a commit records a set of changes.

In plain words
What is it for?
Use it to commit current changes, generate a message when needed, detect conventions from recent history, or amend a previous commit.
Why use it?
It avoids manually guessing the repository's commit format and performs basic checks before recording changes. It can also amend the user's previous commit.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the pre-commit-flow plugin — 3 skills, 4 commands, 3 agents shipped together

Good fit Use it to commit current changes, generate a message when needed, detect conventions from recent history, or amend a previous commit.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/anilcancakir/claude-code-plugins/my_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/anilcancakir/claude-code-plugins

Made for: Claude Code.

Or install pre-commit-flow, the plugin that ships this one along with the rest of its 3 skills, 4 commands, 3 agents.

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 my_commit

README.md
[![agentmods](https://agentmods.dev/badge/commands/anilcancakir/claude-code-plugins/my_commit/github.svg)](https://agentmods.dev/commands/anilcancakir/claude-code-plugins/my_commit)
Your own site
<a href="https://agentmods.dev/commands/anilcancakir/claude-code-plugins/my_commit"><img src="https://agentmods.dev/badge/commands/anilcancakir/claude-code-plugins/my_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 my_commit

Your own site · 80×15
<a href="https://agentmods.dev/commands/anilcancakir/claude-code-plugins/my_commit"><img src="https://agentmods.dev/badge/commands/anilcancakir/claude-code-plugins/my_commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 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,908 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.00029 $0.01908
Opus 5.5 $0.00012 $0.00763
Sonnet 5.5 $0.00006 $0.00382
Haiku 4.5 $0.00003 $0.00191

Measured 1mo ago against content hash 94b3d6e705c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

my_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.

pre-commit-flow/commands/my_commit.md · 278 lines

How it starts

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

Smart Commit Command

Create a commit following the project's commit message conventions. Auto-detects style from git history.

Arguments

Parse from $ARGUMENTS:

  • message: Optional commit message (if not provided, generate from changes)
  • --amend: Amend the previous commit (only your own commits)

Execution Steps

Step 1: Pre-Commit Checks

# Verify there are changes to commit
git status --porcelain

# Check we're not on protected branch
BRANCH=$(git branch --show-current)
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
  echo "Warning: Committing directly to $BRANCH"
fi

Step 2: Detect Commit Style

Analyze recent commits to detect project convention:

# Get last 10 commit messages
git log --oneline -10

Detection with Regex Patterns:

# Run these patterns against git log output to detect style

# Conventional Commits with scope: type(scope): message
CONVENTIONAL_SCOPED="^[a-f0-9]+ (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert)\([a-zA-Z0-9_-]+\)!?: .+"

# Conventional Commits without scope: type: message
CONVENTIONAL_SIMPLE="^[a-f0-9]+ (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert)!?: .+"

# Gitmoji: :emoji: message or unicode emoji
GITMOJI="^[a-f0-9]+ :[a-z_]+: .+|^[a-f0-9]+ (🎨|🐛|✨|📝|🔥|💚|✅|🔒|⬆️|⬇️|♻️|🔧|🌐|💄|🎉|🚀|💥) .+"

# Simple: Plain text (fallback)

Detection Algorithm:

COMMITS=$(git log --oneline -10 2>/dev/null)
TOTAL=$(echo "$COMMITS" | wc -l)

# Count matches for each style
CONV_SCOPED=$(echo "$COMMITS" | grep -cE '^[a-f0-9]+ (feat|fix|docs|style|refactor|perf|test|chore)\([^)]+\): ' || echo 0)
CONV_SIMPLE=$(echo "$COMMITS" | grep -cE '^[a-f0-9]+ (feat|fix|docs|style|refactor|perf|test|chore): ' || echo 0)
GITMOJI_COUNT=$(echo "$COMMITS" | grep -cE '^[a-f0-9]+ :[a-z_]+: ' || echo 0)

# Determine dominant style (>50% of commits)
if [ $CONV_SCOPED -gt $((TOTAL / 2)) ]; then
  STYLE="conventional-scoped"
elif [ $CONV_SIMPLE -gt $((TOTAL / 2)) ]; then
  STYLE="conventional"
elif [ $GITMOJI_COUNT -gt $((TOTAL / 2)) ]; then
  STYLE="gitmoji"
else
  STYLE="simple"
fi

Read the full file on GitHub · 278 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 · 278 lines · 29 tokens per session scan A 94b3d6e705c2

Subscribe to this mod's changes

my_commit is a command published in the GitHub repository anilcancakir/claude-code-plugins (6 stars, last pushed 8mo ago), licensed MIT. It adds 29 tokens to every session and 1,908 once invoked, about $0.0001 per session on Opus 5.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.