finishing-a-development-branch

Verify tests, then choose merge, PR, keep, or discard with cleanup for your development branch.

15|2|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/Liuchun-oss/codelf-agent --skill finishing-a-development-branch-liuchun-oss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: finishing-a-development-branch
Source: https://github.com/Liuchun-oss/codelf-agent/tree/main/resources/skills/finishing-a-development-branch
Command: npx skills add https://github.com/Liuchun-oss/codelf-agent --skill finishing-a-development-branch-liuchun-oss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Development teams need a safe, repeatable way to finish a feature branch by validating tests, choosing a controlled workflow, and cleaning up artifacts after completion.

Core Features & Use Cases

  • Verify tests pass before proceeding with integration or cleanup.
  • Detect repository state (normal repo, named worktree, detached HEAD) to tailor available actions.
  • Present exactly four options: merge locally, push and create a PR, keep as-is, or discard with explicit confirmation, plus proper workspace cleanup.

Quick Start

Run the skill after tests pass and select one of the four structured options to complete the work and clean up the workspace.

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 finish a git feature branch after tests pass?

To finish a git feature branch safely, verify tests pass first, then choose from structured options: merge locally, push and create a PR, keep as-is, or discard. The workflow enforces safety checks and manages workspace cleanup after completion.

What is the best way to clean up a git worktree after merging a branch?

The best way to clean up a git worktree after merging is to use a structured workflow that detects your repository state and manages workspace cleanup automatically, removing artifacts after you choose to merge or discard the branch.

Can I create a pull request from a detached HEAD state in git?

Yes, you can create a pull request from a detached HEAD state. The workflow detects repository states including normal repos, named worktrees, and detached HEAD, tailoring the available actions like push and create PR accordingly.

How do I discard a git branch and clean up the workspace?

To discard a git branch and clean up the workspace, select the discard option provided by the structured workflow. This requires explicit confirmation before executing the discard action and managing the subsequent workspace cleanup.

What options do I have when completing development on a feature branch?

When completing development on a feature branch, you have exactly four options: merge locally, push and create a pull request, keep the branch as-is, or discard it. All options require test verification before proceeding.

Do I need to run tests before merging a git branch?

Yes, you need to run tests before merging a git branch. The workflow requires test verification to pass before presenting the structured options to proceed with integration, ensuring the branch is safe to complete.