tp-post-merge

tp-post-merge is a skill for Claude Code from CurtisThe/three-pillars-plugin. It costs 58 tokens per session (5,436 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.

Part of the three-pillars plugin — 37 skills, 20 agents shipped together

Good fit It is for cleaning up the branch and separate working directory belonging…

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 37 skills, 20 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.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.svg" alt="Measured on agentmods" 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 5,436 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.05436
Opus 5 $0.00029 $0.02718
Sonnet 5 $0.00012 $0.01087
Haiku 4.5 $0.00006 $0.00544

Measured 6d ago against content hash 7fb7d041e366, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/sweep_candidates.py, scripts/test_collaboration_phase_enum.py, scripts/test_post_merge_candidate_reap.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 · 207 lines

How it starts

The opening of the file, as written. The whole thing — 207 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.

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 performs no commit of design artifacts; the step-6 doc-reconcile commit on {base} is the sole, scoped exception — 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 and partition by the result: merged == trueactionable; merged == falsepending (kept for the listing in step 5, never torn down).
  4. Present an interactive checklist of the actionable (verified-merged) designs. On confirmation, run the teardown sequence (step 5 of ## Steps) for each selected design.
  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 · 207 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. 6d 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 (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 58 tokens to every session and 5,436 once invoked, about $0.0003 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

prowler-commit

Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.

prowler-cloud/prowler · 33 tokens

gh-auth-isolation

Safely manage multiple GitHub identities (EMU + personal) in agent workflows.

github/gh-aw · 20 tokens

comet-github

A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.

rpamis/comet · 72 tokens

github-skill

Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.

zeenie-ai/OpenCompany · 51 tokens

codex-autoresearch

Run autonomous, measurable experiments in a Git repository: change one hypothesis, verify a numeric metric, keep improvements, and revert failures. Use when the user wants Codex to keep iterating toward a numeric target in the foreground or as a detached background run. Do not use for ordinary one-shot coding…

leo-lilinxiao/codex-autoresearch · 80 tokens

changelog-composer

Generates structured changelogs and release notes from git history and PRs, classifying breaking changes, features, fixes, performance, docs. Triggers on: "generate changelog", "write release notes", "what changed since", "prepare release", "release notes for", "diff since tag".

Mathews-Tom/armory · 67 tokens