post-merge

post-merge is a skill for Claude Code from jerseycheese/agent-skills. It costs 140 tokens per session (1,914 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 — 31 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 31 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 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,914 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.00140 $0.01914
Opus 5 $0.00070 $0.00957
Sonnet 5 $0.00028 $0.00383
Haiku 4.5 $0.00014 $0.00191

Measured 10d ago against content hash 55722aa2ff41, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 10d 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 · 169 lines

How it starts

The opening of the file, as written. The whole thing — 169 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 · 169 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. 10d 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 (1 stars, last pushed 8d ago), licensed MIT. It adds 140 tokens to every session and 1,914 once invoked, about $0.0007 per session on Opus 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

Other skills, from other repositories

lov-gh-access

Open a private GitHub repo to external clients or contractors without making it public. Accepts a mixed list of GitHub usernames and/or email addresses, resolves each to a GitHub account (falling back to an email invitation when the user has no discoverable account yet), and invites them as collaborators with a chosen…

lovstudio/skills · 151 tokens

lov-gh-tidy

Interactive GitHub repo hygiene skill. Lists all open issues, PRs, stale branches, and orphan labels, shows a summary of each with analysis, then asks the user how to handle each item (close, merge, comment, delete, keep). Executes all chosen actions via gh CLI. Use when the user says "清理 GitHub", "tidy repo", "clean…

lovstudio/skills · 95 tokens

fest-execution

Execute active festival tasks. Use when finding the next task, marking tasks completed/blocked/reset, committing with festival traceability, advancing workflow steps, and validating sequence progress.

Obedience-Corp/festival · 38 tokens

campaign-commit

Choose the correct commit command in a camp, also called a campaign. Use when you are about to commit and need to select camp commit, camp p commit, fest commit, or intentional root pointer sync via camp refs-sync.

Obedience-Corp/festival · 53 tokens

camp-projects

Manage a camp's projects. Use when committing inside projects/, deciding status/pull/push scope (root vs submodule vs all), or creating/removing project worktrees.

Obedience-Corp/festival · 41 tokens

intuitive-squash

Squash local GSD or agent-generated commit history into a clean, reviewable story while preserving important fixes. Use when the user asks to squash commits, clean git history, compress phase commits, prepare a branch before PR, compare aggressive vs moderate squash options, or preserve hotfix/security commits during…

MiaoDX/intuitive-flow · 73 tokens