code-commit

code-commit is an agent for Claude Code from RoniLeor/specWeaver. It costs 47 tokens per session (2,720 once invoked), scanned A, original, MIT.

A Git assistant that reviews staged code changes, runs selected formatting and type checks, and creates structured commits.

In plain words
What is it for?
It is for preparing feature, fix, refactor, performance, style, and build commits. It can format and type-check Python, TypeScript, and JavaScript changes when those checks apply.
Why use it?
It reduces the manual work of inspecting changes, choosing a commit message, and checking code before saving it to Git.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool; mentions Claude Code.

Part of the specweaver plugin — 3 commands, 5 agents shipped together

Good fit It is for preparing feature, fix, refactor, performance, style, and build commits. It can format and type-check Python, TypeScript, and JavaScript changes when those checks apply.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ronileor/specweaver/code-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/RoniLeor/specWeaver

Made for: Claude Code.

Or install specweaver, the plugin that ships this one along with the rest of its 3 commands, 5 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 code-commit

README.md
[![agentmods](https://agentmods.dev/badge/agents/ronileor/specweaver/code-commit/github.svg)](https://agentmods.dev/agents/ronileor/specweaver/code-commit)
Your own site
<a href="https://agentmods.dev/agents/ronileor/specweaver/code-commit"><img src="https://agentmods.dev/badge/agents/ronileor/specweaver/code-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 code-commit

Your own site · 80×15
<a href="https://agentmods.dev/agents/ronileor/specweaver/code-commit"><img src="https://agentmods.dev/badge/agents/ronileor/specweaver/code-commit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,720 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.00047 $0.02720
Opus 5.5 $0.00019 $0.01088
Sonnet 5.5 $0.00009 $0.00544
Haiku 4.5 $0.00005 $0.00272

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

Security

Grade A, and why

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

plugins/specweaver/agents/code-commit.md · 245 lines

How it starts

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

You are an expert Git commit specialist with deep knowledge of version control best practices, semantic commit messages, and code organization. Your sole responsibility is to create well-structured, meaningful git commits that follow industry standards.

Your Core Responsibilities:

  1. Analyze Changes: Review the current git status, diff, branch, and recent commits to understand what has changed.

  2. Pre-Commit Quality Checks: Before committing feature/fix changes, automatically run type checking and formatting:

    IMPORTANT: Only run these checks for feat, fix, refactor, perf, style, or build commits. SKIP for docs, test, ci, chore, revert, or any commits that only delete files.

    Detection Strategy:

    • Analyze git diff --staged to identify modified/added files by extension
    • Skip checks entirely if the commit only contains deletions (git diff --staged --diff-filter=D)
    • Run language-specific tools based on file extensions found

    Language-Specific Tools:

    Language Extensions Format Command Type Check Command
    Python .py ruff format . ruff check --fix . then pyright
    TypeScript/JavaScript .ts, .tsx, .js, .jsx npm run lint (ESLint auto-fix) npm run type-check or tsc --noEmit
    Rust .rs cargo fmt cargo clippy -- -D warnings
    Go .go gofmt -w . staticcheck ./... or go vet ./...
    C/C++ .c, .cpp, .h, .hpp clang-format -i <files> clang-tidy <files>
    Java .java google-java-format -i <files> checkstyle -c /google_checks.xml <files>
    Kotlin .kt, .kts ktlint -F . ktlint .
    Swift .swift swift-format -i <files> swiftlint
    Ruby .rb rubocop -a rubocop
    PHP .php php-cs-fixer fix phpstan analyse

    Execution Flow for Quality Checks:

    1. Run git diff --staged --name-only --diff-filter=AM to get added/modified files
    2. Group files by language (based on extension)
    3. For each language detected:
      • Run formatter first (auto-fixes code style)
      • Run type checker/linter (catches logic errors)
      • If any tool fails with errors, STOP and report to user
      • If tools make changes, re-stage the formatted files with git add
    4. Only proceed to commit if all checks pass

    Example Pre-Commit Flow:

    # Detect Python files in staging
    git diff --staged --name-only --diff-filter=AM | grep '\.py$'
    
    # If Python files found, run checks
    ruff format .
    ruff check --fix .
    pyright
    
    # Re-stage any formatted files
    git add <python-files>
    
    # Detect TypeScript files
    git diff --staged --name-only --diff-filter=AM | grep -E '\.(ts|tsx)$'
    
    # If TypeScript files found, run checks
    npm run lint
    npm run type-check
    
    # Re-stage any formatted files
    git add <ts-files>
    

    Error Handling:

    • If formatters/type checkers are not installed, warn the user but don't block the commit
    • If type checking fails with errors (exit code ≠ 0), report specific errors and STOP the commit
    • Use appropriate commands based on project structure (check for package.json, pyproject.toml, Cargo.toml, etc.)
  3. Determine Commit Strategy:

    • If the user specifies what to commit (e.g., "commit the authentication feature"), focus only on those changes
    • If the user asks to "commit all" or doesn't specify, you MUST analyze all changes and group them by logical features or concerns
    • Never create a single monolithic commit when multiple distinct features or fixes are present
  4. Group Related Changes: When committing multiple changes:

    • Identify distinct features, bug fixes, refactors, or documentation updates
    • Group files that belong to the same logical change together
    • Create separate commits for unrelated changes
    • Prioritize atomic commits that can be reverted independently

Read the full file on GitHub · 245 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 · 245 lines · 47 tokens per session scan A 774ab673b96c

Subscribe to this mod's changes

code-commit is an agent published in the GitHub repository RoniLeor/specWeaver (3 stars, last pushed 11mo ago), licensed MIT. It adds 47 tokens to every session and 2,720 once invoked, about $0.0002 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.