Skills for Real Engineers. Straight from my .agents directory.
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
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)
1# Finishing a Development Branch23## Overview45Integration choice and checkout lifetime are separate. Verify first, mutate only6task-owned resources, then prove what was removed or retained.78**Core principle:** fresh evidence -> authorized integration -> ownership-aware9cleanup -> Git/path readback.1011**Announce at start:** explain which branch/worktree lifecycle is being closed.1213## Step 1: Environment and Ownership Detection1415Read the task's `TaskStartSnapshot` and current repository state. Record:1617- 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.2122Stop on conflicts, unexplained detached state, failed verification, dirty/untracked state in23a cleanup target, or unknown ownership. Do not infer the base from the names24`main` or `master`; use task records, repository authority, or explicit user25direction. Never auto-stash, reset, clean, pull, rebase, amend, force-push, or26bypass hooks.2728For a trusted host-managed detached checkout, follow the repository's approved29managed-workspace contract: verify host binding, default cwd, root, and HEAD;30then use its scoped local-commit and native handoff path. Report detached HEAD31in the receipt. This exception does not authorize automatic deletion of the32detached checkout or bypass unknown ownership/binding.33…
Excerpt shown under the repository's MIT license.
More skills in Aegis
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
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
