tp-merge-from-main

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

A base-sync step that brings the latest base branch into a design branch and handles only safe, mechanical conflicts in shared project documents.

In plain words
What is it for?
It is for updating a design branch from the base branch, rerunning tests, and pushing the branch again when everything is green.
Why use it?
It reduces manual conflict work and checks that resolving those documents did not silently drop content, while leaving meaning-based conflicts for a person.

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 updating a design branch from the base branch, rerunning tests, and pushing the branch again when everything is green.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-merge-from-main"><img src="https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-merge-from-main.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,470 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.00085 $0.10470
Opus 5.5 $0.00034 $0.04188
Sonnet 5.5 $0.00017 $0.02094
Haiku 4.5 $0.00009 $0.01047

Measured 1mo ago against content hash 5ac0813f59ee, 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-from-main 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 60 executable files (scripts/archive_moves.py, scripts/cert_comment.py, scripts/classify.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-from-main/SKILL.md · 185 lines

How it starts

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

tp-merge-from-main — worktree-aware base-sync + living-doc conflict resolution

When parallel designs run in their own worktrees, the base branch moves under them and a merge conflict on the shared living docs (known_issues.md, product_roadmap.md, architecture.md, vision.md) is the expected case at /tp-design-complete time. Manual resolution is slow and — as the parent spike proved on real PR-#28 history — a silent content-drop risk: a careful human merge dropped a known-issue entry outright.

/tp-merge-from-main merges the base into the design's worktree branch and auto-resolves only the provably-mechanical living-doc conflict classes behind an independent zero-drop verifier. Everything semantic is left as conflict markers for the human. It is the conflict-handling step the merge-back flow never had; it composes with /tp-pr-iterate for the post-merge re-review loop.

Base-sync, not land. /tp-merge-from-main is the reversible base-into-branch operation (it merges {base} into the design branch and re-pushes the branch). It is not the irreversible gh pr merge that lands the PR to {default} — that is the separate /tp-merge land skill, which enforces the deterministic merge gate (including the human-approval predicate) before crossing the boundary. Keep them distinct: this skill syncs the base in; /tp-merge lands the PR out.

The boundary (from the worktree-merge-conflict-flow spike, verdict GO; log classes un-gated by basesync-prepend-log):

  • AUTO-SAFE (auto-resolved + verified): design-inventory-row-merge, log-entry-insertion (dated entries and plain-date bullets - YYYY-MM-DD — …), append-only-log, decision-entry-insertion, plus the newer classes keyed-heading-insertion, keyed-row-insertion (slug-keyed table rows both sides append over an empty base), shaped-line-merge (ID- or slug-keyed rows and single-line log bullets over a non-empty base, never prose; plain-date log bullets — a base bullet a side removed is dropped only when the file-level move proof shows it moved into that side's archive), the design-dir decisions.md tail union, last-updated-preamble (each side exactly one dated *Last updated: YYYY-MM-DD …* line and nothing else), low-count-line (the N Low issues → count line in known_issues.md: ours + theirs − base, checked against the merged Low parts) and regenerate, plus hard-cap-rollover (a live doc the merge pushed past its hard cap is rolled by skills/_shared/doc_rollover.py and re-verified together with its archive, else deferred). A sync resolved through regenerate (a declared generated file such as plugin.json) still re-requests review: that file is outside the approval-carry allowlist (base_sync_cert._cond3_allowlist admits only the living-doc set), so the approval does not carry.
  • GATED (classified, always deferred — classify.GATED): id-renumber-collision, withheld since round 20 because its renumber sees only the one conflicted file (not the IDs other living docs cite or have already spent) and it renumbers the base branch's already-landed entry.
  • ALWAYS-HUMAN (deferred): preamble (any preamble hunk that is not one such dated *Last updated:* line per side — those are AUTO-SAFE above), current-focus-reprioritization, generic-prose.

The resolver rule (skills/tp-merge-from-main/scripts/resolve_totality.py). A mechanical resolver never discards a line it does not understand — it preserves every input line, or it defers. Stated over LINES, not atoms: the verifier can only see a lost line if that line parses as an atom, so an atom-level rule would leave ordinary prose free to vanish under a RESOLVED verdict — a silent content loss on the one lane that certifies byte-safety without a human. Three consequences at the boundary above: a hunk mixing an AUTO-SAFE shape with foreign content is not that class (every AUTO-SAFE class carries a purity predicate: the two insertion classes each require every side to START at an entry of the class and open no foreign section — a heading in any form, indented ATX and setext included, is foreign — append-only-log holds two differing tails to the log-insertion predicate, those three need the first line after the region to start an entry or be EOF whenever they emit both sides' lines, and those three hold every line of each inserted block (of each differing append-only-log tail that is not whitespace only) to an allowlist (scripts/line_shapes.py): the class's entry start, or a line that — read past its leading whitespace and list markers — is not heading-shaped at any step of that reading (an ATX #–###### or a bare --- / === underline, at any indentation, since a heading nested in a list item sits four or more columns in; an underline shape directly below a blank line of the same side is admitted, since no paragraph is open there for it to underline, and one on a side's first line is refused), does not begin with < (HTML block), three or more ` or ~ (code fence), > (block quote) or $$ (math block) and is not a link or footnote definition (]:), with a carriage return allowed only as a line's last character — it refuses by first token, not by parsing, so a balanced fence, a one-line <!-- … --> comment or a > reply inside an inserted entry defers the file although it cannot swallow anything (27 of the repository's 1814 decision entries, 1.5%, carry such a line); its heading and block-opener tests read only a line's START (past indentation and list markers), so an unclosed inline raw HTML element later in a line (… wrap long evidence in <details> blocks, an unclosed <s>, <b> or <a href>) is admitted: an accepted residual that can visually wrap the other side's following entry on GitHub's renderer, left unrefused because mid-line <placeholder> text is common; and the inventory arm admits table lines only, and only as rows of ONE table: no blank or whitespace-only line, no line of pipes only and no carriage return inside a line on either side, no header or | --- | except one identical frame both sides open with, and no row appended directly above a delimiter row or above a line with a carriage return inside it — so a keep-both merge never moves a line from one side's entry to the other's, nor puts one side's entry inside an HTML block, code fence or heading section the other side opened, nor moves a row into another table or out of its table); a hunk whose sides contain a conflict marker is not well-formed input for any class and defers; and any mechanical result that does not account for its own input lines is discarded in favour of a deferral, whatever the resolver believed. The lane is therefore narrower than the class list alone implies — a mixed hunk costs a human resolve rather than silently losing a line.

Read the full file on GitHub · 185 lines

Files

What ships with it

60 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. 1mo ago Changed 5ac0813f59ee
  2. 1mo ago Changed · +3 lines 6c6799a5c1be
  3. 1mo ago Changed · +31 lines f56476ca5989
  4. 2mo ago Changed · +11 lines 548258cda220
  5. 3mo ago First seen · 140 lines · 85 tokens per session scan A 47cd39c57411

Subscribe to this mod's changes

tp-merge-from-main is a skill published in the GitHub repository CurtisThe/three-pillars-plugin (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 85 tokens to every session and 10,470 once invoked, about $0.0003 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-from-main compared with skills from other repositories

tp-merge-from-main next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tp-merge-from-mainCurtisThe/three-pillars-pluginSkill51mo agoApache-2.0A85Claude 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