What problem does it solve?
After a feature branch is merged, developers often leave behind stale git worktrees, local branches, and open GitHub issues. This Skill automates the cleanup workflow for the bk-ci repository: it optionally closes the linked GitHub Issue, removes the local worktree directory, and deletes the local branch, all with safety confirmations.
Core Features & Use Cases
- Issue Resolution from Branch Name: Parses the GitHub issue number from branch naming conventions like
bug-12994 or feat-tenant-3-11524, checks its state via the GitHub MCP server, and closes it only after user confirmation.
- Safe Worktree Removal: Verifies the target worktree exists, checks for uncommitted changes, syncs local master with origin, and confirms merge status before removing anything.
- Guarded Branch Deletion: Deletes the local branch with
git branch -d, requiring explicit user consent before any force-delete, and never touches remote branches.
- Use Case: After merging PR for branch
bug-12994 into bk-ci master, invoke this Skill to close issue #12994, remove the worktree, and delete the local branch in one guided flow.
Quick Start
Close the worktree and finish the requirement for branch bug-12994, including closing its linked GitHub issue.