ghostbuster

Sweep mergeable epic-team branches and delete safe stale branches in a git cage.

2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/geoyws/atmux --skill ghostbuster-geoyws
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ghostbuster
Source: https://github.com/geoyws/atmux/tree/main/plugins/atmux/skills/ghostbuster
Command: npx skills add https://github.com/geoyws/atmux --skill ghostbuster-geoyws

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

ghostbuster removes already-merged or mergeable epic-team branches in the current team’s git cage, while deferring branches that need human attention due to conflicts or active dirty worktrees.

Core Features & Use Cases

  • Mergeable epic sweep (conflict-aware): Detects trunk-ahead epic-team branches, probes merges via a temporary worktree, merges conflict-free ones, and defers those with conflicts.
  • Stale branch cleanup: Deletes branches that are fully merged (stale) or contentless merges (safe to remove without losing work).
  • Worktree-safe behavior: Never deletes branches that have active worktrees; if a worktree branch is dirty, it is deferred with a clear reason.
  • Single-team scope: Operates only on branches matching the calling trunk’s ${TRUNK}-epic-* namespace, never cross-cage and never targeting deploy variants like *-e2e or *-staging.
  • Push gate: Auto-pushes trunk only when trunk is not considered staging-grade (refuses auto-push for main, master, and *-staging).

Quick Start

Run the command to perform a safe dry-run report of which epic branches would be merged or deleted: /atmux:ghostbuster --dry-run.

Frequently Asked Questions about ghostbuster

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

FAQPage Schema
How do I safely clean up merged epic branches in git?

To safely clean up merged epic branches, you can sweep mergeable branches within a team trunk namespace using a temporary probe worktree. The tool classifies branches as mergeable, deferred, stale, or contentless, then deletes safe stale ones while protecting active worktrees.

How does conflict detection work for automated git branch merges?

Conflict detection for automated git branch merges works by using a temporary fold worktree to probe merges ahead of time. If conflicts are detected during the probe, the branch is deferred for human attention rather than merged automatically.

Can I delete git branches that have active dirty worktrees?

No, you cannot delete git branches with active dirty worktrees using this tool. It explicitly protects active worktrees from deletion, deferring any branch with a dirty worktree state and emitting a clear reason for the deferral.

What is the best way to prevent automated git merges from pushing to staging trunks?

To prevent automated git merges from pushing to staging trunks, use a push gate that refuses auto-pushes for main, master, and *-staging branches. This ensures staging-grade trunks are protected from automatic updates during epic branch sweeps.

How do I perform a dry run of an epic branch cleanup without making changes?

Perform a dry run of epic branch cleanup by passing the dry-run flag to generate a deterministic markdown report. This report details which branches would be merged or deleted, allowing you to verify safety before executing actual changes.