tp-post-merge

tp-post-merge is a skill for Claude Code from CurtisThe/three-pillars-plugin. It costs 58 tokens per session (7,873 once invoked), scanned A, original, Apache-2.0.

A cleanup step that runs after a design's pull request—a proposed code change—has been merged.

In plain words
What is it for?
It is for cleaning up the branch and separate working directory belonging to a finished design.
Why use it?
It removes completed design branches, worktrees, and tracking entries only after confirming the change was merged.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents.

Part of the three-pillars plugin — 40 skills, 58 agents shipped together

Good fit It is for cleaning up the branch and separate working directory belonging to a finished design.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/curtisthe/three-pillars-plugin/tp-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 CurtisThe/three-pillars-plugin --skill tp-post-merge
Clone the repo
git clone --depth 1 https://github.com/CurtisThe/three-pillars-plugin

Made for: Claude Code.

Or install three-pillars, the plugin that ships this one along with the rest of its 40 skills, 58 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 tp-post-merge

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-post-merge"><img src="https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-post-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,873 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.00058 $0.07873
Opus 5.5 $0.00023 $0.03149
Sonnet 5.5 $0.00012 $0.01575
Haiku 4.5 $0.00006 $0.00787

Measured 1mo ago against content hash 0babb986891e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tp-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 1mo ago.

The scan reads SKILL.md. This mod also ships 20 executable files (scripts/bypass_check.py, scripts/sweep_candidates.py, scripts/teardown.py, …), 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.

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/tp-post-merge/SKILL.md · 238 lines

How it starts

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

Post-Merge Cleanup

Verify a design's completion PR is merged, then tear down its branch, sibling worktree, and MRU state. This skill is the sole merge-verified lifecycle teardown path — within the design lifecycle, it is the one place that deletes the design branch and removes its worktree after verifying the merge. (Other tooling can remove a git worktree as a general, unverified operation; that is out of scope here. The point is the merge-verified lifecycle teardown, which only /tp-post-merge performs.)

/tp-design-complete stops at PR-open; /tp-post-merge picks up after the human merge. /tp-merge-from-main auto-chains this skill via step 8 after a successful completion-PR merge.

Arguments:

  • {design-name} (optional) — must match [a-z0-9-]+ per skills/_shared/validate-name.md. If absent, runs the no-arg scan form (see below).
  • --auto (optional) — autonomous mode; see ## Auto Mode section.
  • --cheap-tier[=ab] | --no-cheap-tier (optional, deprecated) — both change nothing: the step-5 runbook site (skills/_shared/cheap-dispatch.md) may run teardown steps c, d, e and h as code in every invocation. <mode> is the stdout of python3 "$TP_ROOT"/skills/_shared/cheap_tier_default.py --root <resolved seat> [--cheap-tier[=ab]|--no-cheap-tier], always on (a set cheap_tier.default_run_flag is deprecated too; each deprecated input prints one deprecated: line, and a dropped config prints its one-line warning). <mode> is on; /tp-merge-from-main step 8 forwards bare --cheap-tier.

This skill takes no --force-takeover flag: it is lock-aware, not lock-enforcing (see step 2). Teardown deletes the branch, so "claiming" a lock about to be deleted is incoherent — the merge-verify gate (step 4), not the advisory lock, is the safety boundary.

No-arg scan form

When invoked without {design-name}, /tp-post-merge scans for designs awaiting teardown:

  1. Walk three-pillars-docs/completed-tp-designs/*/lock.json for entries where phase == "cleanup-pending". (/tp-design-complete git mvs the design directory — lock.json included — into completed-tp-designs/ before it sets phase = "cleanup-pending", so the pending-teardown locks live under the completed tree, not tp-designs/.)
  2. Skip already-torn-down designs: for each candidate, run git ls-remote --heads origin tp/{name} and check both its exit status and output. Only when the command succeeds (exit 0) and returns empty output is the branch confirmed absent (teardown already ran) — drop it from the list. If the command fails (offline, auth error, network) its stdout is also empty, but that is not proof of absence — do not drop on a non-zero exit; keep the design and let the step-4 merge gate decide (fail-safe: a transient ls-remote error must never silently drop an actionable design). This guard is load-bearing: phase == "cleanup-pending" is not cleared after teardown (this skill makes no commit — see ## Auto Mode), so a confirmed-absent branch is the durable "done" signal. Without it every completed design would re-surface in the scan forever.
  3. For each remaining design, run verify_merged.py with the resolved default branch and partition by the result: merged == true ⇒ actionable; merged == false ⇒ pending (kept for the listing in step 5, never torn down).
    python3 "$TP_ROOT"/skills/tp-post-merge/scripts/verify_merged.py \
      --repo . --design {name} --base "$(python3 $TP_ROOT/skills/_shared/default_branch.py)" --json
    
  4. Present an interactive checklist of the actionable (verified-merged) designs. On confirmation, run steps 4b and 5 of ## Steps for each selected design (a 4b exit 1 keeps that design's worktree, reports it partial and makes the invocation exit 1). The checklist carries a line seat-allow: post-merge-teardown of its own.
  5. List the pending (unverified) designs separately as "pending merge — not actionable" — they are never torn down without explicit verification.

Read the full file on GitHub · 238 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. 1mo ago Changed · +10 lines 0babb986891e
  2. 1mo ago Changed · +21 lines fe9ffc8dcd88
  3. 3mo ago First seen · 207 lines · 58 tokens per session scan A 7fb7d041e366

Subscribe to this mod's changes

tp-post-merge is a skill published in the GitHub repository CurtisThe/three-pillars-plugin (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 58 tokens to every session and 7,873 once invoked, about $0.0002 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

tp-post-merge compared with skills from other repositories

tp-post-merge next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tp-post-mergeCurtisThe/three-pillars-pluginSkill51mo agoApache-2.0A58Claude Code
workflow-patternswshobson/agentsSkill43k6d agoMITA35Claude Code
nw-quality-frameworknWave-ai/nWaveSkill63611d agoMITA23Claude Code
nw-finalizenWave-ai/nWaveSkill63611d agoMITA39Claude Code
nw-swarmnWave-ai/nWaveSkill63611d agoMITA43Claude Code
nw-hotspotnWave-ai/nWaveSkill63611d agoMITA20Claude Code
nw-mikadonWave-ai/nWaveSkill63611d agoMITA19Claude Code