finishing-a-development-branch

finishing-a-development-branch is a skill for Claude Code from zhaixin244-wq/fnw. It costs 45 tokens per session (1,273 once invoked), scanned A, original, MIT.

A workflow for finishing a Git development branch after its tests pass, with choices for merging, opening a pull request, keeping it, or discarding it.

In plain words
What is it for?
Use it to verify tests, identify the base branch, merge locally, push and create a pull request, preserve the branch, or remove it.
Why use it?
It makes the final branch decision explicit and ensures the completed work is tested before integration or cleanup.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

Good fit Use it to verify tests, identify the base branch, merge locally, push and create a pull request, preserve the branch, or remove it.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhaixin244-wq/fnw/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 zhaixin244-wq/fnw --skill finishing-a-development-branch
Clone the repo
git clone --depth 1 https://github.com/zhaixin244-wq/fnw

Made for: Claude Code.

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/zhaixin244-wq/fnw/finishing-a-development-branch/github.svg)](https://agentmods.dev/skills/zhaixin244-wq/fnw/finishing-a-development-branch)
Your own site
<a href="https://agentmods.dev/skills/zhaixin244-wq/fnw/finishing-a-development-branch"><img src="https://agentmods.dev/badge/skills/zhaixin244-wq/fnw/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/zhaixin244-wq/fnw/finishing-a-development-branch"><img src="https://agentmods.dev/badge/skills/zhaixin244-wq/fnw/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 original No closer match found 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 9d ago against content hash 02425604f826, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 9d 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

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/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. 9d 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 zhaixin244-wq/fnw (29 stars, last pushed 3mo ago), 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories