tp-pr-fix

tp-pr-fix is a skill for Claude Code, Codex from CurtisThe/three-pillars-plugin. It costs 50 tokens per session (3,680 once invoked), scanned A, original, Apache-2.0.

A one-round pull-request worker for applying selected code-review fixes. A pull request is a proposed change on GitHub; this worker accepts only structural issues from approved reviewers and creates at most one fix commit per run.

In plain words
What is it for?
Use it to classify review comments, apply one targeted round of structural fixes, push the resulting commit, and add the specified pull-request label.
Why use it?
It prevents review comments from being handled inconsistently or too broadly. Each run makes one controlled pass, or reports that there are no applicable fixes.

Skill for Claude CodeCodex

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

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.

agentmods
npx agentmods add skills/curtisthe/three-pillars-plugin/tp-pr-fix
Any agent
npx skills add CurtisThe/three-pillars-plugin --skill tp-pr-fix
Clone the repo
git clone --depth 1 https://github.com/CurtisThe/three-pillars-plugin

Made for: Claude Code, Codex.

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-pr-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-pr-fix.svg)](https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-pr-fix)
Your own site
<a href="https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-pr-fix"><img src="https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-pr-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,680 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00050 $0.03680
Opus 5 $0.00025 $0.01840
Sonnet 5 $0.00010 $0.00736
Haiku 4.5 $0.00005 $0.00368

Measured 5d ago against content hash 89ed08710995, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tp-pr-fix scanned grade A with 1 finding 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 5d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/fix_round.py, scripts/label_manager.py, scripts/structured_extract.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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

audit C1 (no `import anthropic` in helpers, no `subprocess.run(["claude", ...])`
skills/tp-pr-fix/SKILL.md · 266 lines

How it starts

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

tp-pr-fix — Single-Round Worker

A round-shaped worker over a single <design> PR. It receives reviewer comments, classifies them (structural / minor / unclear), filters to collaborator-authored structural issues, generates ONE fix commit, pushes, and applies the tp:do-not-merge-yet label. The result is a fix-envelope.v1.json dict the caller can persist or feed into the loop driver.

Two callers:

  1. tp-pr-iterate loop driver — polls the PR, hands a fresh classified[] to tp-pr-fix each iteration until termination.
  2. Standalone, human-invoked/tp-pr-fix my-design --pr-url <url> --iteration N. You ran a review, want to apply one targeted fix round, and stop. The worker makes no assumption about being inside a loop — it produces exactly one commit per invocation (or none, with verdict="no-applicable-fixes") and exits.

Arguments

  • {design} — kebab-case design name, validated per skills/_shared/validate-name.md. Resolves the active branch (tp/{design}) and the design directory under three-pillars-docs/tp-designs/.
  • --pr-url <url> — full https://github.com/<owner>/<repo>/pull/<n> URL. Required. The shipped run-state state.v1.json schema does not carry a pr_url field; the loop driver passes the URL into fix_round.run_round from its own arguments, and standalone callers must supply it on the CLI.
  • --iteration N — the iteration index recorded in the envelope and the commit prefix. Defaults to 1 when invoked standalone; the loop driver passes its current counter.

Prerequisites

  • gh CLI installed and authenticated. The worker uses it for:
    • gh pr view <url> --json labels — label idempotency check.
    • gh pr view <url> --json headRefName — resolve the PR head ref the commit must land on (F1; see ## Run sequence step 6).
    • gh api repos/{owner}/{repo}/issues/{n}/labels and gh label create <label> — label application via REST (delegated to label_manager.ensure_pr_label; the REST endpoint is used instead of gh pr edit --add-label, which fails on a classic-Projects repo with a GraphQL projectCards deprecation error).
    • gh api repos/{owner}/{repo}/collaborators/{user} — identity gate (with a trusted-reviewer-bot short-circuit; see step 6).
    • gh pr diff <url> — diff context for the classifier.
  • A clean enough working tree on the PR head ref to commit and push. The head is resolved from the PR, not assumed to be tp/{design} — an orchestrator PR's head is the worker's candidate branch (candidate/{slug}/single), not the design branch (F1).
  • The repo's .three-pillars/config.json is populated. The only config surface the worker honors today is pdw.comment_url_allowlist — extra netlocs (beyond github.com and the repo origin host) that reviewer comments may reference. The tp:do-not-merge-yet label name and the claude-sonnet-4-6 model are hardcoded; there is no pr_fix config block.

Read the full file on GitHub · 266 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. 5d ago First seen · 266 lines · 50 tokens per session scan A 89ed08710995

Subscribe to this mod's changes

tp-pr-fix is a skill published in the GitHub repository CurtisThe/three-pillars-plugin (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 50 tokens to every session and 3,680 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.