finishing-a-development-branch

Automate finishing development branches with merge, keep, discard, or cleanup decisions.

291|38|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/J-Pster/Psters_AI_Workflow --skill finishing-a-development-branch-j-pster
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/J-Pster/Psters_AI_Workflow/tree/main/plugins/psters-ai-workflow/skills/finishing-a-development-branch
Command: npx skills add https://github.com/J-Pster/Psters_AI_Workflow --skill finishing-a-development-branch-j-pster

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Close and finalize development work by applying a disciplined decision flow to merge, keep, or discard branches and to clean up worktrees, preventing abandoned work and unmerged changes.

Core Features & Use Cases

  • Enforces a four-option finish path: Merge locally, Push/PR, Keep for later, or Discard, with guardrails.
  • Ensures correct base branch context and safe execution for each option.
  • Includes post-finish cleanup rules and a structured Expected Output for traceability.
  • Use Case: When a feature is complete, use this Skill to orchestrate finalization and cleanup, ensuring a reproducible, auditable state.

Quick Start

Finish the current development branch by selecting one of the four options (merge locally, push/PR, keep, or discard) and confirming any destructive actions; the system will perform finalization and cleanup.

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 finalize a development branch and clean up the worktree?

The best way to finalize a development branch is applying a four-option decision flow: merge locally, push/PR, keep for later, or discard. This enforces safety checks and post-finish cleanup rules for a clean, auditable final state.

How do I merge a completed feature branch locally without losing unmerged changes?

Merge a completed feature branch locally by selecting the local merge option in the finish flow, which verifies the correct base branch context and performs safety checks to prevent losing unmerged changes before finalization.

Can I discard a development branch and its worktree safely after development is complete?

Yes, you can safely discard a development branch by choosing the discard option. The system requires confirming any destructive actions to ensure unmerged changes are intentionally removed before cleaning up the worktree.

When do I need to use a structured finish flow for branch management?

You need a structured finish flow for branch management when a feature is complete and a clean final state with auditable decisions is required, especially across local branches or worktrees.

Does pushing a branch for a PR require local cleanup afterwards?

Pushing a branch for a PR triggers post-finish cleanup rules within the finish flow. The system orchestrates finalization and cleanup, ensuring a reproducible state after the remote push is complete.