Finishing a Development Branch — The Closer
> **Type:** Rigid
Best use case
Finishing a Development Branch — The Closer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
> **Type:** Rigid
Teams using Finishing a Development Branch — The Closer should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/finishing-a-development-branch/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Finishing a Development Branch — The Closer Compares
| Feature / Agent | Finishing a Development Branch — The Closer | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
> **Type:** Rigid
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Finishing a Development Branch — The Closer
> **Type:** Rigid
> **Trigger:** Implementation complete, all tests pass, ready to integrate work
## Iron Law
```
NO MERGE WITHOUT PASSING TESTS — NO CLEANUP WITHOUT CONFIRMATION
```
## Purpose
Provides a structured process for completing feature work: verifying, integrating, and cleaning up. Prevents the common "just merge and forget" pattern that leaves orphaned branches and broken worktrees.
## Pre-Requisites
Before invoking this skill:
- [ ] All implementation tasks are complete
- [ ] All tests pass (verified via `verification-before-completion`)
- [ ] Code review is complete (if applicable)
## Process
### Step 1: Verify Tests Pass
```bash
<test-command> # Run FULL test suite
# If ANY test fails → STOP. Fix before proceeding.
```
### Step 2: Determine Base Branch
```bash
# Auto-detect: main or master
BASE=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
```
### Step 3: Present Exactly 4 Options
**Option 1: Merge Locally**
```bash
git checkout $BASE
git merge --no-ff feature/<name> # Preserve merge commit
```
**Option 2: Push + Create PR**
```bash
git push origin feature/<name>
# Create PR via CLI or web
```
**Option 3: Keep As-Is**
- Branch stays, worktree stays
- User will handle integration later
**Option 4: Discard**
- **Requires confirmation**: User must type "discard" to confirm
- Removes all work permanently
```bash
git checkout $BASE
git worktree remove .worktrees/feature/<name>
git branch -D feature/<name>
```
### Step 4: Execute Choice
Follow the chosen option exactly. No modifications, no "improvements".
### Step 5: Cleanup (Options 1, 2, 4 only)
```bash
# Remove worktree if it exists
git worktree remove .worktrees/feature/<name> 2>/dev/null || true
# Delete local branch (only for Option 1 — already merged)
git branch -d feature/<name> 2>/dev/null || true
```
## Key Rules
- **Always present all 4 options** — never assume which the user wants
- **Discard requires explicit confirmation** — "discard" typed by user
- **No partial merges** — merge all or nothing
- **Cleanup is automatic** for options 1, 2, 4 — but NOT option 3
## Rationalization Table
| Excuse | Reality |
|--------|---------|
| "I'll clean up later" | You won't. Orphaned branches accumulate. Clean up now. |
| "Just merge, no need for options" | User might want a PR, or want to keep the branch. Ask. |
| "Tests were passing earlier" | Re-verify NOW. State changes between then and now. |
| "Discard confirmation is overkill" | Permanently deleting work deserves one extra step. |Related Skills
Test-Driven Development — The Iron Law
> **Type:** Rigid (NO exceptions)
backend-development
Backend API design, database architecture, microservices patterns, and test-driven development. Use for designing APIs, database schemas, or backend system architecture.
YAML Prompt Library
> Store reusable AI prompts as YAML files with structured messages, variables, and test data for version-controlled prompt engineering.
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Writing Plans — TDD-Sized Task Breakdown
> **Type:** Rigid process (follow structure exactly)
wireframing
Wireframing patterns including layout grids, content blocks, responsive breakpoints, and page layout patterns for landing pages, dashboards, and forms. Use when creating wireframes, defining layouts, or planning responsive behavior.
windows-registry-editor
Expert Windows Registry editor and optimizer via PowerShell. Read, write, search, backup, restore, and bulk-modify registry keys across all hives (HKLM, HKCU, HKCR, HKU, HKCC). Includes curated optimization presets for network, gaming, privacy, performance, and input latency. Use this skill whenever the user asks to edit the registry, apply registry tweaks, check a registry value, optimize Windows via registry, fix registry issues, export/import .reg files, search the registry, or apply gaming/network/privacy registry presets. Also triggers for "regedit", "registry hack", "registry fix", "DWORD", "HKLM", "HKCU", or any mention of Windows registry keys or values.
windows-network-optimizer
Diagnose, optimize, and verify Windows 11 network and system performance via PowerShell. Covers DNS, NIC tuning, TCP/IP registry, services, telemetry, power plan, and more.
windows-error-debugger
Diagnose, debug, and fix Windows crashes, BSODs, driver failures, and system errors via PowerShell. Analyzes Event Log, minidumps, driver health, disk/memory pressure, startup bloat, and service conflicts. Builds a growing knowledge base of resolved issues per machine. Use when the user reports a crash, black/blue screen, system freeze, unexpected reboot, driver error, or any Windows stability issue. Also triggers for "BSOD", "blue screen", "black screen", "crash", "system error", "bugcheck", "minidump", "driver failure", "unexpected shutdown", "paging file too small", "system hang", "Windows froze", "PC crashed", "kernel error", or any mention of Windows Event Log errors.
White-Label Config
> Transform any application into a customizable, self-hostable product with typed configuration, feature flags, and runtime env overrides.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".