finishing-a-development-branch
Use when verified work needs integration or cleanup of an existing task-created branch/worktree, or the user explicitly requests merge, PR, or branch lifecycle handling.
Install / Use
npx skills add GanyuanRan/Aegis --skill finishing-a-development-branchInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of finishing-a-development-branch
finishing-a-development-branch scores 82/100 on our quality scale, 3378th of 4,700 Development & Engineering skills we index.
Its SKILL.md is 5.1 KB long, well organised into 14 sections and no code examples: a solid amount of guidance for an agent.
With 1,273 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so finishing-a-development-branch is actively maintained.
- Our last check on 2026-11-07 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-03. Automated pattern scan on 2026-10-03. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
finishing-a-development-branch compared with similar skills
All 4 of these similar skills score higher than finishing-a-development-branch; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| finishing-a-development-branch (this skill)by GanyuanRan | 82 | 1.3k | 53d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
Frequently asked questions
- How do I install finishing-a-development-branch?
- Run
npx skills add GanyuanRan/Aegis --skill finishing-a-development-branch. The install tabs above show the steps for each supported agent. - Which AI agents does finishing-a-development-branch work with?
- It is written for Zed, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is finishing-a-development-branch safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is finishing-a-development-branch still maintained?
- The repository was last updated about 2 months ago, so finishing-a-development-branch is actively maintained.
Skill content
View source on GitHubname: finishing-a-development-branch description: "Use when verified work needs integration or cleanup of an existing task-created branch/worktree, or the user explicitly requests merge, PR, or branch lifecycle handling."
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:
- merge into the recorded base locally;
- push and create/update a PR;
- keep the branch for later integration;
- 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.
Step 4: Execute Without Hidden Mutation
Local merge
Verify the target checkout is safe, switch to the recorded base, merge without an implicit pull, and rerun verification on the merged result. If integration or verification fails, preserve both histories and stop.
Push or PR
Push only the authorized task branch and create/update the PR with summary and fresh test evidence. PR creation does not itself prove merge and does not require the temporary worktree to remain.
Keep branch
Retain the branch. Remove a clean task-created temporary worktree by default; retain it only for an explicit ongoing-checkout need and report why.
Discard
After exact confirmation, remove only the named clean task-owned worktree, then the named branch. If either differs from the confirmation, stop and ask again.
Step 5: Prove Integration Before Branch Deletion
Use evidence matching the merge strategy:
- merge/fast-forward: prove the task tip is an ancestor of the recorded base;
- squash/rebase: use fresh PR merge metadata plus strategy-appropriate patch
equivalence (
git cherryfor rebased commits; stable patch-id or bounded changed-path/tree comparison for squashes), not an ancestor-only test; - unmerged/open PR: keep the branch unless discard was exactly confirmed.
Never delete a branch merely because a PR was opened or a similarly named commit exists.
Step 6: Cleanup in Dependency Order
For a clean task-owned resource:
- move to another safe registered checkout; never remove the current working directory;
- remove/unregister the worktree first with
git worktree remove <exact-path>; - read back
git worktree list --porcelain; - verify the exact path no longer exists;
- only then delete an integrated or exactly confirmed branch;
- read back branch refs,
HEAD, and repository status.
Do not use routine --force, global git worktree prune, wildcard deletion, or
cleanup of resources absent from the task ownership record. On Windows, Git may
unregister a worktree while its directory remains locked: re-check registration
and the exact resolved path, remove only a proven task-owned clean residual when
safe, otherwise retain it and report the lock/path. Never widen deletion scope.
Final Git Receipt
Report:
- current branch and commit SHA/message, or the reason no commit exists;
Task clean: yes|noandRepository clean: yes|noindependently;- branch/worktree created, removed, or retained, with evidence/reason;
- integration evidence and any remaining user action.
Task clean means no uncommitted task-owned delta remains. Repository clean
means no staged, unstaged, or untracked repository state remains.
This is a local Git receipt, not authoritative completion or merge truth beyond the evidence read back.
Integration
Called only when branch/worktree integration or explicit lifecycle handling is
in scope. Pairs with using-git-worktrees and
verification-before-completion.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
