Back to Skills

finishing-a-development-branch

verified

Use when implementation complete and tests pass - closes bd epic, presents integration options (merge/PR/keep/discard), executes choice

View on GitHub

Marketplace

withzombies-hyper

withzombies/hyperpowers

Plugin

withzombies-hyper

Repository

withzombies/hyperpowers
25stars

skills/finishing-a-development-branch/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/withzombies/hyperpowers/blob/main/skills/finishing-a-development-branch/SKILL.md -a claude-code --skill finishing-a-development-branch

Installation paths:

Claude
.claude/skills/finishing-a-development-branch/
Powered by add-skill CLI

Instructions

<skill_overview>
Close bd epic, verify tests pass, present 4 integration options, execute choice, cleanup worktree appropriately.
</skill_overview>

<rigidity_level>
LOW FREEDOM - Follow the 6-step process exactly. Present exactly 4 options. Never skip test verification. Must confirm before discarding.
</rigidity_level>

<quick_reference>
| Step | Action | If Blocked |
|------|--------|------------|
| 1 | Close bd epic | Tasks still open → STOP |
| 2 | Verify tests pass (test-runner agent) | Tests fail → STOP |
| 3 | Determine base branch | Ask if needed |
| 4 | Present exactly 4 options | Wait for choice |
| 5 | Execute choice | Follow option workflow |
| 6 | Cleanup worktree (options 1,2,4 only) | Option 3 keeps worktree |

**Options:** 1=Merge locally, 2=PR, 3=Keep as-is, 4=Discard (confirm)
</quick_reference>

<when_to_use>
- Implementation complete and reviewed
- All bd tasks for epic are done
- Ready to integrate work back to main branch
- Called by hyperpowers:review-implementation (final step)

**Don't use for:**
- Work still in progress
- Tests failing
- Epic has open tasks
- Mid-implementation (use hyperpowers:executing-plans)
</when_to_use>

<the_process>
## Step 1: Close bd Epic

**Announce:** "I'm using hyperpowers:finishing-a-development-branch to complete this work."

**Verify all tasks closed:**

```bash
bd dep tree bd-1  # Show task tree
bd list --status open --parent bd-1  # Check for open tasks
```

**If any tasks still open:**
```
Cannot close epic bd-1: N tasks still open:
- bd-3: Task Name (status: in_progress)
- bd-5: Task Name (status: open)

Complete all tasks before finishing.
```

**STOP. Do not proceed.**

**If all tasks closed:**

```bash
bd close bd-1
```

---

## Step 2: Verify Tests

**IMPORTANT:** Use hyperpowers:test-runner agent to avoid context pollution.

Dispatch hyperpowers:test-runner agent:
```
Run: cargo test
(or: npm test / pytest / go test ./...)
```

Agent returns summary + failures only.

**If tests fail:**
```
Tests fai

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
10810 chars