condense-branch

Squash branch commits into a single commit with a synthesized message.

1|1|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/williamthorsen/codeassembly --skill condense-branch-williamthorsen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: condense-branch
Source: https://github.com/williamthorsen/codeassembly/tree/main/packages/agents/content/skills/condense-branch
Command: npx skills add https://github.com/williamthorsen/codeassembly --skill condense-branch-williamthorsen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long-lived feature branches accumulate many small, noisy commits that clutter history and make reviews harder. This Skill condenses an entire branch into one well-described commit while preserving a backup branch for safety. ## Core Features & Use Cases - Branch consolidation: Soft-resets all commits since the merge base with the default branch and recommits them as a single commit. - Synthesized commit messages: Analyzes existing commit descriptions (or delegates to a summarize-change skill) to compose a conventional-commit-style title and body, including Change: trailers from a consolidated change record. - Safety mechanisms: Automatically creates a versioned backup branch (e.g., feature-x-v1) before rewriting history and stashes dirty working trees. - Use Case: Before opening a pull request, squash your 15 WIP commits on a feature branch into one clean commit with a comprehensive message that follows your team's commit conventions. ## Quick Start Condense the current branch into a single commit with a comprehensive message, creating a backup branch first.

Frequently Asked Questions about condense-branch

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

FAQPage Schema
How do I squash all commits on a Git branch into one?

Use git reset --soft to the merge base with the default branch, then stage everything and commit with a new message. This Skill automates that flow, composing the message from existing commit descriptions and a consolidated change record.

How to write a good commit message when squashing a branch?

Synthesize the existing commit descriptions, leading with what the branch accomplishes as a whole and using later paragraphs for implementation details. If commits lack detail, delegate message composition to a summarize-change skill and follow conventional commit conventions.

Is it safe to squash commits on a branch before a pull request?

Yes, provided you create a backup branch first. This Skill creates a versioned backup like branch-name-v1 before condensing, incrementing the version if a backup already exists, so the original history remains recoverable.

What happens to uncommitted changes when condensing a branch?

Uncommitted changes are stashed before the condensing process begins if the working tree is dirty. This prevents unrelated modifications from being swept into the squashed commit.

Why does the condensed commit message have no Change trailer?

The Change trailers come from a consolidation file produced by describe-change.mjs. If that call fails, finds no matching entries, or leaves the file empty, the commit is created without any trailer and the error is relayed to the developer.