finishing-a-development-branch

Verify tests and present merge, PR, or cleanup options for a development branch.

2|1|Updated Jan 5, 2026
One-click install
npx skills add https://github.com/lagz0ne/prev-cli --skill finishing-a-development-branch-lagz0ne
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/lagz0ne/prev-cli/tree/main/.opencode/skill/finishing-a-development-branch
Command: npx skills add https://github.com/lagz0ne/prev-cli --skill finishing-a-development-branch-lagz0ne

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill verifies tests on a completed development branch, presents structured options for merging, PR, or cleanup, and coordinates the final integration workflow.

Core Features & Use Cases

  • Verify tests pass before offering options to merge locally, push a PR, keep the branch, or discard
  • Determine the base branch and present deterministic, four-option choices
  • Execute the chosen option and perform optional worktree cleanup to keep the repository tidy

Quick Start

Run through the finishing-a-development-branch workflow:

  • Verify tests pass: npm test / cargo test / pytest / go test ./...
  • Determine base branch: git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
  • Present options:
    1. Merge back to <base-branch> locally
    2. Push and create a Pull Request
    3. Keep the branch as-is (I'll handle it later)
    4. Discard this work
  • Execute the chosen option and then cleanup the worktree if required.

Frequently Asked Questions about finishing-a-development-branch

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

FAQPage Schema
What is the best way to finish a feature branch and merge it back?

After passing tests, finishing a development branch involves determining the base branch and selecting a structured option: local merge, pull request creation, keeping the branch, or discarding changes entirely.

How do I clean up my local git worktree after merging a branch?

To clean up a local git worktree after merging, execute your chosen integration option and then perform optional worktree cleanup to keep the repository tidy and remove stale development branches.

Do I need a passing test suite before creating a pull request?

Yes, you need a passing test suite before creating a pull request. The workflow requires standard Git tooling and a working test suite to validate changes, ensuring untested features are not integrated into the base branch.

Can I discard git branch changes after implementation if tests fail?

Yes, you can discard git branch changes if tests fail or the feature is unwanted. The workflow presents discarding work as a deterministic option alongside merging, pushing a PR, or keeping the branch.

How does a git branch management workflow determine the correct base branch?

A git branch management workflow determines the correct base branch by running a merge-base command against main or master, ensuring the final merge or pull request targets the appropriate integration branch.