agentleFS
REPOZYREPOZY/superpowers-optimized/skills/finishing-a-development-branch/SKILL.md

finishing-a-development-branch

Skill146 starsChanged 7 months agoMITView on GitHub

MUST USE when implementation is verified and you need to choose the branch outcome: merge, PR, keep, or discard. Triggers on: "merge this", "create a PR", "squash and merge", "we're done with this branch", "clean up the branch", "push this", "get it merged", after verification-before-completion passes. Routed by using-superpowers or executing-plans at completion.

187 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 20 projects that use this

  • kntismSkill

    condition-based-waiting

    Use when tests have race conditions, timing dependencies, or inconsistent pass/fail behavior - replaces arbitrary timeouts with condition polling to wait for actual state changes, eliminating flaky tests from timing guesses

    Also in 3 projects that use this

  • MicrosoftSkill

    testing-anti-patterns

    Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies

    Also in 4 projects that use this

  • MicrosoftSkill

    root-cause-tracing

    Use when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation when needed, to identify source of invalid data or incorrect behavior

    Also in 5 projects that use this

  • +3 more from Leodorareluctant259

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 173 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Run full project verification before offering options.

    line 18
  2. Distinctive:

    If verification fails, stop and return to implementation.

    line 20
  3. Distinctive:

    Keep branch/worktree as-is

    line 30
  4. Distinctive:

    Create PR with a description that includes:

    line 45
  5. Very specific:

    If session-log.md has [saved] entries written during this branch's lifetime, extract the Decisions and Rejected bullets from the most …

    line 50
  6. Distinctive:

    Keep worktree by default (remove only if user asks)

    line 51
  7. Distinctive:

    Keep branch and worktree

    line 54
  8. Distinctive:

    Delete branch and remove worktree

    line 60
  9. Distinctive:

    Never merge with failing tests.

    line 64
  10. Distinctive:

    Never delete work without explicit confirmation.

    line 65
  11. Distinctive:

    Never force-push unless explicitly requested.

    line 66

“Common” is measured: kept by at least 6 in 10 of the 173 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Finishing a Development Branch

Close development work with explicit integration choice.

Step 1: Verify

Run full project verification before offering options.

If verification fails, stop and return to implementation.

Step 2: Identify Base Branch

Detect merge base (main/master or repo default) and confirm if unclear.

Step 3: Offer Exactly Four Options

  1. Merge back to <base-branch> locally
  2. Push branch and open PR
  3. Keep branch/worktree as-is
  4. Discard branch/worktree

Step 4: Execute Safely

Option 1

  • Checkout base
  • Pull latest
  • Merge feature branch
  • Re-run verification
  • Delete merged branch
  • Remove worktree

Option 2

  • Push feature branch
  • Create PR with a description that includes:
    • What changed — one-paragraph summary of the change set
    • Why — the motivation or problem this solves (link to plan doc if one exists)
    • How to verify — exact commands or steps a reviewer can run to confirm the change works
    • Notable decisions — any trade-offs made, alternatives rejected, or non-obvious choices. If session-log.md has [saved] entries written during this branch's lifetime, extract the Decisions and Rejected bullets from the most recent entry and include them here. This ensures PR reviewers see the "why" without needing to read the log.
  • Keep worktree by default (remove only if user asks)

Option 3

  • Keep branch and worktree
  • Report exact path and branch name

Option 4

  • Show destructive impact summary
  • Require exact confirmation: discard
  • Delete branch and remove worktree

Hard Rules

  • Never merge with failing tests.
  • Never delete work without explicit confirmation.
  • Never force-push unless explicitly requested.

Final Report

Include:

  • Selected option
  • Commands executed
  • Final branch/worktree status
  • PR link (if created)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.