finishing-branches

Run tests, push a feature branch, and open a pull request with worktree cleanup.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/steven-3/supermind --skill finishing-branches-steven-3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-branches
Source: https://github.com/steven-3/supermind/tree/main/skills/finishing-branches
Command: npx skills add https://github.com/steven-3/supermind --skill finishing-branches-steven-3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents sloppy or unsafe “ship” actions by enforcing a verified-test workflow, safe branch/PR handling, and controlled worktree cleanup during the end of a feature lifecycle.

Core Features & Use Cases

  • Test-first gate: Runs the project’s test suite and stops if tests fail, ensuring shipping only happens from a verified state.
  • Automated Ship-phase option selection: Creates a PR by default (or supports keeping the branch or discarding it with explicit confirmation).
  • Worktree lifecycle management: Cleans up worktrees for PR creation and discard, while preserving worktrees when the user wants to keep working.

Quick Start

Ask the orchestrator to complete the ship phase by running tests, choosing the PR option, and cleaning up worktrees after creating the pull request for your feature branch.

Frequently Asked Questions about finishing-branches

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

FAQPage Schema
How do I automate git pull request creation and worktree cleanup after tests pass?

Automating git pull request creation and worktree cleanup involves running a test-gated workflow that verifies tests, pushes the feature branch, opens a pull request, and deterministically removes the worktree once the PR is successfully created.

What is the best way to prevent accidental merges to main when shipping a feature branch?

Preventing accidental merges to main requires enforcing branch-safety rules that restrict direct merges to main or master and prohibit force-free operations during the ship phase of feature completion.

How do git worktrees factor into end-to-end feature completion workflows?

Git worktrees factor into feature completion by isolating development environments, requiring deterministic worktree cleanup when creating a pull request or discarding work, while preserving the worktree if keeping the branch.

Can I safely discard a git worktree without accidentally losing uncommitted feature work?

Safely discarding a git worktree requires typed confirmation to prevent accidental data loss, ensuring the worktree is only removed after explicit user approval during the discard phase of the workflow.

How do I generate a pull request description from a structured planning directory?

Generating a pull request description from a structured planning directory utilizes the repository's planning files to automatically compile PR details, integrating context directly into the pull request creation process.

Does test gating stop a git push if the project test suite fails?

Test gating stops a git push by running the project test suite first and halting the ship phase immediately if tests fail, ensuring shipping only happens from a verified state.