pi-triage

pi-triage is a skill for Claude Code from sky-valley/pi. It costs 57 tokens per session (5,833 once invoked), scanned A, original, MIT.

A triage skill for deciding whether changes from the upstream pi project should also be added to its Go port. It compares specific upstream commits with the port's scope and produces a reasoned decision.

In plain words
What is it for?
Use it to assess one or more upstream commits or a commit range, determine whether each change should be ported, and define the likely scope.
Why use it?
It prevents teams from porting every upstream change without checking whether it belongs in the Go version. It also makes the reason and expected work clear before implementation.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Codex.

Good fit Use it to assess one or more upstream commits or a commit range, determine whether each change should be ported, and define the likely scope.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sky-valley/pi/pi-triage
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 sky-valley/pi --skill pi-triage
Clone the repo
git clone --depth 1 https://github.com/sky-valley/pi

Made for: Claude Code.

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 pi-triage

README.md
[![agentmods](https://agentmods.dev/badge/skills/sky-valley/pi/pi-triage/github.svg)](https://agentmods.dev/skills/sky-valley/pi/pi-triage)
Your own site
<a href="https://agentmods.dev/skills/sky-valley/pi/pi-triage"><img src="https://agentmods.dev/badge/skills/sky-valley/pi/pi-triage/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 pi-triage

Your own site · 80×15
<a href="https://agentmods.dev/skills/sky-valley/pi/pi-triage"><img src="https://agentmods.dev/badge/skills/sky-valley/pi/pi-triage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,833 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 17
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
How audits are shown
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.00057 $0.05833
Opus 5 $0.00028 $0.02916
Sonnet 5 $0.00011 $0.01167
Haiku 4.5 $0.00006 $0.00583

Measured 4d ago against content hash 35d1c1a24cdf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pi-triage 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 4d ago.

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.

.claude/skills/pi-triage/SKILL.md · 311 lines

How it starts

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

pi-triage — port-or-not verdict for upstream changes

Input: one or more upstream main-line shas (or a range A..B). Each unit is a first-parent change: a merged PR is ONE unit, analyzed via git diff <sha>^1..<sha>.

Setup

  • Upstream clone: $PI_UPSTREAM_DIR if set, else ~/.cache/pi-upstream. If missing: git clone https://github.com/earendil-works/pi "$dir". Always git fetch origin main first, then git -C "$dir" checkout -B main origin/main to keep the checkout from drifting (it is a read-only mirror; the harness extracts by git archive <sha>, so this is safe).
  • Never judge from the working tree — name a sha. git show <sha>:<path>, git diff <sha>^1..<sha>, git grep <pattern> <sha> -- <path>. A stale checkout can show the exact opposite of what the pin holds (2026-08-11: the tree was ~2 months behind and read as though a ported change had been reverted), and a fresh one is at origin/main, which is ahead of the pin.
  • The authoritative scope boundary is docs/UPSTREAM.md -> "The scope boundary" — the exclusion tests E1 and E3, rewritten 2026-08-27. Read it before judging anything. It replaced an exclusion path-list; the tests beat every list, including the tables in this file. Also read "Scope queue" (what is IN scope but has no Go base yet) and the "Current pin" table.

Per change, produce:

  1. WHY — intent, from the commit/PR message (git log -1 --format=%B) and any linked issue number in it.
  2. WHAT — read the actual diff (git diff <sha>^1..<sha> --stat then the hunks for non-trivial files). Note behavior, constants, model-visible strings, new/changed tests.
  3. SCOPE — verdict, one of:
    • port — touches behavior we ported.

      Scope is decided by the EXCLUSION TESTS (E1 and E3) in docs/UPSTREAM.md -> "The scope boundary" (rewritten 2026-08-27). Read them; they are authoritative over this table. A hunk is n/a iff one fires; otherwise it is IN. The table below is a derived convenience — if it and a test disagree, the test wins, you port accordingly, and you fix the table in the same commit.

Read the full file on GitHub · 311 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. 4d ago Changed · +12 lines 35d1c1a24cdf
  2. 9d ago First seen · 299 lines · 57 tokens per session scan A 53eac6478c66

Subscribe to this mod's changes

pi-triage is a skill published in the GitHub repository sky-valley/pi (48 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 5,833 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

write-terva-skill

Author a new terva skill, a reusable SKILL.md instruction set that terva loads on demand. Install it where terva discovers it, in the project .terva/skills/ or the global $TERVAHOME/skills/. Use for create/add/write-a-skill requests, not extensions.

terva-sh/terva · 71 tokens

write-terva-locale

Translate the terva interface into another language, complete or fix a locale, or wrap new strings for translation. Use when the user asks to localize terva or to add or finish a language (fi, pt-BR, ...). Also use to edit translated text or to contribute a translation upstream.

terva-sh/terva · 68 tokens

write-terva-lore

Author terva lore. Lore is context that a person authors in files. terva injects it only when it is keyword-relevant, or always-on. Use to create/add/write lore, "world info", a lorebook entry, keyed background, or a book of facts for a character.

terva-sh/terva · 66 tokens

grilling

Interview the user before you build, so the open decisions are theirs and not yours. Use when the user says to grill them, or asks you to interview them first.

terva-sh/terva · 37 tokens

handoff

Compact the current session into a handoff document. A fresh session or another agent can pick it up with no need to re-derive context. Use when asked to hand off, hand over, wrap up for another session or agent, or park work mid-stream.

terva-sh/terva · 56 tokens

house-style

Apply before you write or edit prose, such as a README.md, documentation, a comment, or a commit message. It covers release notes and skill or persona bodies too. Also use when the user asks you to clean up prose, or to cut machine tells.

terva-sh/terva · 57 tokens