post-merge

post-merge is a skill for Claude Code, Codex from YoungjaeDev/my-claude-plugins. It costs 186 tokens per session (8,690 once invoked), scanned B, original, MIT.

A procedure for after a pull request merges, meaning proposed code has been accepted into the main project. It cleans up the local branch, updates project tracking, records knowledge, and commits the changes.

In plain words
What is it for?
Use it from the main repository to confirm a merged pull request, clean up branches, update tracking and wiki information, refresh the README, and commit the result.
Why use it?
It gathers the follow-up work in one process so merged changes are reflected in configuration, documentation, and the project wiki.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also agents/openai.yaml present. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the dev plugin — 12 skills, 3 agents shipped together

Good fit Use it from the main repository to confirm a merged pull request, clean up branches, update tracking and wiki information, refresh the README, and commit the result.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add YoungjaeDev/my-claude-plugins
Claude Code
/plugin install dev

Made for: Claude Code, Codex.

Or install dev, the plugin that ships this one along with the rest of its 12 skills, 3 agents.

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 post-merge

README.md
[![agentmods](https://agentmods.dev/badge/skills/youngjaedev/my-claude-plugins/post-merge/github.svg)](https://agentmods.dev/skills/youngjaedev/my-claude-plugins/post-merge)
Your own site
<a href="https://agentmods.dev/skills/youngjaedev/my-claude-plugins/post-merge"><img src="https://agentmods.dev/badge/skills/youngjaedev/my-claude-plugins/post-merge/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 post-merge

Your own site · 80×15
<a href="https://agentmods.dev/skills/youngjaedev/my-claude-plugins/post-merge"><img src="https://agentmods.dev/badge/skills/youngjaedev/my-claude-plugins/post-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 186 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,690 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00186 $0.08690
Opus 5.5 $0.00074 $0.03476
Sonnet 5.5 $0.00037 $0.01738
Haiku 4.5 $0.00019 $0.00869

Measured 13d ago against content hash fc9a37695002, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

post-merge scanned grade B with 1 finding 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 13d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/collect-cleanup.sh, tests/run-tests.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **Recurring leftover**: before printing, grep the older archives (`.claude/state/archive/review-loop-*.json` and the pre-rename `cr-fix-*.json`, excluding this PR) for the same finding. A leftover that surfaces a secon
plugins/dev/skills/post-merge/SKILL.md · 336 lines

How it starts

The opening of the file, as written. The whole thing — 336 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Post-Merge

Local cleanup after a PR is merged. One run takes a merged PR from leftover-review surface → branch cleanup → issue close → repo About check → commit. It records no lessons: those go to /retro in the session that built the change. Follow project guidelines in @CLAUDE.md and @AGENTS.md throughout.

Guidelines

  • Worktree mode. post-merge runs from the main repo or from the PR's worktree. Every step works on the main repo: git calls run as git -C "$MAIN_REPO" and repo paths resolve under $MAIN_REPO/, in the steps below and in references/. MAIN_REPO=$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)") gives the same answer from either place, so re-derive it in any fresh shell. Inside a worktree (IN_WT=1) Step 1 copies the worktree's review-loop state into the main repo's archive, Step 4 leaves the branch alone (the worktree still has it checked out), and Step 11 prints the one command that removes the worktree and the branch. post-merge never removes the worktree itself: on Windows a worktree removed from inside itself is only half deleted.
  • Non-default base. For a PR into a branch CodeRabbit does not auto-review, review-loop on the auto / pr-bot source posts @coderabbitai review itself, unless the repo set reviews.auto_review.enabled: false (plugins/dev/skills/review-loop/SKILL.md Step 2); Step 3 below checks out that base like any other. It also changes what the merge did to the linked issues: GitHub honours a closing keyword only on a merge into the default branch, so a non-default base leaves every one of them open with no signal on the PR page — Step 5 is what catches that, and it runs on every PR.
  • gh is the authoritative merge signal. Step 1's gh pr view ... state=MERGED is the single source of truth for "did this land", and Step 3.5 asks gh the same question (gh pr list --head <branch>) for every other worktree's branch. No step decides "merged" by comparing git SHAs.
  • SHA comparison proves "nothing unique", never "merged". git log <base>..<branch>, git cherry and git rev-list --left-right read as unmerged after a squash merge (base gets one new SHA) or a rebase merge (branch SHAs rewritten), so none of them answers "did it land". Step 3.5 runs git cherry only after gh has said merged, to show the branch holds no commit the PR did not deliver, and settles whatever cherry still lists by content: the branch's files against the PR's merge commit. If unsure content landed, diff content, not SHAs (Step 4).
  • Leftover-review surface (Step 1.5) is informational. The run reads review-loop's state file (.claude/state/review-loop-<PR>.json, else the latest .claude/state/archive/ copy, else the same under the pre-rename cr-fix- prefix) to surface autonomously-deferred or cap/timeout-stopped findings after the merge, but never blocks cleanup. It always prints one leftover-reviews: … checkpoint line so a skip can't pass unnoticed. gh / jq / Read only → identical under Claude and Codex.
  • Codex partial-execution. /docs:readme and /docs:changelog (Steps 9, 9.5) are commands, which Codex does not load; under Codex do the same edit by hand from the docs:doc-guides skill and note it. Every other step runs identically on both runtimes.
  • Interactive input is capability-aware. Every prompt and confirmation below, each AskUserQuestion mention included, is a gate rather than a tool name: AskUserQuestion under Claude Code, request_user_input under Codex where exposed, otherwise one concise blocking question asked before the irreversible action (git rm, git worktree remove, git push origin --delete, gh repo edit). Full policy: AGENTS.md → "Cross-runtime interactive input policy".
  • Run record. Step 1 opens .claude/state/post-merge-<PR>.json and every step appends its outcome, so a silent skip becomes visible; Step 10 finalizes it. Mechanism, per-step skip reasons, and the finalize block: references/run-record.md.

Read the full file on GitHub · 336 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago Changed · +84 lines · +34 tokens per session fc9a37695002
  2. 23d ago Changed · +2 lines · -1 tokens per session 4175dda8113e
  3. 25d ago Changed · -61 lines · -1 tokens per session c3982d7a67df
  4. 1mo ago Changed · +22 lines f021b5397560
  5. 1mo ago Changed · +2 lines · +8 tokens per session ccc9907c2aa4
  6. 1mo ago Changed · -60 lines · -21 tokens per session e1864e6330b7
  7. 1mo ago Changed · +6 lines · -93 tokens per session 9012155a4220
  8. 2mo ago First seen · 341 lines · 260 tokens per session scan B 6c6e88f313a0

Subscribe to this mod's changes

post-merge is a skill published in the GitHub repository YoungjaeDev/my-claude-plugins (2 stars, last pushed today), licensed MIT. It adds 186 tokens to every session and 8,690 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.