finishing-a-development-branch

Run tests before offering merge, pull request, or cleanup actions.

130|8|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/sandgardenhq/sgai --skill finishing-a-development-branch-sandgardenhq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/sandgardenhq/sgai/tree/main/cmd/sgai/skel/.sgai/skills/finishing-a-development-branch
Command: npx skills add https://github.com/sandgardenhq/sgai --skill finishing-a-development-branch-sandgardenhq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps developers safely finish a development branch after implementation is complete, ensuring all tests pass and providing clear choices for merging, creating a pull request, keeping the branch, or discarding it.

Core Features & Use Cases

  • Test verification: Runs the project's test suite and stops if any test fails.
  • Option presentation: Offers exactly four concise actions (merge locally, push and PR, keep as‑is, discard) after tests succeed.
  • Automated execution: Performs the selected Git workflow, including branch cleanup and worktree removal when appropriate.
  • Safety checks: Requires confirmation before destructive discard and never proceeds with failing tests.
  • Typical use case: A developer finishes a feature branch and wants a guided, error‑free way to integrate or clean up the work.

Quick Start

Use the finishing-a-development-branch skill to safely close the current feature branch after confirming all tests pass.

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 tests pass?

To safely merge a git feature branch, you can run the test suite first and then choose between merging locally, creating a pull request, keeping the branch, or discarding it. This ensures tests pass before any integration action proceeds.

What is the best way to finalize a development branch before creating a pull request?

Finalizing a development branch involves verifying that all tests pass before offering structured choices for integration. You can push and create a pull request, merge locally, keep the branch as-is, or discard it with confirmation.

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

The GitHub CLI is optional for creating a pull request from a feature branch. The core workflow requires the git CLI and access to the repository's test suite commands, but uses the GitHub CLI specifically for automated PR creation.

Can I discard a git worktree and branch if tests fail?

You cannot discard a git worktree and branch if tests fail because the workflow stops when any test fails. Safety checks require passing tests before proceeding, and destructive discard actions require explicit confirmation.

How does automated branch cleanup work after merging a feature?

Automated branch cleanup performs the selected Git workflow, including worktree removal and branch deletion when appropriate. It only triggers after tests succeed and you choose to merge or discard the branch.

When should I use a structured workflow to finish a development branch?

Use a structured workflow to finish a development branch when you need a guided, error-free way to integrate or dispose of feature work. It is ideal for developers who want test verification and clear integration options without manual Git errors.