finishing-a-development-branch

Automate Git branch finishing with merge, PR, or cleanup options after tests pass.

154|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/haojing8312/WorkClaw --skill finishing-a-development-branch-haojing8312
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/haojing8312/WorkClaw/tree/main/.claude/skills/finishing-a-development-branch
Command: npx skills add https://github.com/haojing8312/WorkClaw --skill finishing-a-development-branch-haojing8312

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Finishing a development branch is often manual and error-prone. This skill guides completion by verifying tests, selecting a merge or PR strategy, and cleaning up the worktree to ensure a clean repository state.

Core Features & Use Cases

  • Test verification: Runs the project's test suite or validates test results to ensure the branch is stable before completion.
  • Base-branch detection: Determines the appropriate base branch (e.g., main or master) for merging.
  • Structured options: Presents exactly four options for finishing work: 1) Merge back to the base locally, 2) Push and create a PR, 3) Keep the branch as-is, 4) Discard the work.
  • Execution & cleanup: Executes the chosen workflow and performs optional worktree cleanup with safety checks to avoid data loss.

Quick Start

Use finishing-a-development-branch to wrap up a completed feature branch by selecting an option after tests pass.

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 automate finishing a git development branch after tests pass?

To automate finishing a git development branch, this skill verifies your tests pass, detects the base branch, and presents explicit options to merge, create a pull request, keep, or discard the work. It then executes the chosen workflow and cleans up the worktree.

What are the options for merging a feature branch back to a base branch?

Merging a feature branch offers four explicit options: merging locally back to the base branch, pushing and creating a pull request, keeping the branch as-is, or discarding the work entirely. The chosen action is then executed automatically with safety guardrails.

Can I create a pull request directly from a local git workflow?

Yes, you can create a pull request directly from a local git workflow by selecting the push and create PR option presented after tests pass. The skill determines the appropriate base branch and handles the push action to initiate the pull request process.

How does worktree cleanup work when discarding a development branch?

Worktree cleanup when discarding a development branch includes safety checks to prevent data loss. After you choose to discard the work or complete a merge, the skill performs optional worktree cleanup to ensure a clean repository state.

Why should I verify tests before merging a git feature branch?

Verifying tests before merging a git feature branch ensures the branch is stable before completion. This skill runs the project's test suite or validates test results as a prerequisite to presenting the four structured options for finalizing the development workflow.

Does finishing a development branch work with both main and master base branches?

Yes, finishing a development branch works with both main and master base branches. The skill automatically detects the appropriate base branch for merging or creating a pull request, ensuring the deterministic handoff process applies across standard Git workflows.