pi-primitive-check

pi-primitive-check is a skill for Claude Code, Codex from spences10/my-pi. It costs 33 tokens per session (421 once invoked), scanned A, original, MIT.

A review step for checking whether a proposed Pi coding-agent customization matches features Pi already provides. Pi is the coding-agent system being customized.

In plain words
What is it for?
Use it before implementing speculative Pi changes to search local documentation and classify the proposal as reuse, wrapping, composition, or new development.
Why use it?
It helps avoid building duplicate commands, extensions, tools, or workflows when an existing Pi feature already solves the need.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it before implementing speculative Pi changes to search local documentation and classify the proposal as reuse, wrapping, composition, or new development.

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

Made for: Claude Code, Codex.

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-primitive-check

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/spences10/my-pi/pi-primitive-check"><img src="https://agentmods.dev/badge/skills/spences10/my-pi/pi-primitive-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 421 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 pass 7 Sept 2026
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.00033 $0.00421
Opus 5 $0.00016 $0.00211
Sonnet 5 $0.00007 $0.00084
Haiku 4.5 $0.00003 $0.00042

Measured 10d ago against content hash 1771b28762cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pi-primitive-check 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 10d 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.

.agents/pi-primitive-check/SKILL.md · 66 lines

What it actually says

Pi Primitive Check

Use this before implementing speculative Pi customisation ideas. The goal is to avoid building a parallel abstraction when Pi already has a primitive.

Workflow

  1. Restate the underlying user need, separate from the proposed solution.
  2. Search local Pi docs for overlapping primitives, especially commands, session features, SDK APIs, extension events, tools, skills, and TUI APIs.
  3. Search this repo for existing built-ins and packages/pi-* that already address the need.
  4. Classify the proposal:
    • use existing Pi primitive
    • document or wrap existing primitive
    • compose existing primitives
    • implement new feature
  5. If overlap exists, pause and ask the user to confirm before coding.

Required local sources

Resolve the installed package from the repository root instead of hard-coding pnpm's versioned store path:

UPSTREAM_PI_ROOT="$(realpath node_modules/@earendil-works/pi-coding-agent)"

Read relevant files under $UPSTREAM_PI_ROOT before deciding:

  • README.md for package-level behavior
  • docs/ for documented primitives and APIs
  • examples/ for supported implementation patterns

If the dependency is not installed, run the repository's normal install workflow rather than substituting stale online documentation. Prefer targeted rg over broad reading, then read the relevant docs fully enough to verify behavior.

Output format

Primitive check:

- User need:
- Existing Pi primitives:
- Existing Pi customisation pieces:
- Overlap/risk:
- Recommendation:
- Confirm before build:

Keep the recommendation direct. If the answer is “do not build this”, say so.

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. 10d ago First seen · 66 lines · 33 tokens per session scan A 1771b28762cf

Subscribe to this mod's changes

pi-primitive-check is a skill published in the GitHub repository spences10/my-pi (123 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 421 once invoked, about $0.0002 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

pi

Use when needing a minimal, extensible terminal AI coding agent harness in TypeScript with plugin architecture. Pi: minimalist terminal AI coding agent emphasizing simplicity and composability.

znlgis/opengis-skills · 35 tokens

system-prompts

Write system prompts, tool docs, and agent definitions. Project tag conventions + RFC 2119 keywords + dense compression. Use when authoring or editing any prompt the model reads.

can1357/oh-my-pi · 40 tokens

tool-prompt-optimization

Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…

can1357/oh-my-pi · 0 tokens

semantic-compression

Re-encode verbose prose into a dense telegraphic register — punctuation as connectives, label frames, verbless assertions — without losing normativity or precision. Use when compressing system prompts, tool/function descriptions, skill bodies, or agent instructions; reducing token count or context bloat; making…

can1357/oh-my-pi · 77 tokens

optimization

Use when improving performance, latency, throughput, memory usage, or general efficiency. Start by defining target metrics, measuring comprehensively, attributing bottlenecks, validating with static analysis, and prioritizing macro-optimizations before micro-optimizations.

1jehuang/jcode · 52 tokens

tmux-manual-qa

Run a single manual tmux-based QA scenario for the todo continuation feature against the real CLI (./pi-test.sh) in an interactive TUI. Captures scrollback, asserts deterministic pass/fail count markers, and cleans up test fixtures. Use only for the manual-qa milestone features.

code-yeongyu/senpi · 66 tokens