Finishing a Development Branch

Run tests, present four Git completion options, and execute the chosen workflow.

41|27|Updated Oct 6, 2025
One-click install
npx skills add https://github.com/obra/clank --skill finishing-a-development-branch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Finishing a Development Branch
Source: https://github.com/obra/clank/tree/main/skills/collaboration/finishing-a-development-branch
Command: npx skills add https://github.com/obra/clank --skill finishing-a-development-branch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Concluding development work often involves a series of critical steps—testing, merging, creating pull requests, or discarding work—that need to be handled systematically to avoid errors or incomplete cleanup. This skill streamlines the completion process, offering clear options and ensuring proper verification and cleanup.

Core Features & Use Cases

  • Mandatory Test Verification: Ensures all tests pass before presenting any completion options.
  • Structured Completion Options: Presents clear choices: merge locally, push for PR, keep branch, or discard work.
  • Automated Git Operations: Executes the chosen Git workflow (merge, push, delete branch) and cleans up worktrees.
  • Use Case: After completing a feature, you'll activate this skill. It will run all tests, then ask if you want to merge, create a PR, keep the branch, or discard it, handling all the Git commands for you.

Quick Start

Announce usage

"I'm using the Finishing a Development Branch skill to complete this work."

The skill will then:

1. Run tests (e.g., npm test)

2. Present options: Merge, PR, Keep, Discard

3. Execute your chosen option (e.g., git checkout main && git merge feature-branch)

4. Clean up the worktree if applicable

Frequently Asked Questions about Finishing a Development Branch

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

FAQPage Schema
How do I finish a development branch after tests pass?

Finishing a development branch involves running your test suite, choosing one of four actions (merge locally, push for PR, keep the branch, or discard), and executing the Git operations automatically. The skill runs tests first, then presents your options and handles cleanup.

What happens if tests fail when I try to finish a branch?

If tests fail, the skill will not proceed to present completion options. You must resolve test failures before the skill allows you to merge, create a PR, or discard the branch.

Can I use this workflow with both main and master branches?

Yes, the skill automatically detects your stable base branch—either main or master—and merges or rebases against it accordingly, adapting to your repository's naming convention.

How do I clean up my worktree after finishing a branch?

Worktree cleanup happens automatically after you select your completion option. If you discard the branch, the worktree is removed; if you merge or push, cleanup follows the chosen Git workflow.

What are the four workflow options for completing a branch?

The skill enforces four explicit options: merge the branch locally into your base branch, push and create a pull request, keep the branch without merging, or discard the work entirely. Each executes its corresponding Git commands.

Do I need to manually run git commands after choosing an option?

No, the skill executes all Git operations for you—merge, push, delete branch—based on your selection. Manual Git commands are handled automatically once you choose your workflow.