Finishing a Development Branch
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
Use immediately after a PR is merged to clean up the local feature branch and resync main.
$ npx skills add swingerman/engineer --skill post-merge -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install swingerman/engineer post-merge --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineer/skills/post-merge .claude/skills/post-merge && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "post-merge" agent skill from https://github.com/swingerman/engineer/tree/master/engineer/skills/post-merge into .claude/skills/post-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "post-merge", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/swingerman/engineer/tree/master/engineer/skills/post-mergeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add swingerman/engineer --skill post-merge -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install swingerman/engineer post-merge --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .agents/skills && cp -r skills-src/engineer/skills/post-merge .agents/skills/post-merge && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "post-merge" agent skill from https://github.com/swingerman/engineer/tree/master/engineer/skills/post-merge into .agents/skills/post-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "post-merge", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add swingerman/engineer --skill post-merge -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install swingerman/engineer post-merge --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/engineer/skills/post-merge .cursor/skills/post-merge && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "post-merge" agent skill from https://github.com/swingerman/engineer/tree/master/engineer/skills/post-merge into .cursor/skills/post-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "post-merge", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/swingerman/engineer.git --path engineer/skills/post-merge--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add swingerman/engineer --skill post-merge -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install swingerman/engineer post-merge --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/engineer/skills/post-merge .gemini/skills/post-merge && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "post-merge" agent skill from https://github.com/swingerman/engineer/tree/master/engineer/skills/post-merge into .gemini/skills/post-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "post-merge", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install swingerman/engineer post-mergeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add swingerman/engineer --skill post-merge -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .github/skills && cp -r skills-src/engineer/skills/post-merge .github/skills/post-merge && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "post-merge" agent skill from https://github.com/swingerman/engineer/tree/master/engineer/skills/post-merge into .github/skills/post-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "post-merge", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add swingerman/engineer --skill post-merge -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install swingerman/engineer post-merge --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/swingerman/engineer.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/engineer/skills/post-merge .opencode/skills/post-merge && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "post-merge" agent skill from https://github.com/swingerman/engineer/tree/master/engineer/skills/post-merge into .opencode/skills/post-merge/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "post-merge", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
post-mergeUse immediately after a PR is merged to clean up the local feature branch and resync main.
Post Merge is an agent skill from swingerman/engineer. Use immediately after a PR is merged to clean up the local feature branch and resync main. Triggers — "/engineer.post-merge", "did we merge", "did we push", "PR merged", "post-merge cleanup", or right after a gh pr merge succeeds in the same session.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development. It works with Git. The repository describes itself as: Disciplined Agentic Engineering — a methodology kit for Claude Code: acceptance-test-first specs, explicit checkpoints, and autonomy you can actually leave running. The engineer… The licence is MIT.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 32947eb. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitghFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Post Merge loads about 1.4k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 662 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from swingerman/engineer at commit 32947eb, republished under its MIT licence (© swingerman). 662 words, ~1,350 tokens.
.claude/skills/post-merge/SKILL.md (or your agent's skills folder).The branch-hygiene skill that runs immediately after a PR merges — not deferred to the next session. next and session-summary already catch a stale branch at session boundaries (v1.7.1); post-merge closes the gap in between, where users were still asking "are we still on the feature branch?" mid-session.
gh pr merge, gh pr merge --auto, or a "Merged" PR state in gh pr view --json state. The agent that ran the merge calls this skill before doing anything else./engineer.post-merge or the trigger phrases above.Not for: cleanup when the PR isn't merged yet (the work isn't done); session-end teardown (session-summary handles that); session-start survey (next already probes for stale branches as a backstop).
Resolve + identify merged branch. Resolve the methodology root via ${CLAUDE_PLUGIN_ROOT}/scripts/dae_resolve.py. Get the current branch (git branch --show-current). If it's main/master/the repo's default branch, there's nothing to clean — stop and report.
Probe merge state. Run git fetch origin --quiet, then check whether the current branch has been merged:
gh is available): gh pr view --json state,mergedAt,headRefName --jq '.state' for the PR linked to this branch. State of MERGED is the strongest signal.git merge-base --is-ancestor HEAD origin/HEAD (or origin/main). True means every commit on this branch is reachable from main.If neither check confirms a merge, stop — the work isn't shipped yet. Report what was checked.
Run the cleanup. Run the three commands in order, stopping on any non-zero exit:
git checkout <default-branch>
git pull --ff-only
git branch -d <merged-branch>git branch -d (not -D) refuses unmerged work — non-destructive by construction. If it refuses, surface what's unmerged and stop; don't escalate to -D without explicit user confirmation.
Prune stale remote refs. git fetch origin --prune. Removes pointers to remote branches that no longer exist (e.g. when the GitHub "delete branch on merge" setting removed the remote).
Reconcile local state, then the tracker. Flip the local feature.md status FIRST — otherwise progress-log (which derives the tracker record from local truth) and next/reorient (which read feature.md status) keep seeing in-progress. Run:
${CLAUDE_PLUGIN_ROOT}/scripts/dae_reconcile.py <merged-feature-dir> --applyIt sets feature.md status: done when the PR is merged (detected via gh, so squash-merge and git.manual are covered — the git-ancestry check in Step 2 is not) and returns flag: merged-unverified when no CP7 verify handoff exists. If flagged, surface it prominently — the feature shipped with its ACs unverified; that is a discipline gap, not a clean close. Then dispatch /engineer.progress-log to propagate the done state to progress.md + the tracker (records merged_at). Per ${CLAUDE_PLUGIN_ROOT}/references/handoff-dispatch.md — auto at medium/high, surface-and-ask at low.
Close the session log. A merged feature is the clearest session boundary there is — the work shipped and the next session starts somewhere else. Auto-invoke /engineer.session-summary at autonomy medium/high; confirm-then-invoke at low. This is the human-readable "how do I pick this up" record; without it the only trace of the session is machine handoffs. Skip if a session-summary entry for today already exists on this feature.
Handoff. Emit a summary per ${CLAUDE_PLUGIN_ROOT}/references/handoff-summary.md. checkpoint: null; artifacts: []; human_action_needed: no. The handoff records: the merged branch name, the PR URL (if known), and the new HEAD commit. recommended_next points at /engineer.next if the feature is shipped, or the relevant fix/session continuation otherwise.
| Level | Behavior |
|---|---|
high | Run all seven steps. Report a one-line summary. |
medium | Run all seven steps. Report what changed (one short paragraph). |
low | Surface the planned commands and the merge-state evidence; wait for confirmation before running. |
git fetch --prune and skip the rest).git branch -d will refuse; that's expected. Either confirm -D manually or rebase onto main and try again.${CLAUDE_PLUGIN_ROOT}/references/handoff-summary.md — handoff schema${CLAUDE_PLUGIN_ROOT}/references/handoff-dispatch.md — autonomy-driven dispatch rulenext (session-start stale-branch backstop), session-summary (session-end stale-branch backstop), progress-log (tracker propagation)© swingerman, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in engineer/skills/post-merge of swingerman/engineer.
Open the folder on GitHubat commit 32947eb
Post Merge next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Post Merge this skillswingerman/engineer | 154 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Finishing a Development Branchobra/superpowers | 296k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Code Review ChecklistshareAI-lab/learn-claude-code | 78k | 5 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything | 86k | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Code Design Rationale Investigatorcursor/plugins | 10k | 9 repos | ~2.6k | Automated safety check: Pass | None | |
| Understand Diff AnalysisEgonex-AI/Understand-Anything | 86k | 1 repos | ~1.4k | Automated safety check: Pass | MIT |
obra/superpowers
Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.
shareAI-lab/learn-claude-code
Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.
Egonex-AI/Understand-Anything
Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.
cursor/plugins
Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.
Egonex-AI/Understand-Anything
Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.
Egonex-AI/Understand-Anything
Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.
swingerman/engineer
A skill your agent uses to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods.
swingerman/engineer
A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.
swingerman/engineer
A skill your agent uses to drive a bug fix from first report through close, with a "why didn't we catch it?" loop at the end.
swingerman/engineer
A skill your agent uses to drive feature work through the Acceptance Test Driven Development workflow — Given/When/Then specs before code, a project-specific test pipeline, and two parallel test…
swingerman/engineer
Use after a feature passes Light Verify (CP7), to prove the tests actually catch bugs and, where the code warrants it, to formally check its invariants — Checkpoint 8.
swingerman/engineer
Use at the start of a work session, or any time the question is "what should I pick up now" across the whole project.
Works with
Categories
Use immediately after a PR is merged to clean up the local feature branch and resync main. Post Merge is an agent skill from swingerman/engineer. Use immediately after a PR is merged to clean up the local feature branch and resync main.
Post Merge fits situations like: — /engineer.post-merge; post-merge cleanup; right after a gh pr merge succeeds in the same session.
Run `npx skills add swingerman/engineer --skill post-merge -a claude-code`. Or copy the skill folder (engineer/skills/post-merge in swingerman/engineer) into .claude/skills/post-merge in your project. Claude Code loads it when a task matches its description.
Run `npx skills add swingerman/engineer --skill post-merge -a codex`. Or copy the skill folder (engineer/skills/post-merge in swingerman/engineer) into .agents/skills/post-merge in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add swingerman/engineer --skill post-merge -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/post-merge, .gemini/skills/post-merge, .github/skills/post-merge and .opencode/skills/post-merge in your project.
Going by SKILL.md and its folder, Post Merge needs the command-line tools its instructions call (git and gh).
SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Post Merge is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Post Merge: Finishing a Development Branch (obra/superpowers, 296k stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 86k stars) and Code Design Rationale Investigator (cursor/plugins, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
swingerman (a GitHub user) maintains it in swingerman/engineer, which has 154 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on September 23, 2026.
Source: swingerman/engineer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.