finishing-a-development-branch

Automate development branch finalization with tests, base branch detection, and cleanup.

968|43|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/GanyuanRan/Aegis --skill finishing-a-development-branch-ganyuanran
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/GanyuanRan/Aegis/tree/main/skills/finishing-a-development-branch
Command: npx skills add https://github.com/GanyuanRan/Aegis --skill finishing-a-development-branch-ganyuanran

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the finalization of a completed development branch by enforcing a safe, structured workflow that ensures tests are verified and a clear path to merge, PR, cleanup, or follow-up actions is taken.

Core Features & Use Cases

  • Verify tests pass before finalizing to prevent merging broken code.
  • Automatically determine a base branch and propose an appropriate merge/PR path.
  • Present exactly four actions: Merge back locally, Push and create a PR, Keep the branch as-is, or Discard this work.
  • Clean up worktrees and branches consistently after the chosen option to maintain repository hygiene.
  • Use Case: When a feature branch is ready for integration and CI confirms stability, this skill guides a safe wrap-up process.

Quick Start

Verify tests pass, determine the base branch, present the four options, and execute the selected action.

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 finalize a git feature branch before merging?

To safely finalize a git feature branch, you can enforce a structured workflow that validates tests pass, detects the base branch, and presents four clear options: merge locally, create a PR, keep the branch, or discard the work. This prevents merging broken code.

What's the best way to automate branch cleanup and pull request creation?

Automating branch cleanup and pull request creation involves detecting the base branch and executing a chosen finalization path, which cleans up worktrees and branches consistently after merging or submitting a PR to maintain repository hygiene.

Does this workflow validate tests before merging a development branch?

Yes, the workflow validates tests before merging a development branch. It verifies that tests pass as a prerequisite to finalizing, ensuring CI confirms code stability before proceeding with any merge, PR, or cleanup actions.

Can I choose to discard a feature branch or keep it as-is during finalization?

Yes, you can choose to discard a feature branch or keep it as-is. The finalization workflow presents exactly four actions: merge back locally, push and create a PR, keep the branch as-is, or discard the work entirely.

How does the branch finalization process detect the correct base branch?

The branch finalization process automatically detects the correct base branch to propose an appropriate merge or PR path. This detection ensures the feature work integrates into the correct target branch before executing the selected finalization option.

When should I use a structured branch finalization workflow over manual git commands?

You should use a structured branch finalization workflow over manual git commands when a feature branch is ready for integration and you need to enforce test verification, determine the base branch, and execute safe wrap-up actions consistently.