Pr recreate

From Takazudo/claude-resources · View interactive version

Pr recreate is an AI agent skill from the GitHub repository Takazudo/claude-resources. Recreate a PR with clean commit history. Use for 'recreate pr', 'clean up pr history', or a PR full of try-and-error commits.

How to use this skill

Skill file

PR Recreate Command

Recreate a PR with a clean history when it has too many try-and-error commits or review comments.

IMPORTANT: This command ALWAYS uses squash merge to discard try-and-error history and create clean, meaningful commits. Never use cherry-pick.

Usage

Steps

1. Identify Target PR

2. Analyze PR Information

Extract:

CRITICAL: ALWAYS use the exact base branch from the original PR - NEVER default to main or develop

3. Determine New Branch Name

Check for existing versioned branches and generate next available version:

4. Create New Branch

git fetch origin
git checkout -b <new-branch> origin/<base-branch>

5. Squash Merge Old Branch

git merge --squash origin/<old-branch>

6. Create Meaningful Commits

CRITICAL: ALWAYS create MULTIPLE meaningful commits - NEVER just one commit

CRITICAL - NO COMMIT ALTERATION:

7. Push New Branch

git push -u origin <new-branch>

8. Create New PR

Use the EXACT base branch from step 2. Include:

9. Update Old PR

10. Report Summary

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.