worktrees:finish

Finalize git worktrees via PR or direct merge and clean up branches.

4|1|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/aaronbassett/aaronbassett-marketplace --skill worktrees-finish
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktrees:finish
Source: https://github.com/aaronbassett/aaronbassett-marketplace/tree/main/plugins/worktrees/skills/finish
Command: npx skills add https://github.com/aaronbassett/aaronbassett-marketplace --skill worktrees-finish

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies and automates the finalization of work in a git worktree, coordinating PR creation or direct merges, and cleaning up the associated worktrees and branches after work is complete.

Core Features & Use Cases

  • PR-based finish: Create a pull request to merge worktree changes into the target branch.
  • Direct merge option: Support direct merges for orchestrator workflows.
  • Cleanup & hygiene: Remove the worktree and delete local/remote branches to maintain a clean repository.
  • Use Case: When a feature worktree is finished, run this Skill to merge, delete the worktree, and prune branches in both local and remote environments.

Quick Start

Finish the current worktree by creating a PR or performing a direct merge and then removing the worktree and related branches.

Frequently Asked Questions about worktrees:finish

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

FAQPage Schema
How do I clean up a git worktree after merging a branch?

To clean up a git worktree after merging, you need to remove the worktree directory and delete the associated local and remote branches. This skill automates that entire cleanup process to maintain repository hygiene.

Can I create a GitHub pull request directly from a git worktree?

Yes, you can create a GitHub pull request directly from a worktree. This skill uses optional GitHub CLI integration to handle PR creation, finalizing your worktree changes before removing the worktree itself.

What is the best way to automate git worktree cleanup and branch deletion?

Automating git worktree cleanup requires coordinating worktree removal with local and remote branch deletion. This skill handles the complete finalization workflow, ensuring both the worktree and branches are pruned safely after a merge or PR.

Does finishing a worktree require the GitHub CLI?

Finishing a worktree does not strictly require the GitHub CLI unless you want to create a pull request. The skill uses standard git operations for direct merges and branch cleanup, but integrates with GitHub CLI optionally for PR workflows.

How do direct merges work when finalizing a git worktree?

Direct merges for git worktree finalization bypass pull requests to merge changes immediately into the target branch. This skill supports direct merges for orchestrator workflows and subsequently removes the worktree and related branches.

Why should I remove local and remote branches after finishing a worktree?

Removing local and remote branches after finishing a worktree prevents stale branch accumulation and maintains a clean repository state. This skill ensures both environments are pruned automatically once the worktree work is finalized.