pr-cleanup

Refines pull requests through parallel audits, focused sizing, and review loops.

6|1|Updated Jul 11, 2026
One-click install
npx skills add https://github.com/jl-cmd/claude-dev-env --skill pr-cleanup-jl-cmd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pr-cleanup
Source: https://github.com/jl-cmd/claude-dev-env/tree/main/skill-archive/pr-cleanup
Command: npx skills add https://github.com/jl-cmd/claude-dev-env --skill pr-cleanup-jl-cmd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Large or messy pull requests are hard to review and merge safely. This Skill coordinates a structured cleanup workflow that audits placement and naming, narrows the delivery boundary, and runs simplify and code-review passes before promotion. ## Core Features & Use Cases - Parallel preflight audits: Runs shared-extraction and capability-naming audits in isolated worktrees, combining findings into a single change map. - Focused delivery sizing: Selects one coherent pull request or an ordered replacement stack using the pr-small-cl boundary decision. - Gated promotion: Promotes parent and child pull requests only after exact commit ancestry checks, test validation, and simplify/review loops pass. - Use Case: Given a draft GitHub PR that mixes refactors and features, run the cleanup to audit reusable code placement, rename capability surfaces, split the PR if needed, and promote it to Ready with recorded SHAs and evidence. ## Quick Start Ask the AI to run PR cleanup on a specific GitHub pull request number, URL, or branch.

Frequently Asked Questions about pr-cleanup

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

FAQPage Schema
How do I clean up a large pull request before review?▼

Provide a GitHub PR number, URL, or branch and run the cleanup workflow. It audits code placement and naming, chooses a focused delivery boundary, applies findings in dependency order, and runs simplify and code-review passes before promoting the PR to Ready.

How to split a pull request into smaller stacked PRs?▼

The pr-small-cl step evaluates the combined audit findings and selects either one coherent pull request or an ordered replacement stack. It records the first PR boundary, dependencies, tests, and follow-up work for the split.

What input does the PR cleanup workflow require?▼

It requires a GitHub pull request number, URL, or branch. If the target is missing, the workflow stops and asks for one, since all audits and promotion gates operate on the resolved pull request and its repository.

Does PR cleanup merge or mark pull requests ready automatically?▼

No. Pull requests stay in draft state until their applicable Ready gate completes, and merge authority remains with the user. Promotion to Ready requires recorded validation evidence and exact commit ancestry checks.

How does parent-child PR promotion verify correctness?▼

The child merges the exact recorded parent_ready_sha, then git merge-base --is-ancestor proves that SHA is an ancestor of the child head with exit code 0. Child tests, simplify, and code review rerun on the new head before promotion.