finishing-a-development-branch

finishing-a-development-branch is a skill for Claude Code from GanyuanRan/Aegis. It costs 38 tokens per session (1,102 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 — 22 skills, 3 commands, 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,178 stars · on GitHub

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 22 skills, 3 commands, 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,102 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.01102
Opus 5 $0.00019 $0.00551
Sonnet 5 $0.00008 $0.00220
Haiku 4.5 $0.00004 $0.00110

Measured 11d ago against content hash 995a2a17fdb5, 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.

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

How it starts

The opening of the file, as written. The whole thing — 130 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, 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.

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.

Push, PR, remote deletion, release, and force operations require explicit user authorization. Discard requires a fresh, exact typed confirmation naming branch, worktree path, and commits/delta to lose. Generic agreement is insufficient.

Read the full file on GitHub · 130 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 · 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,178 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 1,102 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-08-30.

Related

Other skills, from other repositories

repo-hygiene

Use when the scheduled repo-hygiene workflow runs from GitHub Actions (or an operator dry-run) to scan the repository for small, certain docs/test/code hygiene issues and fix them as one batched branch.

QwenLM/qwen-code · 48 tokens

review-delta

Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.

tirth8205/code-review-graph · 24 tokens

chinese-git-workflow

A reference for configuring Git with Chinese code-hosting services such as Gitee, Coding.net, GitLab China, and CNB, including SSH, HTTPS, credentials, CI, and repository mirroring.

jnMetaCode/superpowers-zh · 69 tokens

chinese-commit-conventions

A Chinese-language guide to Conventional Commits, a format for writing consistent Git commit messages, plus related changelog, commit-checking, and commit-helper configuration.

jnMetaCode/superpowers-zh · 65 tokens

goal-release

Cut a release end to end: use the draft-release skill to open the release PR and draft GitHub release, wait for CI to turn green, run the merge-pr skill to merge the release PR, then update the Homebrew formula from the published release assets. Use when the user wants to draft and merge a release in one go, or…

dyoshikawa/rulesync · 86 tokens

prs-awaiting-author

List open pull requests where the ball is in the author's court: CI is failing, review comments are unaddressed, or a maintainer question is awaiting the author's reply. Use when the user wants to see PRs awaiting author action.

dyoshikawa/rulesync · 53 tokens