finishing-a-development-branch

Automate Git branch lifecycle with testing, merging, and workspace cleanup.

21|9|Updated May 27, 2026
One-click install
npx skills add https://github.com/cq112233/unibestX --skill finishing-a-development-branch-cq112233
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/cq112233/unibestX/tree/main/.agents/skills/finishing-a-development-branch
Command: npx skills add https://github.com/cq112233/unibestX --skill finishing-a-development-branch-cq112233

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves the ambiguity and manual overhead associated with closing out development branches, ensuring that code is verified, integrated, and cleaned up consistently.

Core Features & Use Cases

  • Automated Verification: Enforces test suite execution before any integration or cleanup actions occur.
  • Context-Aware Workflow: Detects the Git environment (standard repo vs. worktree) to provide the appropriate cleanup options.
  • Use Case: After completing a feature, use this Skill to safely merge your code into the main branch, create a Pull Request, or discard the work if it was an experimental branch, all while ensuring your workspace remains tidy.

Quick Start

Invoke the finishing-a-development-branch skill to verify your tests and guide you through the process of merging or cleaning up your current feature branch.

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 automate Git branch cleanup and merging after finishing a feature?

Git branch cleanup requires verifying tests, integrating code into the main branch, and removing the workspace. This skill automates the lifecycle, enforcing test suite execution before merging or creating a pull request, and detects the environment for safe worktree management.

What is the best way to manage Git worktrees when discarding an experimental branch?

Managing Git worktrees during disposal requires context-aware cleanup to remove linked directories safely. This skill detects the Git environment to provide appropriate cleanup options, ensuring your workspace remains tidy after discarding experimental code branches.

Does this workflow run tests before merging a development branch into the main repository?

Yes, the workflow enforces automated verification by executing the test suite before any integration or cleanup actions occur. This ensures that code is verified and integrated consistently, preventing untested changes from entering the main branch.

Can I create a pull request instead of directly merging the feature branch?

Yes, you can create a pull request instead of directly merging. The skill guides you through the process of safely integrating your code, allowing you to choose between merging into the main branch, creating a PR, or discarding the work.

How to ensure safe worktree management during branch termination?

Safe worktree management during branch termination relies on detecting whether you are in a standard repository or a worktree. This skill applies environment-aware Git operations to provide appropriate cleanup options, ensuring safe and tidy workspace removal.