finishing-a-development-branch

finishing-a-development-branch is a skill for Claude Code from Leodorareluctant259/superpowers-zh. It costs 45 tokens per session (1,273 once invoked), scanned A, a copy of finishing-a-development-branch, MIT.

A workflow for finishing a development branch, the separate line of code changes used for a feature or fix.

In plain words
What is it for?
Use it to verify tests, identify the base branch, then merge locally, create a pull request, keep the branch, or discard the work.
Why use it?
It checks the test suite before cleanup or merging and makes the final handling of the branch explicit.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the superpowers-zh plugin — 20 skills, 3 commands, 1 agent, 1 hook shipped together

Good fit Use it to verify tests, identify the base branch, then merge locally, create a pull request, keep the branch, or discard the work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leodorareluctant259/superpowers-zh/finishing-a-development-branch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Leodorareluctant259/superpowers-zh --skill finishing-a-development-branch
Clone the repo
git clone --depth 1 https://github.com/Leodorareluctant259/superpowers-zh

Made for: Claude Code.

Or install superpowers-zh, the plugin that ships this one along with the rest of its 20 skills, 3 commands, 1 agent, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for finishing-a-development-branch

README.md
[![agentmods](https://agentmods.dev/badge/skills/leodorareluctant259/superpowers-zh/finishing-a-development-branch/github.svg)](https://agentmods.dev/skills/leodorareluctant259/superpowers-zh/finishing-a-development-branch)
Your own site
<a href="https://agentmods.dev/skills/leodorareluctant259/superpowers-zh/finishing-a-development-branch"><img src="https://agentmods.dev/badge/skills/leodorareluctant259/superpowers-zh/finishing-a-development-branch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for finishing-a-development-branch

Your own site · 80×15
<a href="https://agentmods.dev/skills/leodorareluctant259/superpowers-zh/finishing-a-development-branch"><img src="https://agentmods.dev/badge/skills/leodorareluctant259/superpowers-zh/finishing-a-development-branch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,273 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01273
Opus 5 $0.00023 $0.00636
Sonnet 5 $0.00009 $0.00255
Haiku 4.5 $0.00005 $0.00127

Measured 11d ago against content hash 02425604f826, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

finishing-a-development-branch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to finishing-a-development-branch — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/finishing-a-development-branch/SKILL.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

完成开发分支

概述

通过提供清晰的选项并执行所选工作流来引导开发工作的收尾。

核心原则: 验证测试 → 展示选项 → 执行选择 → 清理。

开始时宣布: "我正在使用 finishing-a-development-branch 技能来完成这项工作。"

流程

步骤 1:验证测试

在展示选项之前,验证测试通过:

# 运行项目的测试套件
npm test / cargo test / pytest / go test ./...

如果测试失败:

测试失败(<N> 个失败)。必须先修复才能继续:

[显示失败信息]

在测试通过之前无法进行合并/PR。

停止。不要继续到步骤 2。

如果测试通过: 继续步骤 2。

步骤 2:确定基础分支

# 尝试常见的基础分支
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null

或者询问:"这个分支是从 main 分出来的——对吗?"

步骤 3:展示选项

展示以下 4 个选项:

实现已完成。你想怎么做?

1. 在本地合并回 <base-branch>
2. 推送并创建 Pull Request
3. 保持分支现状(我稍后处理)
4. 丢弃这项工作

选哪个?

不要添加解释 - 保持选项简洁。

步骤 4:执行选择

选项 1:本地合并
# 切换到基础分支
git checkout <base-branch>

# 拉取最新代码
git pull

# 合并功能分支
git merge <feature-branch>

# 在合并结果上验证测试
<test command>

# 如果测试通过
git branch -d <feature-branch>

然后:清理工作树(步骤 5)

选项 2:推送并创建 PR
# 推送分支
git push -u origin <feature-branch>

# 创建 PR
gh pr create --title "<title>" --body "$(cat <<'EOF'
## 摘要
<2-3 条变更要点>

## 测试计划
- [ ] <验证步骤>
EOF
)"

然后:清理工作树(步骤 5)

选项 3:保持现状

报告:"保留分支 。工作树保留在 。"

不要清理工作树。

选项 4:丢弃

先确认:

这将永久删除:
- 分支 <name>
- 所有提交:<commit-list>
- 工作树 <path>

输入 'discard' 确认。

等待精确的确认。

确认后:

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

然后:清理工作树(步骤 5)

步骤 5:清理工作树

对于选项 1、2、4:

检查是否在工作树中:

git worktree list | grep $(git branch --show-current)

如果是:

git worktree remove <worktree-path>

对于选项 3: 保留工作树。

快速参考

选项 合并 推送 保留工作树 清理分支
1. 本地合并 - -
2. 创建 PR - -
3. 保持现状 - - -
4. 丢弃 - - - ✓(强制)

常见错误

跳过测试验证

  • 问题: 合并损坏的代码、创建失败的 PR
  • 修复: 在提供选项前始终验证测试

开放式问题

  • 问题: "接下来该做什么?" → 含糊不清
  • 修复: 准确展示 4 个结构化选项

自动清理工作树

  • 问题: 在可能还需要工作树时就删除了(选项 2、3)
  • 修复: 只在选项 1 和 4 时清理

丢弃时不确认

  • 问题: 意外删除工作成果
  • 修复: 要求输入 "discard" 确认

Read the full file on GitHub · 201 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 201 lines · 45 tokens per session scan A 02425604f826

Subscribe to this mod's changes

finishing-a-development-branch is a skill published in the GitHub repository Leodorareluctant259/superpowers-zh (5 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 1,273 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to finishing-a-development-branch, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

ainb-fleet:ainb-spawn

Spawn a coding-agent session correctly with ainb run: always into a git worktree, never bare into a plain checkout. Use whenever you are about to start a Claude/Codex/Gemini/Copilot session in a terminal. Guards the invocations that silently produce a (broken) workspace row, two agents sharing one working tree, a…

stevengonsalvez/agents-in-a-box · 107 tokens

create-pr

This skill should be used when user asks to "create a PR", "make a pull request", "open PR for this branch", "submit changes as PR", "push and create PR", or explicitly invokes "create-pr".

fcakyon/claude-codex-settings · 49 tokens

commit-staged

This skill should be used when user asks to "commit these changes", "write commit message", "stage and commit", "create a commit", "commit staged files", or explicitly invokes "commit-staged".

fcakyon/claude-codex-settings · 46 tokens

resolve-pr-comments

This skill should be used when user asks to "address PR comments", "resolve PR feedback", "handle review comments", "fix PR issues", "respond to PR review", or explicitly invokes "resolve-pr-comments".

fcakyon/claude-codex-settings · 47 tokens

review-pr

This skill should be used when user asks to "review a PR", "review pull request", "review this pr", "code review this PR", "check PR.

fcakyon/claude-codex-settings · 36 tokens

update-pr-summary

This skill should be used when user asks to "update PR summary", "update PR description", "rewrite PR body", "refresh PR title and body", or explicitly invokes "update-pr-summary".

fcakyon/claude-codex-settings · 43 tokens