rewrite-commit-history

Rewrite feature branch history into clean conventional commits with backup branches.

3|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/ravnhq/typescript-blueprint --skill rewrite-commit-history
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rewrite-commit-history
Source: https://github.com/ravnhq/typescript-blueprint/tree/main/.agents/skills/rewrite-commit-history
Command: npx skills add https://github.com/ravnhq/typescript-blueprint --skill rewrite-commit-history

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rewrite a feature branch history into clean conventional commits, enabling easier review, bisecting, and long-term maintainability of project history. It protects changes with a backup, supports soft resets, and commits atomically to preserve a progressive narrative.

Core Features & Use Cases

  • Guarded workflow: ensures a clean working tree and correct base branch before rewriting history.
  • Safe backup and atomic recommits: creates a timestamped backup branch and applies changes in small, verifiable steps.
  • Reorganization and conventionalization: groups related changes into logical commits for clearer PRs and traceability.
  • Use Case: prior to PRs, clean up messy commits and convert them to conventional-commit format for a tidy history.

Quick Start

Run the rewrite-commit-history skill on a feature branch to produce a clean, conventional-commit history.

Frequently Asked Questions about rewrite-commit-history

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

FAQPage Schema
How do I clean up messy WIP commits before a pull request?▼

To clean up messy WIP commits before a pull request, you can rewrite your feature branch history into clean, logical conventional commits. This process groups related changes into verifiable steps for easier review and long-term maintainability.

What is the best way to convert branch history to conventional commits?▼

Converting branch history to conventional commits involves reorganizing related changes into logical units and applying atomic recommits. This creates a tidy, progressive narrative that improves traceability and bisectability for your project.

How does rewriting git branch history with a backup work safely?▼

Rewriting git branch history safely requires guard checks to ensure a clean working tree and correct base branch. The workflow creates a timestamped backup branch before applying changes in small, atomic recommit steps.

Can I reorganize feature branch commits into logical units without losing changes?▼

Yes, you can reorganize feature branch commits into logical units without losing changes by using a safe, deterministic workflow. It applies soft resets and atomic recommits while protecting your original state with a timestamped backup branch.

When do I need to rewrite commits for bisectability?▼

You need to rewrite commits for bisectability when your branch contains messy or disorganized work-in-progress history. Reorganizing these commits into clean conventional formats allows for clearer PRs and progressive, verifiable narratives.

Does rewriting git history require a clean working tree?▼

Yes, rewriting git history requires a clean working tree and the correct base branch to ensure safety. The workflow uses guard checks to verify these conditions before creating a backup and applying atomic recommits.