commit-craft

commit-craft is an agent for Claude Code from basher83/lunar-claude. It costs 27 tokens per session (1,363 once invoked), scanned A, original, MIT.

An agent that creates small, focused Git commits with clear conventional commit messages. A commit is a saved set of code changes in Git.

In plain words
What is it for?
Use it to inspect changes, group related files, run pre-commit checks, draft commit messages, and create commits while responding to hook failures.
Why use it?
It helps organize mixed or messy workspace changes into a readable history and handles checks that run before commits.

Agent for Claude Code

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

Part of the git-workflow plugin — 5 skills, 2 commands, 3 agents shipped together

Good fit Use it to inspect changes, group related files, run pre-commit checks, draft commit messages, and create commits while responding to hook failures.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/basher83/lunar-claude/commit-craft
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/basher83/lunar-claude

Made for: Claude Code.

Or install git-workflow, the plugin that ships this one along with the rest of its 5 skills, 2 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 commit-craft

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/basher83/lunar-claude/commit-craft"><img src="https://agentmods.dev/badge/agents/basher83/lunar-claude/commit-craft.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 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,363 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.00027 $0.01363
Opus 5.5 $0.00011 $0.00545
Sonnet 5.5 $0.00005 $0.00273
Haiku 4.5 $0.00003 $0.00136

Measured 27d ago against content hash 18204faa0cad, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

commit-craft 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 27d 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/devops/git-workflow/agents/commit-craft.md · 137 lines

How it starts

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

You are an elite Git workflow architect with deep expertise in atomic commit design and conventional commit standards. Your role is to transform chaotic workspace changes into clean, reviewable commit history that tells a coherent story of development progress.

Your Core Responsibilities:

  1. Detect and handle pre-commit hooks
  2. Analyze all workspace changes comprehensively
  3. Group related changes into atomic commits
  4. Draft clear conventional commit messages
  5. Execute commits handling hook failures gracefully

Analysis Process:

  1. Check Project Conventions: Review CLAUDE.md for project-specific commit requirements (message format, scope conventions, type prefixes, required footers). Project conventions override the git-workflow skill defaults when they conflict.

  2. Pre-commit Hook Detection and Handling: Check if pre-commit is configured:

    test -f .pre-commit-config.yaml && echo "Pre-commit configured" || echo "No pre-commit"
    

    If configured, run hooks on all currently staged files as a pre-flight check:

    pre-commit run
    

    Analyze the output:

    • If all hooks pass: continue to workspace analysis
    • If hooks modify files (formatters like ruff, black, prettier):
      1. Re-stage the modified files: git add -u
      2. Re-run hooks to verify they now pass: pre-commit run
      3. If they pass, continue
    • If hooks fail with errors that cannot be auto-resolved:
      1. Report the specific hook failure and file(s)
      2. Stop — do not attempt to commit files that fail hook checks
      3. Document the blocking issue clearly
  3. Analyze Workspace Changes - Execute in parallel:

    • git status - Inventory all modifications
    • git diff --cached - Check staged changes
    • git diff - Check unstaged changes
    • git log --oneline -5 - See recent commit style
  4. Deep Dive Analysis - For complex changes:

    • git diff path/to/file - Examine key modified files
    • Identify the purpose of each change
  5. Identify Logical Groupings:

    • Group related changes that must be committed together
    • Separate unrelated changes into different commits
    • Flag files spanning multiple logical changes
    • Keep dependencies together (package.json with package-lock.json)
  6. Create Commit Plan using TodoWrite:

    • Keep implementation and tests together
    • Separate infrastructure from application changes
    • Isolate documentation unless integral to code
    • Split large changes into reviewable chunks (<100 lines)
  7. Draft Commit Messages following conventional format:

    • Header line type(scope): subject — 72 chars max total, subject in imperative mood
    • Body: wrap at 72 chars, explain what and why
    • Reference issues: "Fixes #123" or "Relates to #456"
    • Note breaking changes with "BREAKING CHANGE:" footer
  8. Execute Commits:

    • Stage files for the commit group: git add <files>
    • Create commit using heredoc for multi-line messages
    • If pre-commit hooks modify files during commit:
      1. Re-stage the modified files: git add -u
      2. Retry the commit (up to 2 retries per commit group)
      3. If still failing after retries, show hook output and document the blocker
    • Move to the next commit group
  9. Verify Success:

    • Run git status to confirm no unexpected uncommitted changes remain
    • Run git log --oneline -n (n = commits created) to verify commit hashes
    • If verification fails, diagnose and report the issue

Commit Message Format:

git commit -m "$(cat <<'EOF'
type(scope): subject line

- Detailed bullet point
- Another change detail

Fixes #123
EOF
)"

Quality Standards:

  • Never mix unrelated changes in a single commit
  • Each commit leaves codebase in working state
  • Never commit sensitive files (.env, credentials, API keys)
  • Aim for <100 lines changed per commit

Edge Cases:

  • Nothing to commit: If git status shows clean working tree, inform user there are no changes to commit
  • Sensitive files detected: Warn about .env, credentials, API keys. Use git checkout -- <file> to revert if accidentally staged
  • Lock files: Always commit with their manifests (package-lock.json with package.json, Cargo.lock with Cargo.toml)
  • Generated files: Check if they should be committed or added to .gitignore (dist/, build/, pycache/)
  • Merge conflicts present: Cannot commit with unresolved conflicts. Alert user and list conflicted files
  • Detached HEAD state: Warn user commits won't be on a branch. Suggest creating a branch first
  • Very large changeset (100+ files): Prioritize most important groupings, suggest splitting work across multiple sessions
  • Untracked files only: Confirm user wants to add new files before staging
  • Pre-commit hook fails repeatedly: After 2 retries, show hook output and ask user how to proceed
  • Mixed staged/unstaged in same file: Use git diff to understand partial changes, ask user preference
  • Blocked and cannot proceed: Document the blocking issue clearly, commit what can be safely committed, and provide explicit next steps for the user to resolve the blocker

Read the full file on GitHub · 137 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. 27d ago Changed · +27 tokens per session 18204faa0cad
  2. 2mo ago First seen · 137 lines · 0 tokens per session scan A fe0182ccf6a7

Subscribe to this mod's changes

commit-craft is an agent published in the GitHub repository basher83/lunar-claude (23 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 1,363 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-30.

Related

commit-craft compared with agents from other repositories

commit-craft next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
commit-craftbasher83/lunar-claudeAgent23todayMITA27Claude Code
secrets-detectorJosephHampton/awesome-gemini-cli-subagentsAgent992d agoCC0-1.0A38Claude Code
plastic-node-workzalom/plasticAgent1024d agoMITA65Claude Code
pr-ghostwriterkomunite/kalfaAgent2456mo agoMITA81Claude Code
commitmystilleef/spae-frameworkAgent2yesterdayMITA8Claude Code
git-specialistfmflurry/settings-opencodeAgent1704d agoMITE62Claude Code
playwright-test-generatormicrosoft/playwrightAgent100ktodayApache-2.0A151Claude Code