complete

Remove worktrees and merged-PR branches after a PR merge.

4|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/skaisser/blueprint --skill complete-skaisser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: complete
Source: https://github.com/skaisser/blueprint/tree/main/skills/complete
Command: npx skills add https://github.com/skaisser/blueprint --skill complete-skaisser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cleans up worktrees and related branches automatically after a PR merge, reducing clutter and preventing stale worktree configurations from accumulating.

Core Features & Use Cases

  • Detects a completed worktree-enabled PR workflow and safely removes the associated worktree.
  • Deletes local and remote branches that are no longer needed, while protecting main, master, and staging branches as configured.
  • Skips cleanup when nothing to clean up, and works with both standard plan flows and worktree-based flows.

Quick Start

Run the /complete command after merging a PR to trigger automated cleanup in the main repository.

Frequently Asked Questions about complete

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

FAQPage Schema
How do I automatically clean up git worktrees after a PR merge?

After merging a PR, trigger the /complete command to automatically detect the completed workflow, verify the environment, safely remove the worktree, and delete both local and remote branches.

What is the best way to delete merged PR branches and worktrees together?

Using an automated cleanup workflow is the best way to delete merged PR branches and worktrees together, as it applies environment detection and safety checks before removing local and remote branches simultaneously.

Can I use automated branch cleanup with standard plan workflows instead of worktree-based flows?

Yes, automated branch cleanup works with both standard plan workflows and worktree-based flows. It skips cleanup when nothing needs removing and safely deletes unnecessary local and remote branches.

Does automated worktree cleanup protect main and staging branches from being deleted?

Yes, automated worktree cleanup protects main, master, and staging branches from deletion. It implements safety checks to ensure only merged PR branches are removed while preserving critical branch configurations.

Why do stale worktree configurations accumulate after merging pull requests?

Stale worktree configurations accumulate after merging pull requests because standard git workflows do not automatically remove the worktree directory or delete the associated local and remote branches once a PR is merged.

What happens if I run worktree cleanup when there is nothing to clean up?

If you run worktree cleanup when there is nothing to clean up, the process detects the clean state and skips the removal steps entirely. This prevents errors and ensures no unnecessary actions are taken on the repository.