clean-copy
Reimplement the current branch on a new branch with a clean, narrative-quality git commit history. Use when asked to make a clean copy branch, clean up commit history by replaying work, or rebuild a branch as reviewable commits.
- License 许可
- MIT
- 最近更新
- 2026-09-15
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- clean-copy
- description
- Reimplement the current branch on a new branch with a clean, narrative-quality git commit history. Use when asked to make a clean copy branch, clean up commit history by replaying work, or rebuild a branch as reviewable commits.
03 SKILL.md 正文
Clean copy
Reimplement the current branch on a new branch with a clean, narrative-quality commit history suitable for reviewer comprehension.
Workflow
- Gather context:
- Source branch:
git branch --show-current. - Working tree:
git status --short. - Commits since the repository's configured base branch:
git log <base-branch>..HEAD --oneline. - Diff summary:
git diff <base-branch>...HEAD --stat.
- Source branch:
- Validate the source branch:
- Ensure there are no uncommitted changes or merge conflicts.
- Compare the source branch with the configured base branch and report any divergence. Do not pull or rebase implicitly.
- Choose the new branch name:
- Use the user's requested name when provided.
- Otherwise use
<source-branch>-clean.
- Analyze the diff:
- Study all changes between the source branch and the configured base branch.
- Understand the final intended state before recreating it.
- Create the clean branch from the configured base branch. Do not pull or push implicitly.
- Plan the commit storyline:
- Break the implementation into self-contained logical steps.
- Each step should read like a stage of development in a tutorial.
- Reimplement the work:
- Recreate the final changes step by step.
- Commit after each coherent idea.
- Use clear commit subjects and descriptions.
- Keep each intermediate commit coherent enough to pass the repository's normal hooks. Never bypass hooks; if a slice cannot pass, split or revise it.
- Verify correctness:
- Confirm the final tracked tree exactly matches the original source branch (the commit history intentionally differs).
- Run the repository's final checks with normal hooks enabled.
- If the user also requested a pull request, use the
prskill.- Include a link to the original branch in the PR description.
Rules
- Never add yourself or an AI tool as an author, contributor, or co-author.
- Never include AI attribution in commits or PR content.
- The final clean branch must be identical to the source branch.
- Do not force push unless the user explicitly asks for it.
04 同仓库更多 Skills
writing-for-agents
Use when writing skills, agent instructions, or references consumed by agents.
write-tbp
Writing technical blog posts about project features and implementation details. Use when creating blog content about how a project solves interesting problems.
write-pr
Reference standards for writing pull request titles and descriptions, plus the pre-flight comment sweep over the diff. Use as supporting guidance when another skill or workflow needs PR content standards, not as the user-facing create/update PR workflow.
write-issue
Reference standards for writing and maintaining local or remote issues. Use when another skill needs issue title, body, type, or triage guidance.
write-exec-plan
Write or maintain a plan for complex work across phases or PRs. Resolve consequential technical unknowns through prototypes before defining implementation checklists and their evidence.
write-design-doc
Write a design doc that settles hard-to-reverse decisions before anyone builds.