worktree-pr-and-clean
CommunityPush clean worktree PRs after approval.
Authorphenobarbital
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Automate end-to-end management of temporary git worktrees: push the selected branch, open a PR to main after explicit user approval, and remove the worktree to keep the repository clean.
Core Features & Use Cases
- Locate the active worktree by reading .worktrees/_active.json (if present) or by running git worktree list and selecting a non-primary worktree.
- Verify state: ensure the worktree has a clean status and the current branch matches the expected branch.
- Push to origin: push the branch associated with the active worktree.
- Create a PR: if GitHub CLI is available and authenticated, open a PR to main; otherwise provide manual PR steps.
- Clean up: remove the worktree, prune stale metadata, and clear the active-worktree indicator when appropriate.
- Report: provide PR link, commands executed, and any remaining manual steps.
Quick Start
After user approval, push the active worktree branch, open a PR to main, and clean up the worktree.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: worktree-pr-and-clean Download link: https://github.com/phenobarbital/antigravity-config/archive/main.zip#worktree-pr-and-clean Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 510,000+ vetted skills library on demand.