doodledood/claude-code-plugins/rewrite-history
Claude Code and agent skill by doodledood/claude-code-plugins
- community
Checking that the SKILL.md file is still in the repository.
Rewrite branch into clean, narrative-quality commits. Creates backup, reimplements on fresh branch, verifies byte-identical, then replaces original branch history.
Install
npx vskill@latest install doodledood/claude-code-plugins/rewrite-historySKILL.md
The same SKILL.md was published earlier as majiayu000/claude-skill-registry/rewrite-history.
Rewrite the current branch's history into clean, narrative-quality commits suitable for code review.
Goal
Transform messy development history into a logical story reviewers can follow commit-by-commit. Original branch is rewritten; backup preserved for rollback.
Arguments
$ARGUMENTS = optional flags (--auto skips interactive approval)
Preconditions
Abort with clear error if:
- On main/master branch
- Uncommitted changes exist
- No commits to rewrite (branch matches main)
Execution
- Create backup branch:
{branch}-backup-{timestamp}— permanent until manually deleted - Analyze the diff between current branch and main—understand the complete change set
- Create temp branch from main for clean reimplementation
- Plan the narrative—structure changes into logical, self-contained commits (foundations → features → polish)
- Reimplement by recreating changes commit-by-commit with conventional commit messages; use
--no-verifyfor intermediate commits - Verify byte-identical:
git diff {original-branch}MUST be empty—abort if any difference - Replace original branch: point original branch to clean history (final commit runs hooks normally)
- Offer to push with
--force-with-lease
Verification Requirement
The byte-identical check is non-negotiable. If git diff {backup-branch} shows ANY difference after reimplementation:
- Abort immediately
- Report exactly what differs
- Leave backup branch intact for recovery
Constraints
- Analyze the complete diff only—ignore original commit history
- One concern per commit—atomic, independently revertible
- Conventional commit messages:
type(scope): description - Never add "Co-Authored-By" or "Generated with Claude Code"
- Always use
--force-with-leasefor push (never--force)
Interactive Mode
Unless $ARGUMENTS contains --auto:
- Present proposed commit plan before execution
- Allow adjustment or cancellation
Rollback
If anything goes wrong: git reset --hard {branch}-backup-{timestamp}
Output
Report commit count, backup branch name, and the new commit log.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude-plugins/vibe-extras/skills/rewrite-history/SKILL.md
Popularity
- Repository stars
- 20
- Repository forks
- 3
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/doodledood/claude-code-plugins/rewrite-history)