Tooluck logoTooluck
SKILL.md

finishing-a-development-branch

Agent skill fromGanyuanRan/Aegis

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.

How to install finishing-a-development-branch

install finishing-a-development-branch
# install the Aegis pack with the skills CLI
npx skills add GanyuanRan/Aegis

# or add only this skill to Claude Code: copy the folder

skills/finishing-a-development-branch/

# into

~/.claude/skills/finishing-a-development-branch/ (all projects)

.claude/skills/finishing-a-development-branch/ (one project)

skills/finishing-a-development-branch/SKILL.md

MITFull file
1# Finishing a Development Branch
2
3## Overview
4
5Integration choice and checkout lifetime are separate. Verify first, mutate only
6task-owned resources, then prove what was removed or retained.
7
8**Core principle:** fresh evidence -> authorized integration -> ownership-aware
9cleanup -> Git/path readback.
10
11**Announce at start:** explain which branch/worktree lifecycle is being closed.
12
13## Step 1: Environment and Ownership Detection
14
15Read the task's `TaskStartSnapshot` and current repository state. Record:
16
17- root, `HEAD`, branch/detached state, upstream divergence, and active Git ops;
18- staged/unstaged/untracked paths and the task-owned delta;
19- `git worktree list --porcelain`;
20- branch/worktree creator, task ownership, base branch, and cleanup trigger.
21
22Stop on conflicts, unexplained detached state, failed verification, dirty/untracked state in
23a cleanup target, or unknown ownership. Do not infer the base from the names
24`main` or `master`; use task records, repository authority, or explicit user
25direction. Never auto-stash, reset, clean, pull, rebase, amend, force-push, or
26bypass hooks.
27
28For a trusted host-managed detached checkout, follow the repository's approved
29managed-workspace contract: verify host binding, default cwd, root, and HEAD;
30then use its scoped local-commit and native handoff path. Report detached HEAD
31in the receipt. This exception does not authorize automatic deletion of the
32detached checkout or bypass unknown ownership/binding.
33…

Excerpt shown under the repository's MIT license.

More skills in Aegis

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates