tp-merge

tp-merge is a skill for Claude Code from CurtisThe/three-pillars-plugin. It costs 96 tokens per session (2,741 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 — 37 skills, 20 agents shipped together

Good fit It is for merging an approved pull request after enforcing the project's…

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 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-merge

README.md
[![agentmods](https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-merge.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,741 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.00096 $0.02741
Opus 5 $0.00048 $0.01371
Sonnet 5 $0.00019 $0.00548
Haiku 4.5 $0.00010 $0.00274

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

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/land.py, scripts/test_land_dispose_pointer.py, scripts/test_land_repo.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 · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 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 now carries seven head-SHA-keyed predicates:

  • 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 (written by scripts/ci-local.sh after all checks pass). Absent, stale, or dirty → FAIL; run scripts/ci-local.sh to satisfy this predicate. scripts/ci-local.sh is a dev-repo file the plugin never installs — a consumer repo has no documented way to produce this stamp. Opt out per-repo via review.require_ci_local_stamp: false.
  • 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 + config review.automation_identities extras, and 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.

Read the full file on GitHub · 160 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d 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 (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 96 tokens to every session and 2,741 once invoked, about $0.0005 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.