tp-pr-iterate

tp-pr-iterate is a skill for Claude Code from CurtisThe/three-pillars-plugin. It costs 85 tokens per session (8,159 once invoked), scanned A, original, Apache-2.0.

An automated loop that watches an open pull request for review comments, fixes eligible issues, and checks whether all actionable threads are resolved.

In plain words
What is it for?
It is for polling review sources, classifying feedback, dispatching fixes, replying to threads, and stopping when the review is verified stable.
Why use it?
It keeps review rounds moving and avoids declaring a pull request ready while comments or required fixes remain.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents.

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-iterate
Any agent
npx skills add CurtisThe/three-pillars-plugin --skill tp-pr-iterate
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-pr-iterate

README.md
[![agentmods](https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-pr-iterate.svg)](https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-pr-iterate)
Your own site
<a href="https://agentmods.dev/skills/curtisthe/three-pillars-plugin/tp-pr-iterate"><img src="https://agentmods.dev/badge/skills/curtisthe/three-pillars-plugin/tp-pr-iterate.svg" alt="Measured on agentmods" 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 8,159 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.1 $0.00085 $0.08159
Opus 5 $0.00043 $0.04079
Sonnet 5 $0.00017 $0.01632
Haiku 4.5 $0.00009 $0.00816

Measured 5d ago against content hash 46edfe54c8fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tp-pr-iterate 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 31 executable files (eval/run_eval.py, scripts/classifier_judge.py, scripts/converge_cli.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.

- **No `subprocess.run(["claude", ...])` in helpers.** Same rule, same
skills/tp-pr-iterate/SKILL.md · 500 lines

How it starts

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

tp-pr-iterate — PR-Iteration Loop Driver

A long-running loop over a single open PR. Each iteration polls for new review comments, classifies them, defers conflicts to a human, calls tp-pr-fix.run_round for the structural subset, and re-enters the wait. Terminates on:

  • Two-stable (the one success terminal) — in a single round both review sources are quiet (/code-review returns [] AND no new structural Copilot verdicts) AND every actionable thread has been replied-and-resolved, verified against GitHub: a fresh list_review_threads(pr_url) shows zero unresolved Copilot / code-review threads. Only then is the PR human-ready. A classifier-flip (no structural verdicts this round) is a necessary precondition, never sufficient on its own — flipping on a stale snapshot while threads sit unresolved is the exact failure that makes a PR look "stable" when it isn't.
  • Idle timeout (yield to human) — no new comments for 30 minutes AND the prior round was not structural-present. This is a time-based yield, not a verified-stable claim: _poll_step does NOT run the ground-truth zero-unresolved re-fetch (only two-stable does), so the terminal carries the [idle-timeout] transition note and leaves termination_reason unset — consumers must treat only termination_reason="two-stable" as reviewed-stable.
  • Mid-loop human push (yield to human) — a non-[tp-pr-fix iter- commit appeared on the branch since last_loop_sha.
  • Caps — iteration count exceeded (max_iterations, default 8) or wall-clock budget exhausted (max_wall_clock, default 4h).
  • Convergence failure — cumulative diff has grown past 3× the loop-open baseline, OR three consecutive rounds returned structural-present.
  • All-conflicting deferral — every comment in a round had an overlapping line_range with another, so the loop couldn't proceed.

Arguments

  • {design} — kebab-case design name, validated per skills/_shared/validate-name.md. Resolves the worktree on branch tp/{design} and the design directory.
  • --max-iterations N — round cap (default 8). Triggers cap-exhausted.
  • --max-wall-clock <duration> — total budget (default 4h). Triggers cap-exhausted.
  • --dry-run — fetch + classify + log what the loop would do, but do NOT invoke tp-pr-fix.run_round. Use this to verify classifier output on a real PR before letting the loop write commits.
  • --dispose-only — calls thread_dispose.dispose_threads once and exits; no iteration, no fix dispatch, no backoff/poll loop. Use this to reply-and-resolve all open review threads out-of-band (e.g. after a manual head-SHA bump or when threads arrive outside a loop run). This is a flag, NOT a new skill. See the --dispose-only mode section below.

Read the full file on GitHub · 500 lines

Files

What ships with it

36 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. 5d ago First seen · 500 lines · 85 tokens per session scan A 46edfe54c8fb

Subscribe to this mod's changes

tp-pr-iterate is a skill published in the GitHub repository CurtisThe/three-pillars-plugin (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 85 tokens to every session and 8,159 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens