cleanup-commits

Rebase a feature branch into logical commits for PR review.

4|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/apocohq/skills --skill cleanup-commits
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cleanup-commits
Source: https://github.com/apocohq/skills/tree/main/skills/cleanup-commits
Command: npx skills add https://github.com/apocohq/skills --skill cleanup-commits

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rebase and reorganize commits into clean, meaningful commits for easy PR review.

Core Features & Use Cases

  • Rebase the current branch onto a base branch to produce logical, review-friendly commits.
  • Break changes into distinct commits (feature, refactor, test, docs) for clearer history.
  • Validate repository state and verify results before pushing to avoid broken PRs.

Quick Start

Run the cleanup-commits process to rebase and rewrite your current branch into clean, review-friendly commits.

Frequently Asked Questions about cleanup-commits

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

FAQPage Schema
How do I reorganize git commits before a PR review?

To reorganize git commits before a PR review, you rebase your current feature branch to group changes into clean, logical categories like features, refactors, and tests. This requires a clean working tree in an existing git repository.

What is the best way to break a complex feature branch into logical commits?

The best way to break a complex feature branch into logical commits is using git rebase to rewrite history. This separates mixed changes into distinct review-friendly commits for features, refactors, tests, and documentation.

Do I need a clean working tree to rebase and rewrite commit history?

Yes, you need a clean working tree to rebase and rewrite commit history. A clean state ensures the rebase process can safely reorganize commits without conflicts or losing uncommitted changes.

Can I specify a base branch when cleaning up commits for a PR?

Yes, you can optionally specify a base branch to rebase onto when cleaning up commits for a PR. This allows you to integrate upstream changes while reorganizing your feature branch into review-friendly commits.

Why should I clean up my git history before pushing a branch?

You should clean up your git history before pushing to avoid broken PRs and make code review easier. Validating repository state and verifying rebase results ensures your branch contains meaningful, logical commits.