finishing-a-development-branch

Run tests and finalize a development branch via git operations.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mykaarma/claude-sutras --skill finishing-a-development-branch-mykaarma
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/mykaarma/claude-sutras/tree/main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/mykaarma/claude-sutras --skill finishing-a-development-branch-mykaarma

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers need a reliable way to finalize a development branch after implementation is complete, ensuring tests pass and providing clear, safe options for merging, creating a pull request, keeping, or discarding the work.

Core Features & Use Cases

  • Test verification: Runs the project's test suite and halts if any tests fail.
  • Base‑branch detection: Determines the appropriate main branch to merge into.
  • Structured options: Presents exactly four concise actions (merge locally, push & PR, keep, discard) with no extra explanation.
  • Automated execution: Performs the chosen git workflow, including branch cleanup and optional worktree removal, with confirmation safeguards for destructive actions.
  • Use case: After completing a feature, a developer invokes the skill to automatically validate the code and either merge it into main, open a pull request on GitHub, retain the branch for later work, or safely delete it.

Quick Start

Finish the current development branch by verifying tests and choosing the appropriate merge or cleanup option.

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 git branch after testing is complete?

To finalize a git branch after testing, you can run the project test suite, detect the base branch, and choose to merge locally, push for a pull request, keep, or discard the branch.

What's the best way to merge a development branch into main after tests pass?

Merging a development branch into main is handled by executing test commands first, then performing the git merge operation automatically once the base branch is determined and tests pass.

Can I create a pull request and clean up a git worktree at the same time?

Yes, you can push your branch to create a pull request and optionally remove the associated git worktree, with confirmation safeguards triggering before any destructive cleanup occurs.

How does base branch detection work when finalizing a development branch?

Base branch detection automatically identifies the appropriate main branch to merge into, ensuring your completed development branch targets the correct destination before executing git operations.

What happens if tests fail when I try to merge a git branch?

If tests fail during branch finalization, the process halts immediately to prevent merging broken code, ensuring only successfully tested development branches proceed to git operations.

Is there a safe way to discard a development branch and remove its worktree?

Discarding a development branch includes confirmation safeguards for destructive actions, allowing you to safely delete the branch and optionally clean up its worktree only after explicit confirmation.