finishing-a-development-branch

finishing-a-development-branch is a skill for Claude Code from GanyuanRan/Aegis. It costs 38 tokens per session (1,176 once invoked), scanned A, original, MIT.

A workflow for closing out a development branch or separate work folder after a task is verified. A branch is an isolated line of code changes, while a worktree is another working folder connected to the same Git project.

In plain words
What is it for?
Use it to inspect branch and worktree state, choose an authorized integration path, merge or create a pull request when requested, and verify the final Git state.
Why use it?
It helps integrate completed work and clean up only resources created for that task, while stopping when ownership, conflicts, or verification are unclear.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the aegis plugin — 23 skills, 1 hook shipped together

Good fit Use it to inspect branch and worktree state, choose an authorized integration path, merge or create a pull request when requested, and verify the final Git state.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ganyuanran/aegis/finishing-a-development-branch
About the project

Aegis is a method pack that guides coding agents to inspect a project's baseline, make bounded changes, and verify their work with fresh evidence. It is for people using coding-agent hosts who want fewer unverified changes and less unnecessary process. The catalogue add-ons implement this method through skills, instructions, commands, a hook, and a plugin.

GanyuanRan/Aegis · 1,460 stars · on GitHub · autoloom.codes

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 GanyuanRan/Aegis --skill finishing-a-development-branch
Clone the repo
git clone --depth 1 https://github.com/GanyuanRan/Aegis

Made for: Claude Code.

Or install aegis, the plugin that ships this one along with the rest of its 23 skills, 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/ganyuanran/aegis/finishing-a-development-branch/github.svg)](https://agentmods.dev/skills/ganyuanran/aegis/finishing-a-development-branch)
Your own site
<a href="https://agentmods.dev/skills/ganyuanran/aegis/finishing-a-development-branch"><img src="https://agentmods.dev/badge/skills/ganyuanran/aegis/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/ganyuanran/aegis/finishing-a-development-branch"><img src="https://agentmods.dev/badge/skills/ganyuanran/aegis/finishing-a-development-branch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,176 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.01176
Opus 5.5 $0.00015 $0.00470
Sonnet 5.5 $0.00008 $0.00235
Haiku 4.5 $0.00004 $0.00118

Measured 1mo ago against content hash e731ca2008c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

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

How it starts

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

Finishing a Development Branch

Overview

Integration choice and checkout lifetime are separate. Verify first, mutate only task-owned resources, then prove what was removed or retained.

Core principle: fresh evidence -> authorized integration -> ownership-aware cleanup -> Git/path readback.

Announce at start: explain which branch/worktree lifecycle is being closed.

Step 1: Environment and Ownership Detection

Read the task's TaskStartSnapshot and current repository state. Record:

  • root, HEAD, branch/detached state, upstream divergence, and active Git ops;
  • staged/unstaged/untracked paths and the task-owned delta;
  • git worktree list --porcelain;
  • branch/worktree creator, task ownership, base branch, and cleanup trigger.

Stop on conflicts, unexplained detached state, failed verification, dirty/untracked state in a cleanup target, or unknown ownership. Do not infer the base from the names main or master; use task records, repository authority, or explicit user direction. Never auto-stash, reset, clean, pull, rebase, amend, force-push, or bypass hooks.

For a trusted host-managed detached checkout, follow the repository's approved managed-workspace contract: verify host binding, default cwd, root, and HEAD; then use its scoped local-commit and native handoff path. Report detached HEAD in the receipt. This exception does not authorize automatic deletion of the detached checkout or bypass unknown ownership/binding.

If no task-created branch/worktree exists and integration was not requested, skip this workflow: report the local task commit plus Task clean and Repository clean; do not invent merge/PR ceremony.

Step 2: Fresh Verification

Run the smallest current-authority test set that proves the completed task. If it fails, preserve all work and return to diagnosis. Do not present the branch as ready.

Step 3: Choose the Authorized Outcome

When a task branch actually needs disposition, present only applicable choices:

  1. merge into the recorded base locally;
  2. push and create/update a PR;
  3. keep the branch for later integration;
  4. discard the exact task-owned branch/worktree.

Read the full file on GitHub · 136 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. 1mo ago Changed · +6 lines e731ca2008c7
  2. 3mo ago First seen · 130 lines · 38 tokens per session scan A 995a2a17fdb5

Subscribe to this mod's changes

finishing-a-development-branch is a skill published in the GitHub repository GanyuanRan/Aegis (1,460 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 1,176 once invoked, about $0.0002 per session on Opus 5.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-08-30.

Related

finishing-a-development-branch compared with skills from other repositories

finishing-a-development-branch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
finishing-a-development-branchGanyuanRan/AegisSkill1.5kyesterdayMITA38Claude Code
repo-hygieneQwenLM/qwen-codeSkill31ktodayApache-2.0A48Claude Code, Codex
chinese-git-workflowjnMetaCode/superpowers-zhSkill8.7k2d agoMITA69Claude Code
chinese-commit-conventionsjnMetaCode/superpowers-zhSkill8.7k2d agoMITA65Claude Code
about-thinkrailJetBrains/thinkrailSkill8.5ktodayApache-2.0A153Claude Code, Codex
review-deltatirth8205/code-review-graphSkill33k16d agoMITA24Claude Code
fanouthashgraph-online/awesome-codex-pluginsSkill1.6ktodayApache-2.0A68Claude Code, Codex