post-merge

post-merge is a skill for Claude Code from jerseycheese/agent-skills. It costs 70 tokens per session (1,970 once invoked), scanned A, original, MIT.

A post-merge workflow for GitHub projects. After a pull request is merged, it updates the base branch, removes the merged branch and its worktree, and tidies the GitHub issues connected to the change.

In plain words
What is it for?
Use it after merging a pull request to sync the target branch, clean up the merged worktree and branch, update linked issues, and suggest the next action.
Why use it?
It prevents new work from starting with outdated code or leftover branches. It also closes the loop on issues by recording that their requested work is complete.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the workflow-skills plugin — 36 skills shipped together

Good fit Use it after merging a pull request to sync the target branch, clean up the merged worktree and branch, update linked issues, and suggest the next action.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jerseycheese/agent-skills/post-merge
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jerseycheese/agent-skills --skill post-merge
Clone the repo
git clone --depth 1 https://github.com/jerseycheese/agent-skills

Made for: Claude Code.

Or install workflow-skills, the plugin that ships this one along with the rest of its 36 skills.

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/jerseycheese/agent-skills/post-merge/github.svg)](https://agentmods.dev/skills/jerseycheese/agent-skills/post-merge)
Your own site
<a href="https://agentmods.dev/skills/jerseycheese/agent-skills/post-merge"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/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/jerseycheese/agent-skills/post-merge"><img src="https://agentmods.dev/badge/skills/jerseycheese/agent-skills/post-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,970 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00070 $0.01970
Opus 5.5 $0.00028 $0.00788
Sonnet 5.5 $0.00014 $0.00394
Haiku 4.5 $0.00007 $0.00197

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

Security

Grade A, and why

post-merge scanned grade A with 0 findings 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 18d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/post-merge/SKILL.md · 182 lines

How it starts

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

Post-Merge Workflow

Three phases: sync and clean the working tree, tidy up the issues the PR addressed, then recommend what to do next.

Phase 0: Sync and Clean the Working Tree

Do this first. Most post-merge rework comes from the next task starting against a stale base branch or a leftover feature branch/worktree — clean it up now while you have the context.

1. Find the base and head branches

Don't assume main. Read what the PR actually merged into:

gh pr view [NUMBER] --json number,title,baseRefName,headRefName,mergedAt

baseRefName is the branch to sync (often develop or main); headRefName is the merged feature branch to delete.

2. Sync the base branch

git fetch --prune
git checkout [BASE_BRANCH]
git pull --ff-only

If your current checkout is a worktree pinned to the merged feature branch, you can't switch it to the base — leave it and handle the worktree in step 3.

3. Delete the merged branch and its worktree

git worktree list                    # find any worktree holding the feature branch
git worktree remove [WORKTREE_PATH]  # only if it lives in a worktree
git branch -d [HEAD_BRANCH]          # safe delete — refuses if not actually merged

Use lowercase git branch -d; it only deletes branches that are fully merged. Don't reach for -D unless you've confirmed the work really landed. git worktree remove refuses to drop a worktree with uncommitted changes — don't --force past that without checking what's there first. If the project has a prune-merged-branches helper, use it (dry-run, then apply); those scripts typically skip develop/main/release/* and worktree-held branches.

4. Confirm clean state

git status
git branch --show-current

You want to be on the synced base branch, working tree clean, with the feature branch gone. Now move to Phase 1.


Phase 1: Issue Cleanup

Updating and closing the linked issues is the default, automatic outcome of this phase — do it without pausing to ask permission. The only judgment call is whether an issue is fully addressed (check its boxes and close it) or only partially (check boxes, comment, leave open). When the user says "the PRs are merged" with no numbers, first confirm which ones actually merged — a "they're all in" claim is often only partly true — and act only on the ones that did.

Read the full file on GitHub · 182 lines

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. 18d ago Changed · +13 lines b943ac036b47
  2. 1mo ago Changed · -3 lines b53625a7018c
  3. 1mo ago Changed · +3 lines · -70 tokens per session 95d902173d63
  4. 3mo ago First seen · 169 lines · 140 tokens per session scan A 55722aa2ff41

Subscribe to this mod's changes

post-merge is a skill published in the GitHub repository jerseycheese/agent-skills (4 stars, last pushed 5d ago), licensed MIT. It adds 70 tokens to every session and 1,970 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

post-merge compared with skills from other repositories

post-merge next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
post-mergejerseycheese/agent-skillsSkill45d agoMITA70Claude Code
githubAceDataCloud/SkillsSkill17todaynoneA62Claude Code
gitlabAceDataCloud/SkillsSkill17todaynoneA54Claude Code
githubgeezerrrr/motiveSkill1201mo agoMITA44Claude Code, Codex
spec-kitty-git-workflowPriivacy-ai/spec-kittySkill1.7k8d agoMITA125Claude Code, Codex
version-control-strategyOwl-Listener/designer-skillsSkill3.5k11d agoMITA50Claude Code, Codex
spk-admin-git-workflowPriivacy-ai/spec-kittySkill1.7k8d agoMITA32Claude Code, Codex