tp-merge

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

A final merge gate for landing a reviewed pull request—the GitHub record of a proposed code change—on its base branch.

In plain words
What is it for?
It is for merging an approved pull request after enforcing the project's seven merge conditions.
Why use it?
It prevents the irreversible merge action unless the required checks, current human approval, CI result, and review proof all pass.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

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

Good fit It is for merging an approved pull request after enforcing the project's seven merge conditions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/curtisthe/three-pillars-plugin/tp-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-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-merge

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-merge"><img src="https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,182 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.00107 $0.04182
Opus 5.5 $0.00043 $0.01673
Sonnet 5.5 $0.00021 $0.00836
Haiku 4.5 $0.00011 $0.00418

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

Security

Grade A, and why

tp-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 8 executable files (scripts/land.py, scripts/test_land_accept_line.py, scripts/test_land_dispose_pointer.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-merge/SKILL.md · 225 lines

How it starts

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

tp-merge — the land gate (irreversible gh pr merge)

/tp-merge is the land skill: it crosses the one irreversible boundary in the framework — running gh pr merge to land a reviewed PR onto its base. It is the sole code site where the "the framework never crosses the irreversible boundary without an explicit, current human approval" guarantee is enforced in code.

It does not sync the base into the branch, resolve living-doc conflicts, or rewrite tracked files — that reversible base-into-branch operation is the separate /tp-merge-from-main skill. /tp-merge only gates and lands.

Two distinct skills, one former name. Before the human-approval-merge-gate design (D7), /tp-merge was the base-sync conflict resolver. That half is now /tp-merge-from-main. The /tp-merge name is retained for this land half, because operator and orchestrator references to "/tp-merge" mean land/merge. Keep them distinct: /tp-merge-from-main syncs the base in (reversible, below the gate); /tp-merge lands the PR out (irreversible, behind the gate).

Arguments

  • {pr-url|design-name} (required) — the PR to land. A PR URL is used directly; a design name resolves to its open completion PR.

Prerequisites

  • gh CLI installed and authenticated (the merge runs gh pr merge).
  • The PR has been reviewed and is reviewed-stable (the autonomous loop pauses here — this step is the human's).

The gate (load-bearing)

The land is gated by require_merge_gate_pass(pr_url) from skills/tp-merge-from-main/scripts/merge_gate.py — the fail-closed enforcing form of the deterministic merge gate. It evaluates the gate's predicates over the PR head SHA and raises MergeGateBlocked on any non-PASS verdict, so a caller that ignores the return value still cannot proceed. The gate carries seven head-SHA-keyed predicates, plus an eighth, fragility_clear, that is on by default:

  • threads_resolved — all review threads resolved. When this predicate blocks the refusal, land.py prints a remediation pointer: /tp-pr-iterate {design} --dispose-only (reply-and-resolve out-of-band).
  • mergeable — PR is in MERGEABLE state.
  • checks_success — all required CI checks settled and concluded SUCCESS.
  • copilot_on_head — Copilot has reviewed the current head SHA.
  • human_approved — a current APPROVED human review from a non-automation human is present on the head SHA. Absent / stale (review predates the head) / automation-authored → INDETERMINATE. This is the predicate the autonomous path can never satisfy: the autonomous path cannot produce a non-automation APPROVED review on the head out-of-band. The review's immutable commit_id is the currency check — a real content push leaves the prior review pointing to the old head (non-current → fail-closed).
  • ci_local_stamp — a fresh SHA-keyed local-CI green stamp, required only when the repo declares ci.gate_command; the stamp is produced by running that command through skills/_shared/ci_gate_run.py, which stamps the head on rc 0. No ci.gate_command declared → the predicate is OMITTED (a roster note, not a FAIL) — declare the command to require this stamp. Declared but absent, stale, or dirty → FAIL; run python3 $TP_ROOT/skills/_shared/ci_gate_run.py to satisfy it. (dev-repo only: ci.gate_command is scripts/ci-local.sh.) Opt out explicitly per-repo via review.require_ci_local_stamp: false, even with a declared command.
  • review_proof_on_head — a head-bound, non-degraded proof-of-review digest comment exists on the current head SHA, authored by a trusted automation identity: the framework's own gh login (github.pr_author_account when one is configured) + config review.automation_identities extras, plus, under github.per_developer_author: "self", the PR's own author (the roster then says "self-attested"); NOTHING else — the Copilot/native-bot automation floor is deliberately not digest-trusted (those identities never legitimately post digests, and a prompt-injected Copilot comment must not mint proof), and a drive-by commenter pasting a matching digest does NOT count. The /tp-pr-iterate review arm posts it each round. Absent / stale (head moved) / degraded / untrusted-author → INDETERMINATE; re-run the proof-bearing review on the current head. Opt out per-repo via review.require_review_proof: false.
  • Operator-accept — an operator who cannot post the digest can still fill THAT slot with a prose accept: submit an APPROVED review on the current head whose body has the line tp-accept: <full 40-hex head sha> <reason>. It stands in for review_proof_on_head ONLY — human_approved (the same APPROVED review normally satisfies it) and every other predicate stay required; a bot/automation author or a COMMENTED review never counts. Check one with python3 "$TP_ROOT"/skills/_shared/operator_accept.py check --pr-url <url> --head <sha> (exit 0 found / 1 not). On a Gitea origin the accept is unavailable — exit 2 with operator-accept unavailable on gitea (gitea-forge-adapter); use the review-proof path. When the slot rides an accept, land.py prints merge rides an operator-accept: <detail> before the Merged line, so the merge record names who accepted and why.
  • fragility_clear — the PR adds no fragile test, per skills/_shared/test-fragility.md. Three conditions, each named in the FAIL detail: the fragility lint finds no gating hit on the lines the PR adds; no confirmed fragile item (from the implementation audit or the PR review loop) is open; and the changed tests have a run record for the PR head (changed_tests_runs.py) that passes. A missing or stale record fails, and the detail names the record command. An unverified record (no pytest runner, or a changed test file whose tests all skip, an opt-in tier such as env-gated live tests) passes with a note unless fragility.strict: true, which fails it; a skip that is a missing dependency stays a failure. To clear an open item, waive it by id with a reason, as the operator's own call: python3 "$TP_ROOT"/skills/_shared/fragility_items.py waive --branch tp/{design-name} --id <item-id> --by <your-name> --reason "<why>" (--scope path-class covers every item with the same path and class; an empty --by or --reason is refused). fragility_items.py list --branch tp/{design-name} prints the open ids. Opt out per-repo via fragility.merge_predicate: false; the roster then shows fragility_clear as OMITTED skipped (opt-out), never silently absent.

Read the full file on GitHub · 225 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 · +2 lines 4e82aa4b45d1
  2. 1mo ago Changed · +63 lines · +11 tokens per session dcedff2247a5
  3. 3mo ago First seen · 160 lines · 96 tokens per session scan A c2c8418b942d

Subscribe to this mod's changes

tp-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 107 tokens to every session and 4,182 once invoked, about $0.0004 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-merge compared with skills from other repositories

tp-merge next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tp-mergeCurtisThe/three-pillars-pluginSkill51mo agoApache-2.0A107Claude Code
gitRune-kit/runeSkill96todayMITA60Claude Code
shipping-and-launchloiane/specs-driven-development-spring-angularSkill6624d agoMITA64Claude Code
version-upgradeYuDefine/nuxt-supabase-starterSkill45yesterdayMITA71Claude Code
clade-deliveryYuDefine/nuxt-supabase-starterSkill45yesterdayMITA31Claude Code
releasethedotmack/claude-memSkill121ktodayApache-2.0A13Claude Code
release-notesphuryn/pm-skillsSkill28k23d agoMITA57Claude Code