finishing-a-development-branch

Validate tests and merge a feature branch into its base branch.

19|2|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CodingCossack/agent-skills-library --skill finishing-a-development-branch-codingcossack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/CodingCossack/agent-skills-library/tree/main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/CodingCossack/agent-skills-library --skill finishing-a-development-branch-codingcossack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git branch completion workflow. Use when implementation is complete, tests pass, and a feature branch needs to be integrated via merge, pull request, or cleanup.

Core Features & Use Cases

  • Guaranteed test verification: Runs the appropriate test suite for the project structure and halts on failures.
  • Base-branch determination: Determines the closest common ancestor among main, master, or develop to select the correct integration target.
  • Guarded merge/PR flow: Presents the four options to merge locally, push and PR, preserve worktree, or discard, with safety checks and cleanup.

Quick Start

Run this workflow to finish a feature branch by verifying tests, selecting the base branch, and executing a safe merge or PR.

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 safely merge a git feature branch after passing tests?

To safely merge a git feature branch, you need to verify tests pass, determine the correct base branch like main or develop, and execute a guarded merge with proper cleanup. This workflow automates those safety checks.

What is the best way to determine the base branch for a git merge?

Determining the base branch for a git merge involves finding the closest common ancestor among main, master, or develop. This ensures your feature branch integrates into the correct target without conflicting branch histories.

Can I create a pull request and clean up local branches in one workflow?

Yes, you can create a pull request and clean up local branches by selecting the push and PR option. This guarded flow presents four choices including local merge, push and PR, preserve worktree, or discard with cleanup.

Why should I verify tests before merging a feature branch?

You should verify tests before merging a feature branch to prevent breaking changes from entering the base branch. The workflow enforces test verification by running the appropriate suite and halting immediately on any failures.

Does this branch completion workflow support projects using develop branches?

Yes, this branch completion workflow supports projects using develop branches. It automatically determines the closest common ancestor among main, master, or develop to select the appropriate integration target for your project structure.

What are my options if I want to discard a git feature branch safely?

If you want to discard a git feature branch safely, the guarded merge flow provides a discard option with safety checks and cleanup. You can also choose to merge locally, push and PR, or preserve the worktree.