cleanup-pr-diff-worktree
CommunityClean up PR worktrees, force-remove dirty leftovers.
System Documentation
What problem does it solve?
When using a dedicated git worktree for pull request diff reviews, leftover uncommitted changes or extra files often block standard worktree removal, leaving unnecessary clutter in your project repository. This Skill automates the cleanup of these PR review worktrees, even when they are dirty or non-empty, eliminating manual deletion hassle and git errors.
Core Features & Use Cases
- Force Cleanup Support: Removes worktrees with uncommitted changes or extra files that would normally block deletion, with an optional no-force mode for strict cleanup requirements.
- Flexible Target Identification: Accepts either the worktree folder name under the project's worktrees/ directory or an absolute filesystem path to the worktree location.
- Safety Guardrails: Restricts cleanup operations only to paths under the project's designated worktrees/ root, preventing accidental deletion of unrelated directories.
- Use Case: After finishing a PR code review in an isolated worktree, use this Skill to instantly clean up the worktree without manually resolving git worktree removal errors or deleting leftover files.
Quick Start
Use the cleanup-pr-diff-worktree skill to remove the PR-123 worktree from your current git project, including any leftover uncommitted files.
Dependency Matrix
Required Modules
Components
💻 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: cleanup-pr-diff-worktree Download link: https://github.com/D3Hunter/ai-engineer/archive/main.zip#cleanup-pr-diff-worktree 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 537,000+ vetted skills library on demand.