
Simplify Pull Requests
Shrink your own change to its smallest complete fix before opening a PR.
Install
npx skills add openclaw/openclaw --skill pr-simplify -g -a claude-code -y- Repository
- openclaw/openclaw394k
- Category
- Git and review
- Updated
- 3d ago
- License
- MIT
- Context cost
- Lightabout 1,452 tokens
- Runs scripts
- No, instructions only
What it does
Simplify your own change to its smallest complete fix. Use before opening a PR, before pushing large repairs to one, or when asked to shrink a PR or clean up slop.
Simplify the change
An editing pass by the change's author: run it on your own branch before you open the PR, and again before you push large repairs. It precedes review and never replaces it. Inherit the task's scope and repair authority; a review-only request gets findings instead of edits. The chosen maintainer workflow owns publication, review and merge.
The diff is a proposal. Passing tests show it works, not that its architecture or every added test is needed.
Rules: the root AGENTS.md sections "Design priorities", "One owner, complete cutover", "Runtime and code safeguards" and "Product and validation", plus the nearest scoped AGENTS.md. Steps 2 and 3 apply every rule to every changed file.
1. Re-derive the smallest complete fix
Read the user's outcome and latest scope, the complete diff against the target merge base, and retained proof. Reuse session context already gathered. Then ask:
Starting from the base, what is the smallest complete fix using the owners already present? Would I still introduce this architecture?
Inspect the largest added modules, state, adapters and test scaffolding first. Read their direct callers and relevant history: apparently redundant behavior may protect a shipped configuration or an earlier regression. Scope is the changed system and the paths it replaces.
Trace every changed hunk to the stated outcome. A hunk that serves another goal leaves this change: drop it or move it to its own PR.
Count the non-mechanical changed lines. Above about 800, or about 500 for complex logic, name the smallest coherent stage that can land first and cut the change to that stage.
Done when you can state the defect, the required invariant, and the smallest complete fix in one sentence each, and every remaining hunk serves that fix.
2. Remove unnecessary architecture
Apply each supported simplification in the diff:
