finishing-a-development-branch

Guide feature branch completion through a four-option merge, PR, or cleanup workflow.

Updated Jul 8, 2022
One-click install
npx skills add https://github.com/limaon/dotfiles --skill finishing-a-development-branch-limaon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/limaon/dotfiles/tree/main/.config/opencode/skills/finishing-a-development-branch
Command: npx skills add https://github.com/limaon/dotfiles --skill finishing-a-development-branch-limaon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides the completion of development work by offering a structured, deterministic workflow for merging, pushing a PR, keeping, or discarding a feature branch once tests pass.

Core Features & Use Cases

  • Explicit 4-option workflow: Merge locally, push and create a PR, keep the branch as-is, or discard the work.
  • Base-branch determination: Attempts to identify the appropriate base branch (e.g., main or master) for local merging.
  • Optional cleanup: Performs worktree cleanup after the chosen operation to keep the workspace tidy.
  • Test verification enforcement: Requires all tests to pass before presenting options to prevent broken integrations.

Quick Start

Use finishing-a-development-branch to finalize the current feature by selecting one of four options: merge locally, push and create a PR, keep the branch as-is, or discard the work.

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 finalize a git feature branch after tests pass?

To finalize a git feature branch after tests pass, you can use a structured workflow that offers four deterministic options: merge locally, push and create a pull request, keep the branch, or discard the work entirely.

What is the best way to manage git branch cleanup and merging?

The best way to manage git branch cleanup is using a deterministic workflow that enforces test verification before integration, automatically detects the base branch, and performs optional worktree cleanup after the merge or pull request operation.

Do I need the gh CLI to create a pull request from my feature branch?

The gh CLI is optional for creating a pull request from your feature branch. The structured workflow uses standard Git commands for local operations but utilizes gh CLI specifically when you choose the push and create PR option.

Can I discard my git feature branch work if tests fail?

You cannot discard git feature branch work through this workflow if tests fail, because test verification is strictly enforced. All tests on the current feature branch must pass before the four merge, PR, keep, or discard options are presented.

How does base branch detection work for local git merges?

Base branch detection for local git merges works by automatically identifying the appropriate base branch, such as main or master, from your repository configuration to ensure the feature branch integrates cleanly into the correct target.