finishing-a-development-branch

Verify tests and merge, push, preserve, or discard a feature branch.

3|2|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/Moonsong-Labs/knowledge-work-plugins --skill finishing-a-development-branch-moonsong-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/Moonsong-Labs/knowledge-work-plugins/tree/main/core-engineering/skills/finishing-a-development-branch
Command: npx skills add https://github.com/Moonsong-Labs/knowledge-work-plugins --skill finishing-a-development-branch-moonsong-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides teams to safely finalize development work by validating tests and selecting a clean merge or cleanup path.

Core Features & Use Cases

  • Verify tests pass on the feature branch before integration.
  • Present four clear options: merge locally, push and open PR, keep the branch as is, or discard.
  • Clean up worktrees and branches after the chosen action to maintain repository hygiene.

Quick Start

Verify tests pass and present the four completion options.

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 feature branch and decide whether to merge or create a pull request?

To finish a feature branch, you first verify tests pass, then choose between merging locally, pushing to open a pull request, keeping the branch, or discarding. This workflow safely executes the chosen Git integration and cleanup steps.

What is the best way to clean up Git worktrees and branches after merging a feature?

The best way to clean up Git worktrees and branches after merging is to use a deterministic workflow that executes safe cleanup steps following your chosen integration action. This maintains repository hygiene by removing unnecessary local artifacts.

Can I preserve my Git worktree instead of deleting it when finishing a development branch?

Yes, you can preserve your Git worktree when finishing a development branch. The workflow presents an option to keep the branch as is, preventing automatic deletion while maintaining the current state of your development work.

How do I ensure tests pass before merging a Git feature branch locally?

To ensure tests pass before merging a Git feature branch locally, the finishing workflow validates your tests as a prerequisite step. It applies guardrails to guarantee integration only proceeds when tests are successful.

Does base-branch detection work automatically when finalizing a Git branch?

Yes, base-branch detection works automatically when finalizing a Git branch. The workflow requires base-branch detection to safely execute merge, pull request, and cleanup steps with proper guardrails for integration.