closeout

Validate merged PR status and prune local branches, worktrees, and artifacts.

92|7|Updated Dec 11, 2025
One-click install
npx skills add https://github.com/dannys-code-corner/incan --skill closeout-dannys-code-corner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: closeout
Source: https://github.com/dannys-code-corner/incan/tree/main/.agents/skills/closeout
Command: npx skills add https://github.com/dannys-code-corner/incan --skill closeout-dannys-code-corner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safely close out completed Incan work after a PR is merged by verifying merge status, syncing the base branch, removing task-owned local worktrees/assets, deleting merged local/remote branches, pruning refs, and reporting dirty or ambiguous leftovers. Use when the user says /closeout, asks to clean up after a merged PR, or wants local RFC/issue branch/worktree cleanup.

Core Features & Use Cases

  • Conservative cleanup: inventories and selectively removes only task-owned artifacts after merge verification.
  • Safe deletion: prioritizes not touching active workspaces or unrelated changes.
  • Use Case: after merging a PR, run a closeout to remove local topic branches, stale worktrees, and scratch artifacts created for the task.

Quick Start

Close out the task by removing only merged PR artifacts and task-owned worktrees after merge verification.

Frequently Asked Questions about closeout

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

FAQPage Schema
How do I clean up local git branches and worktrees after a PR merge?

Safe PR cleanup requires verifying merge status and syncing the base branch before selectively removing task-owned artifacts. This process targets only merged local topic branches, stale worktrees, and scratch assets while preserving active workspaces and unrelated changes.

What is the safest way to delete merged local git branches without losing uncommitted changes?

Safe deletion of merged local git branches requires an explicit inventory and conservative cleanup approach. By validating merge status and syncing the base branch first, the process guarantees active workspaces and unrelated changes remain untouched while pruning only task-owned artifacts.

Does git worktree cleanup automatically remove scratch artifacts and remote branches?

Yes, conservative git worktree cleanup removes scratch artifacts and remote branches after explicit merge verification. The process inventories task-owned assets first, pruning local and remote refs safely only after confirming the PR is successfully merged and syncing the base branch.

When should I run a git closeout to prune refs and worktrees?

Run a git closeout to prune refs and worktrees immediately after a PR is merged. This workspace hygiene step removes task-owned local branches and scratch artifacts, preventing stale refs from accumulating while explicitly reporting any dirty or ambiguous leftovers for review.

What happens to dirty or ambiguous git worktrees during branch cleanup?

During branch cleanup, dirty or ambiguous git worktrees are explicitly reported rather than automatically deleted. This conservative approach ensures active workspaces and uncommitted changes are safely preserved while only removing verified, merged task-owned artifacts from the repository.