decompose-branch

Decompose a messy Git branch into atomic commits with phase-driven workflow.

1|1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/corygabrielsen/skills --skill decompose-branch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: decompose-branch
Source: https://github.com/corygabrielsen/skills/tree/main/decompose-branch
Command: npx skills add https://github.com/corygabrielsen/skills --skill decompose-branch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Decompose a messy local branch into a sequence of atomic commits ready for review and merge, simplifying PRs and preserving a clean history.

Core Features & Use Cases

  • Atomic commits: break large changes into smallest logical units for clear, incremental review.
  • Phase-driven workflow: Analyze, Plan, Execute, and Verify with optional human-in-the-loop gates to ensure quality before commits.
  • History integrity: verify that the decomposed branch is equivalent to the original feature branch.

Quick Start

Phase 1: Analyze your branch by inspecting commits and changes against the base master (e.g., git log master..HEAD, git diff master...HEAD, git diff --stat master...HEAD). Phase 2: Plan the decomposition by outlining atomic commits and their dependencies. Phase 3: Execute the decomposition by creating a new branch (e.g., feature-branch-decomposed) and applying commits in the planned order. Phase 4: Verify the result by comparing with the original branch (e.g., git diff master..HEAD) to ensure equivalence.

Frequently Asked Questions about decompose-branch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split a messy git branch into atomic commits?

To split a messy git branch into atomic commits, the Skill analyzes local changes against the base branch, plans logical commit units, executes the sequence on a new branch, and verifies the result matches the original.

What is the best way to prepare a feature branch for a pull request?

The best way to prepare a feature branch for a pull request is decomposing it into smallest logical units. This phase-driven workflow breaks large changes, plans commit order, and applies optional human-in-the-loop gates to ensure quality.

Can I review the commit plan before changes are applied to my branch?

Yes, you can review the commit plan before execution. The workflow supports optional human-in-the-loop checks during the Analyze and Plan phases, allowing you to outline atomic commits and verify dependencies before applying them.

How do I verify branch history integrity after reorganizing commits?

To verify branch history integrity after reorganizing commits, the Skill compares the final decomposed branch against the original feature branch using git diff, ensuring the two are equivalent and no changes were lost during decomposition.

How does breaking changes into logical units improve code review?

Breaking changes into logical units improves code review by creating clear, incremental atomic commits. This simplifies the PR process for reviewers by isolating distinct modifications rather than presenting a single, large set of messy changes.

Related Skills