Skill

Complete and merge development branches with test verification

Skill for closing out a development branch: verify tests, choose merge, PR, keep, or discard, and clean up the worktree safely.

Works with gitgithubnpm

88
Spark score
out of 100
Updated 29 days ago
Source checked Oct 9, 2026
Version 19.1.0

Add to Favorites

Why it matters

Safely finish development work by verifying tests pass, presenting structured workflow options (merge locally, create PR, keep, or discard), executing the chosen path, and cleaning up worktrees and branches appropriately.

Outcomes

What it gets done

01

Run test suites and block completion if any tests fail

02

Detect base branch and check for protection rules that require PR workflow

03

Present exactly four completion options with confirmation for destructive actions

04

Execute merge, push PR, or cleanup operations and remove worktrees when appropriate

Install

Add it to your toolbox

Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-finishing-a-development-branch | bash

After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.

Reports

Agent outcome reports

No reports yet

Overview

This skill guides completion of a development branch: verify tests, determine the base branch, present exactly four options, execute the chosen workflow, and clean up the worktree. Discarding requires a typed confirmation. Use it when implementation is complete and all tests pass. It will not proceed with failing tests, and on protected base branches it does not offer local merge.

What it does

This skill guides the completion of development work once implementation is finished and all tests pass. It presents a small set of structured options for how to integrate the work (merge, pull request, keep, or discard) and then carries out the chosen workflow. Its core principle is: verify tests, present options, execute the choice, clean up. The assistant announces at the start that it is using the finishing-a-development-branch skill to complete the work.

The process has five steps:

  1. Verify tests. Run the project's test suite. If tests fail, report the number of failures, show them, state that merge or pull request cannot proceed until tests pass, and stop.
  2. Determine the base branch by looking for a merge base with main or master, or ask the user to confirm. Then read AGENTS.md and maintainer documentation and inspect the effective protection on the base branch. If pull requests or required checks are enforced, local merge is marked unavailable and the repository's guarded workflow is used. In the agentic-awesome-skills repository, maintainer merges are deferred to the antigravity-maintainer-batch-release skill and the npm run merge:batch command.
  3. Present options. For an unprotected base branch, present exactly four concise options with no added explanation: merge back locally, push and create a pull request, keep the branch as-is, or discard the work. For a protected base branch, do not offer local merge.
  4. Execute the choice.
  5. Clean up the worktree.

When to use - and when NOT to

Use it when implementation is complete, all tests pass, and you need to decide how to integrate the work.

Do not use it while tests are failing, because the skill stops at step 1. Do not use it to force a local merge into a protected branch: local merge is only allowed after proving that repository policy and server-side protection permit it, otherwise the flow routes through the pull request option. The skill is marked critical risk in its metadata, and its limits say not to treat the output as a substitute for environment-specific validation or expert review.

Inputs and outputs

Inputs are a finished feature branch, the project's test command, and the user's choice among the options. Outputs depend on the choice. Merge locally switches to the base branch, pulls the latest, merges the feature branch, verifies tests on the merged result, and deletes the feature branch. Push and create a pull request pushes the branch and opens a pull request with a short summary of what changed and a test plan checklist. Keep as-is reports the branch name and worktree path and does not clean up the worktree. Discard first requires a typed confirmation of the word discard, after a warning listing the branch, its commits, and the worktree, and only then force-deletes the branch.

To use the pull request path, the skill pushes with:

git push -u origin <feature-branch>

Integrations

The skill relies on git, git worktrees, and the GitHub command line for pull requests. It is called by the subagent-driven-development skill after all tasks complete and by the executing-plans skill after all batches complete. It pairs with using-git-worktrees, cleaning up the worktree that skill created. Worktrees are removed for options 1, 2, and 4 only as the skill specifies; the quick reference keeps the worktree for the pull request and keep options.

Red flags the skill lists: never proceed with failing tests, merge without verifying tests on the result, delete work without confirmation, or force-push without an explicit request. Always present exactly four options and get typed confirmation before discarding.

Who it's for

It is for developers and coding agents who finish feature branches and want a consistent, safe close-out routine that avoids merging broken code, skipping confirmation before deleting work, or cleaning up worktrees that are still needed.

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.