Superpowers Finishing A Development Branch logo

Superpowers Finishing A Development Branch

Community
christopherarter
superpowers-finishing-a-development-branch

Branch finished, tests green? Load first to merge, PR, or clean up.

Overview

Publisherchristopherarter
Repositorysuperpowers-reasonix
Skill namesuperpowers-finishing-a-development-branch
Stars
101
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by christopherarter on GitHub. Read the source before you install it.

Installation

Install the Superpowers Finishing A Development Branch AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/christopherarter/superpowers-reasonix/tree/main/skills/superpowers-finishing-a-development-branch
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/christopherarter/superpowers-reasonix.git /tmp/superpowers-reasonix
mkdir -p .claude/skills
cp -r /tmp/superpowers-reasonix/skills/superpowers-finishing-a-development-branch .claude/skills/superpowers-finishing-a-development-branch
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Superpowers Finishing A Development Branch in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Superpowers Finishing A Development Branch on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Superpowers Finishing A Development Branch is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Finishing a Development Branch

Overview

Present clear options. Handle chosen workflow.

Core principle: Verify tests → detect environment → present options → execute choice → clean up.

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

The Process

Step 1: Verify Tests

Verify tests pass before options (use superpowers-verification-before-completion):

bash
npm test / cargo test / pytest / go test ./...

Tests fail: report failures. Cannot merge/PR until they pass. Stop. Tests pass: continue.

Step 2: Detect Environment

Capture all three up front, before any later step changes directory — WORKTREE_PATH must reflect where you are now, not after Step 5 has cd'd to the main repo root:

bash
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
WORKTREE_PATH=$(git rev-parse --show-toplevel)
StateMenuCleanup
GIT_DIR == GIT_COMMON (normal repo)Standard 4 optionsNo worktree to clean up
GIT_DIR != GIT_COMMON, named branchStandard 4 optionsProvenance-based (Step 6)
GIT_DIR != GIT_COMMON, detached HEADReduced 3 options (no merge)No cleanup (externally managed)

Step 3: Determine Base Branch

bash
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null

Or ask: "Branch split from main — correct?"

Step 4: Present Options

Normal repo or named-branch worktree — 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?

Detached HEAD — present exactly these 3 options:

Implementation complete. You're on a detached HEAD (externally managed workspace).

1. Push as new branch and create a Pull Request
2. Keep as-is (I'll handle it later)
3. Discard this work

Which option?

Don't add explanation. Keep options concise.

Step 5: Execute Choice

Option 1: Merge Locally
bash
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
cd "$MAIN_ROOT"
git checkout <base-branch>
git pull
git merge <feature-branch>
<test command>   # Verify tests on merged result

After merge succeeds: cleanup worktree (Step 6), then git branch -d <feature-branch>.

Option 2: Push and Create PR
bash
git push -u origin <feature-branch>
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>

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

Do NOT clean up the worktree — needed alive for PR feedback.

Option 3: Keep As-Is

Report: "Keeping branch . Worktree preserved at ." No cleanup.

Option 4: Discard

Confirm first — require typed discard:

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

Type 'discard' to confirm.

Confirmed: cd to main repo root, cleanup worktree (Step 6), then git branch -D <feature-branch>.

Step 6: Cleanup Workspace

Runs for Options 1 and 4 only. Options 2 and 3 preserve worktree.

Reuse the GIT_DIR, GIT_COMMON, and WORKTREE_PATH captured in Step 2 — do NOT recompute them here. Step 5 (Options 1 and 4) has already cd'd to the main repo root, so a fresh git rev-parse --show-toplevel would return the main repo, not the worktree, and remove the wrong path. Removal must run from outside the worktree.

If GIT_DIR == GIT_COMMON: normal repo, nothing to clean up.

If WORKTREE_PATH under .worktrees/, worktrees/, or ~/.config/reasonix/worktrees/: we created it — we own cleanup:

bash
git worktree remove "$WORKTREE_PATH"
git worktree prune

If removal is refused (contains modified or untracked files): worktree holds files that exist nowhere else — uncommitted plans, notes, scratch work. Never --force on your own initiative. Show the user what's at stake and ask:

bash
git -C "$WORKTREE_PATH" status --porcelain -uall
Worktree removal refused — these files were never committed:

<file list>

1. Commit them to <branch> before cleanup
2. Move them into <main repo root>
3. Delete them (unrecoverable)

Which?

Carry out the choice, then remove the worktree.

Otherwise: harness owns workspace. Do NOT remove it. Workspace-exit tool available? Use it. Else leave in place.

Quick Reference

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

Red Flags

Never: proceed on failing tests; merge without verifying tests on result; delete work without typed confirmation; force-push without explicit request; remove worktree before merge confirmed; clean up worktrees you didn't create; git worktree remove from inside the worktree; treat a removal-refused error as "just add --force" — it means files exist only there, so show the user and ask.

Always: verify tests before options; detect environment before menu; present exactly 4 options (3 detached HEAD); typed confirmation for Option 4; clean up worktree for Options 1 & 4 only; cd to main repo root before removal; git worktree prune after.

Frequently asked questions

What does the Superpowers Finishing A Development Branch AI skill do?

Branch finished, tests green? Load first to merge, PR, or clean up.

Why use Superpowers Finishing A Development Branch on TypingMind?

Because you install it once and use it with any model. Superpowers Finishing A Development Branch is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Superpowers Finishing A Development Branch in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/christopherarter/superpowers-reasonix/tree/main/skills/superpowers-finishing-a-development-branch. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Superpowers Finishing A Development Branch?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Superpowers Finishing A Development Branch?

As many as you like. As long as a model supports skills, you can use Superpowers Finishing A Development Branch with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Superpowers Finishing A Development Branch AI skill free?

Yes. It is published on GitHub by christopherarter under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇