Commit Craft skill for Claude

Turn a mix of changes into clean, reviewable commits with good messages, blocking staged secrets and .env files.

When Claude uses it

Use whenever the user says commit this, wants to split work into commits, write a commit message, or is about to push.

Commit Craft SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

Commit Craft

Portability: 3 stdlib Python scripts that call git read-only. No network. The scripts never stage, commit or push. You do, one group at a time, after the gate passes.

Agents leave large mixed diffs: a feature, a reformat, a dependency bump and a stray .env, all in one tree. Committed as one blob, that diff cannot be reviewed, reverted or bisected. This skill turns it into a series where each commit is one logical change, builds on its own, holds no secrets and says why.

Workflow

# 1 - Plan: which commits, in which order, staged how?
python scripts/commit_planner.py                 # working tree vs HEAD, untracked included
# 2 - For each group: stage exactly its files, then gate what is staged
git add -- <files of group N>                     # or git add -p for MIXED_FORMATTING files
python scripts/secret_gate.py                     # blocks before the commit exists
# 3 - Write the message, lint it, commit
python scripts/message_linter.py -m "<message>" --staged && git commit -m "<message>"
# 4 - Before push: the whole series, and proof every commit builds
python scripts/message_linter.py --range @{upstream}..HEAD
git rebase -x "<test command>" @{upstream}

Step 1 groups files: manifest with lockfile, pure moves, whitespace-only files, each module's changes with their tests, then docs and CI. It holds back .env, keys and tfstate (exit 4), flags files that mix formatting with real hunks, and flags a move whose callers' import edits sit in another group, since that commit would not build. It never picks feat vs fix: decide from what the change does.

Step 2 scans only the added lines of what is staged: provider-shaped tokens, high-entropy values assigned to key/secret/token/password, sensitive files and conflict markers. Output is redacted. A false positive is waived in .commit-craft-allow by fingerprint or path, with a reason.

Step 3 blocks vague subjects ("fix", "update"), subjects over 72 characters, no blank line after the subject, and a change of 40+ lines or 4+ files with no body. It enforces Conventional Commits only if the repo already uses them.

Step 4 also blocks fixup!/squash!/WIP commits and warns on duplicates and revert pairs. Install assets/hooks/ to run steps 2 to 4 on every commit and push.

Hard rules

  • Never git add -A or git add . on a mixed tree. Stage each group by name or by hunk.
  • A blocked gate means no commit. Remove the value and load it at runtime. Never --no-verify, never waive a real secret.
  • A pushed secret is rotated first. Deleting it in a new commit leaves it in history (references/secret_response.md).
  • Each commit builds. Tests ride with their change; moves carry their callers.
  • The body says why. The diff already says what.
  • Rewrite only unpushed history. Rebasing or amending shared commits is the user's call.

Scripts

ScriptRoleExit codes
scripts/commit_planner.pyGroups, order, staging commands, MOVE/MIXED/SIZE flags0 one commit · 2 split · 3 bad input · 4 secrets file held back
scripts/secret_gate.pyStaged or range scan for credentials, sensitive files, conflict markers0 · 2 warnings · 3 · 4 blocked
scripts/message_linter.pyOne message (-m, --message-file) or a series (--range)0 · 2 warnings · 3 · 4 blocked

All support --help, --sample and --output json.

References and assets

How to install Commit Craft

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/engineering/skills/commit-craft#main ~/.claude/skills/commit-craft

Codex

npx degit alirezarezvani/claude-skills/engineering/skills/commit-craft#main ~/.codex/skills/commit-craft

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Commit Craft skill do?

Turn a mix of changes into clean, reviewable commits with good messages, blocking staged secrets and .env files. Use whenever the user says commit this, wants to split work into commits, write a commit message, or is about to push.

+How do I install Commit Craft in Claude Code?

Copy the skill folder into ~/.claude/skills/commit-craft, for example with "npx degit alirezarezvani/claude-skills/engineering/skills/commit-craft#main ~/.claude/skills/commit-craft". Claude Code loads it automatically and uses it when a task matches.

+Does Commit Craft work with ChatGPT or Codex?

Yes. Commit Craft uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/commit-craft. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Commit Craft free?

Commit Craft is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related software development skills

  1. Code Review

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's…

    mattpocock/skills★ 327k
  2. Using Agent Skills

    Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of…

    addyosmani/agent-skills★ 119k
  3. Build

    Fully automate a coding task with make-plan, do, and babysit.

    thedotmack/claude-mem★ 118k
  4. Deep Learning Book

    Use when studying or applying Goodfellow, Bengio and Courville's Deep Learning, or asking if its advice still holds.

    alirezarezvani/claude-skills★ 30k
  5. Engineering Skills

    Find which engineering skill fits a task: architecture, frontend, backend, QA, DevOps, security, AI/ML, data, cloud.

    alirezarezvani/claude-skills★ 30k
  6. Env Secrets Manager

    Use when auditing .env files, planning credential rotation, chasing a missing env var in production or hardening a repo against leaked…

    alirezarezvani/claude-skills★ 30k
  7. Extract

    Turn a fix or pattern that keeps coming up into a reusable skill with SKILL.md, reference docs and examples.

    alirezarezvani/claude-skills★ 30k
  8. Focused Fix

    Use when a whole feature or module is broken and needs fixing end to end ('make X work', 'the Y module is broken').

    alirezarezvani/claude-skills★ 30k
  9. Full Page Screenshot

    Use when asked for a full-page or long screenshot of a web page.

    alirezarezvani/claude-skills★ 30k

See all software development skills →

More skills from alirezarezvani

  1. Company Os

    Use when choosing or setting up how the company runs: EOS, Scaling Up or OKRs, accountability chart, scorecard, meeting rhythm, quarterly…

    alirezarezvani/claude-skills★ 30k
  2. Competitive Intel

    Use for competitor analysis, battlecards, win/loss review or positioning against alternatives.

    alirezarezvani/claude-skills★ 30k
  3. Competitive Teardown

    Deep competitor teardown: pricing, reviews, hiring, SEO, UX, scored across 12 dimensions with SWOT and positioning maps.

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.