agentsclimarketplace

Finishing a development branch

Skill andybrandt/superartes/skills/finishing-a-development-branch

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanupFrom its SKILL.md

Install
npx -y skills add andybrandt/superartes --skill finishing-a-development-branch

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.2 KB, as published. Nobody here has run it

Finishing a Development Branch

Overview

Guide completion of development work by presenting clear options and handling chosen workflow.

Core principle: Verify tests → Present options → Execute choice → Clean up.

Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."

The Process

Step 1: Verify Tests

Before presenting options, verify tests pass:

# Run project's test suite
npm test / cargo test / pytest / go test ./...

If tests fail:

Tests failing (<N> failures). Must fix before completing:

[Show failures]

Cannot proceed with merge/PR until tests pass.

Stop. Don't proceed to Step 2.

If tests pass: Continue to Step 2.

Step 2: Determine Base Branch

Determine the trunk this branch was cut from — do not assume main. master and main are equally valid; some setups deliberately use master.

# Print whichever trunk this repo actually has (does not privilege main):
git rev-parse --verify --quiet master >/dev/null && echo master
git rev-parse --verify --quiet main   >/dev/null && echo main

If exactly one prints, that is the base branch. If both or neither print, ask: "This branch split from <trunk> - is that correct?"

Step 2.5: External code review (decision gate)

Now that the base branch is known, and before presenting options, recommend an independent second-model review of the finished feature:

Tests pass. Before we integrate, I recommend an external code review (an
independent second model via `superartes:external-code-review`) of the
whole feature against <base-branch>. Want me to run it? [yes / skip]

If anything specific might influence the user's decision — context they need to make the call (e.g. the feature touches auth or a data migration, or a large diff) — include it in this message.

  • If yes, invoke superartes:external-code-review with the --base <base-branch> scope, triage findings via superartes:receiving-code-review, and address anything Critical/Important before continuing.
  • If skip (or the change is trivial — only comments/docs), continue.
  • If no user is present to make the call (autonomous run), default to running the review automatically, per superartes:external-code-review.

This is a decision gate: do not proceed to Step 3 until the decision is resolved — and, if the review runs, until it has completed and any Critical/Important findings are addressed. It still does not change the four options below.

Step 3: Present Options

Present exactly these 4 options:

Implementation complete. What would you like to do?

1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is (I'll handle it later)
4. Discard this work

Which option?

Don't add explanation - keep options concise.

Step 4: Execute Choice

Option 1: Merge Locally

# Switch to base branch
git checkout <base-branch>

# Pull latest
git pull

# Merge feature branch
git merge <feature-branch>

# Verify tests on merged result
<test command>

# If tests pass
git branch -d <feature-branch>

Option 2: Push and Create PR

# Push branch
git push -u origin <feature-branch>

# Create PR
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>

## Test Plan
- [ ] <verification steps>
EOF
)"

Option 3: Keep As-Is

Report: "Keeping branch <name>. You can return to it later."

Option 4: Discard

Confirm first:

This will permanently delete:
- Branch <name>
- All commits: <commit-list>

Type 'discard' to confirm.

Wait for exact confirmation.

If confirmed:

git checkout <base-branch>
git branch -D <feature-branch>

Quick Reference

OptionMergePushCleanup Branch
1. Merge locallyyes-yes
2. Create PR-yes-
3. Keep as-is---
4. Discard--yes (force)

Common Mistakes

Skipping test verification

  • Problem: Merge broken code, create failing PR
  • Fix: Always verify tests before offering options

Open-ended questions

  • Problem: "What should I do next?" → ambiguous
  • Fix: Present exactly 4 structured options

No confirmation for discard

  • Problem: Accidentally delete work
  • Fix: Require typed "discard" confirmation

Red Flags

Never:

  • Proceed with failing tests
  • Merge without verifying tests on result
  • Delete work without confirmation
  • Force-push without explicit request

Always:

  • Verify tests before offering options
  • Present exactly 4 options
  • Get typed confirmation for Option 4

Integration

Called by:

  • subagent-driven-development (Step 7) - After all tasks complete
  • executing-plans (Step 5) - After all batches complete

Pairs with:

  • using-feature-branches - Creates the branch this skill finishes
  • commit-message - Use for commit and merge commit message formatting

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.