recomposing-commits

recomposing-commits is a skill for Claude Code from nur-zaman/git-recompose-skill. It costs 59 tokens per session (4,233 once invoked), scanned A, original, MIT.

A workflow for reorganizing messy feature-branch commits into a clear logical history, using an isolated worktree and requiring review before applying changes.

In plain words
What is it for?
Use it to clean up, reorder, split, or recombine commits on a feature branch before review. It refuses to work on protected branches or with uncommitted changes.
Why use it?
It reduces the risk of damaging the original branch while separating unrelated changes and putting commits in a sensible order before a pull request.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the git-recompose plugin — 1 skill shipped together

Good fit Use it to clean up, reorder, split, or recombine commits on a feature branch before review. It refuses to work on protected branches or with uncommitted changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nur-zaman/git-recompose-skill/recomposing-commits
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.

Any agent
npx skills add nur-zaman/git-recompose-skill --skill recomposing-commits
Clone the repo
git clone --depth 1 https://github.com/nur-zaman/git-recompose-skill

Made for: Claude Code.

Or install git-recompose, the plugin that ships this one along with the rest of its 1 skill.

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 recomposing-commits

README.md
[![agentmods](https://agentmods.dev/badge/skills/nur-zaman/git-recompose-skill/recomposing-commits/github.svg)](https://agentmods.dev/skills/nur-zaman/git-recompose-skill/recomposing-commits)
Your own site
<a href="https://agentmods.dev/skills/nur-zaman/git-recompose-skill/recomposing-commits"><img src="https://agentmods.dev/badge/skills/nur-zaman/git-recompose-skill/recomposing-commits/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 recomposing-commits

Your own site · 80×15
<a href="https://agentmods.dev/skills/nur-zaman/git-recompose-skill/recomposing-commits"><img src="https://agentmods.dev/badge/skills/nur-zaman/git-recompose-skill/recomposing-commits.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,233 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.00059 $0.04233
Opus 5 $0.00030 $0.02116
Sonnet 5 $0.00012 $0.00847
Haiku 4.5 $0.00006 $0.00423

Measured 9d ago against content hash 524d45a44f84, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

recomposing-commits 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 9d 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.

skills/recomposing-commits/SKILL.md · 411 lines

How it starts

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

Recomposing Commits

Overview

Analyze messy commits → isolate in a worktree → let user review → apply back.

Core principle: The original branch is NEVER modified until the user explicitly approves the new history. Worktree isolation and the review gate are non-negotiable — even if the user says "just do it" or "I trust you, skip review."

Announce at start: "I'm using the recomposing-commits skill to reorganize your branch history."


Safety Check — Do This First

git rev-parse --abbrev-ref HEAD

Refuse immediately if the current branch is any of: main, master, dev, develop, development, staging, production, release, or matches release/* or hotfix/*.

⛔ Recomposing commits on '<branch>' is not allowed.
This skill only works on feature branches.
Please switch to your feature branch first.

Also refuse if HEAD is detached (the command above prints HEAD instead of a branch name):

⛔ You're in a detached HEAD state, not on a branch.
This skill needs a real branch to reset back onto at the end. Check out a branch first.

Also check for a dirty working tree before doing anything else:

git status --porcelain

If this prints anything, stop:

⛔ You have uncommitted changes. These won't be included in the recompose,
and they'll be at risk when the original branch is reset at the end.
Please commit or stash them first.

Do NOT create a workaround branch. Do NOT proceed on any of the above. Refuse and stop.


When to Use

  • Commits are WIP/messy and a PR is coming
  • Multiple unrelated changes were mixed into the same commits
  • Commit messages are unclear ("fix", "WIP", "stuff")
  • Commits need to be split, merged, or reordered

Do NOT use when:

  • History is already clean
  • You are on a protected/shared branch (refuse instead)
  • There is only one commit to restructure
  • The range contains a merge commit (see Step 3 — not supported, linear history only)

Read the full file on GitHub · 411 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. 9d ago First seen · 411 lines · 59 tokens per session scan A 524d45a44f84

Subscribe to this mod's changes

recomposing-commits is a skill published in the GitHub repository nur-zaman/git-recompose-skill (9 stars, last pushed 1mo ago), licensed MIT. It adds 59 tokens to every session and 4,233 once invoked, about $0.0003 per session on Opus 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.

Related

Other skills, from other repositories

pr-review

Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.

oliver-kriska/claude-elixir-phoenix · 59 tokens

phx-pr-review

Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.

oliver-kriska/claude-elixir-phoenix · 61 tokens

ship

Commit, push, and optionally create or update a PR for the current staged changes. Use when the user asks to "ship", "ship it", "ship changes", "commit push and PR", or "ship this".

tobihagemann/turbo · 47 tokens

branch-and-worktree-workflow

Isolates feature work in its own branch or worktree and integrates it cleanly when done. Use this when starting work that should not disturb the current workspace, when several efforts must proceed in parallel on one repository, or when implementation is finished and the change needs merging, rebasing, or splitting…

cbrock84/headcount · 70 tokens

stage

Stage implementation changes for commit with precise file selection. Use when the user asks to "stage changes", "stage files", "add files to staging", or "prepare changes for commit".

tobihagemann/turbo · 39 tokens

commit-staged-push

Commit already-staged changes and push in one step. Use when the user asks to "commit and push staged changes", "commit and push what's staged", or "commit staged and push".

tobihagemann/turbo · 44 tokens