finishing-a-development-branch

Automate finalizing a development branch with four integration options.

6|1|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/alexsandrocruz/ZenPowers --skill finishing-a-development-branch-alexsandrocruz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/alexsandrocruz/ZenPowers/tree/main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/alexsandrocruz/ZenPowers --skill finishing-a-development-branch-alexsandrocruz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh.

What problem does it solve?

This Skill guides you through the critical final steps of development, ensuring your work is properly verified, integrated, and cleaned up. It prevents merging broken code or leaving behind messy development environments.

Core Features & Use Cases

  • Mandatory Test Verification: Ensures all tests pass before offering any completion options, preventing broken merges.
  • Structured Integration Options: Presents four clear choices: merge locally, push for PR, keep as-is, or discard, with explicit consequences.
  • Automated Cleanup: Handles branch deletion and Git worktree removal based on your choice, maintaining a clean repository.
  • Use Case: When you've completed implementation on a feature branch and all tests pass, use this Skill to finalize your work and integrate it into the main codebase.

Quick Start

1. Verify Tests

dotnet test / npm test / cargo test / pytest / go test ./...

(If tests fail, fix before proceeding)

2. Determine Base Branch (e.g., main or master)

3. 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

4. Execute Choice (e.g., git merge, gh pr create, git branch -D)

5. Cleanup Worktree (if applicable)

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 development branch after testing?

Finalize a development branch by running your project's test suite, verifying all tests pass, then choosing among four options: merge locally to the base branch, push a pull request, keep the branch, or discard it. The Skill automates test verification, presents integration options, executes your choice, and cleans up worktrees.

What should I do before merging a feature branch back to main?

Before merging, run all tests (dotnet test, npm test, cargo test, pytest, or go test) to ensure nothing is broken. Once tests pass, determine your base branch and choose your integration path: local merge, pull request, keep as-is, or discard.

Can I automate cleanup when deleting a development branch?

Yes. When you choose to merge or discard your branch, this Skill automatically handles branch deletion and Git worktree removal, keeping your repository clean without manual cleanup steps.

How do I decide between merging locally or creating a pull request?

Local merge integrates your feature directly into the base branch immediately. A pull request lets teammates review your code first. Both options are available after tests pass; choose based on your team's workflow and code review requirements.

What happens if my tests fail before finalizing the branch?

If tests fail, the Skill halts and prevents any merge or integration options. Fix the failing tests first, then re-run verification before proceeding with branch finalization.

Does this work with different version control workflows?

Yes. The Skill detects your base branch (main or master) and adapts to it. It supports both local Git operations and pull requests via gh, making it compatible with centralized and distributed team workflows.