pcl

Delete stale Git branches and prune unused worktrees via GitHub CLI.

221|34|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/spawn --skill pcl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pcl
Source: https://github.com/OpenRouterTeam/spawn/tree/main/.claude/skills/pcl
Command: npx skills add https://github.com/OpenRouterTeam/spawn --skill pcl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps maintain a clean Git repository by automatically identifying and removing stale local and remote branches that are no longer associated with open pull requests, and also prunes unused worktrees.

Core Features & Use Cases

  • Remote Branch Cleanup: Deletes remote branches that have no corresponding open PR.
  • Local Branch Cleanup: Deletes local branches that are either merged into main or have no remote counterpart.
  • Worktree Pruning: Removes stale Git worktrees.
  • Dry Run Mode: Allows previewing deletions without making any changes.
  • Use Case: After a feature development cycle, use this skill to automatically clean up all the branches that were merged and no longer needed, keeping the repository tidy.

Quick Start

Run the pcl skill to clean up stale git branches and worktrees.

Frequently Asked Questions about pcl

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

FAQPage Schema
How do I clean up stale git branches that have no open pull requests?

To delete stale git branches, you can automatically remove local and remote branches that lack an associated open pull request. This process relies on GitHub CLI for PR status checks to ensure active branches are preserved.

Can I preview git branch deletions before executing them?

Yes, you can preview git branch deletions using a dry-run mode. This mode allows you to identify merged local branches, orphaned remote branches, and unused worktrees for pruning without making any actual changes to the repository.

Do I need GitHub CLI to remove stale remote branches?

Yes, GitHub CLI is required to remove stale remote branches safely. The cleanup process relies on GitHub CLI to check pull request status, ensuring that remote branches associated with open PRs are not deleted during repository maintenance.

What is the best way to prune unused git worktrees and merged local branches?

The best way to prune unused git worktrees and merged local branches is to run an automated repository cleanup skill. It identifies local branches merged into main or lacking a remote counterpart and removes stale worktrees to maintain repository hygiene.

When should I not use automated git branch cleanup?

You should not use automated git branch cleanup without first running a dry-run preview if you have unmerged local branches lacking a remote counterpart. The deletion is permanent, so always verify the identified stale branches and worktrees before execution.