extending-pi

extending-pi is a skill for Claude Code, Codex from tmustier/pi-extensions. It costs 70 tokens per session (1,775 once invoked), scanned C, original, MIT.

A guide for extending Pi, a coding-agent environment, by choosing among its supported extension types. These include skills, prompt templates, themes, packages, model providers, settings, and TypeScript extensions.

In plain words
What is it for?
Use it when teaching Pi a workflow, adding prompts or themes, configuring models and resources, or adding typed tools, commands, keybindings, interface changes, and event hooks.
Why use it?
It helps identify the right place to add behavior before changing the agent's internals. The exact programming interfaces are taken from Pi's documentation and installed type definitions.

Skill for Claude CodeCodex

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/tmustier/pi-extensions/extending-pi
Any agent
npx skills add tmustier/pi-extensions --skill extending-pi
Clone the repo
git clone --depth 1 https://github.com/tmustier/pi-extensions

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmustier/pi-extensions/extending-pi.svg)](https://agentmods.dev/skills/tmustier/pi-extensions/extending-pi)
Your own site
<a href="https://agentmods.dev/skills/tmustier/pi-extensions/extending-pi"><img src="https://agentmods.dev/badge/skills/tmustier/pi-extensions/extending-pi.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,775 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00070 $0.01775
Opus 5 $0.00035 $0.00888
Sonnet 5 $0.00014 $0.00355
Haiku 4.5 $0.00007 $0.00178

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

Security

Grade C, and why

extending-pi scanned grade C 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 2 executable files (skill-creator/scripts/validate_skill.py, skill-creator/tests/test_validate_skill.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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- "Pi should confirm before `rm -rf`" → **Extension** (intercept tool calls)
extending-pi/SKILL.md · 89 lines

How it starts

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

Extending Pi

Help the user choose what to build, scaffold the right artifact, and package it when useful.

This skill is intentionally not an API reference. Pi's docs, examples, and installed TypeScript types are the source of truth for exact signatures and current behavior.

Core principle: choose a public extension point first, patch last

Pi has multiple public extension points: Agent Skills, context files, prompt templates, themes, packages, model configuration, provider extensions, settings, and TypeScript extensions. Assume one of those is the right answer until proven otherwise; do not jump straight to a TypeScript extension or Pi internal patch.

What to build

Goal Build a… Key files / locations Detailed source of truth
Teach an agent a workflow, domain, or how to use a tool/API/CLI Agent Skill SKILL.md plus optional scripts/, references/, assets/ in .agents/skills/, .pi/skills/, or a package Read skill-creator/SKILL.md and Pi docs docs/skills.md
Change Pi runtime behavior, add a typed tool, command, keybinding, event hook, UI, resource loader, provider, renderer, safety gate, or session behavior Extension TypeScript extension file in .pi/extensions/, ~/.pi/agent/extensions/, or a Pi package Read Pi docs docs/extensions.md fully plus relevant examples/extensions/ code first
Reuse a prompt pattern with variables Prompt template Markdown file in .pi/prompts/, ~/.pi/agent/prompts/, or a package Read docs/prompt-templates.md
Set project-wide or user-wide instructions Context file AGENTS.md, CLAUDE.md, SYSTEM.md, or APPEND_SYSTEM.md as appropriate Read the README Context Files / System Prompt sections
Change Pi's appearance Theme JSON theme in .pi/themes/, ~/.pi/agent/themes/, or a package Read docs/themes.md
Add or route models/providers models.json or a provider extension ~/.pi/agent/models.json for supported APIs; extension for OAuth, dynamic discovery, or custom streaming Read docs/models.md and docs/custom-provider.md
Share any of the above Pi package package.json with a pi key or conventional extensions/, skills/, prompts/, themes/ directories Read docs/packages.md

Read the full file on GitHub · 89 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 · 89 lines · 70 tokens per session scan C 8d9dd092d07a

Subscribe to this mod's changes

extending-pi is a skill published in the GitHub repository tmustier/pi-extensions (474 stars, last pushed 22d ago), licensed MIT. It adds 70 tokens to every session and 1,775 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

codebase-memory

Use the codebase knowledge graph for structural code queries. Triggers on: explore the codebase, understand the architecture, what functions exist, show me the structure, who calls this function, what does X call, trace the call chain, find callers of, show dependencies, impact analysis, dead code, unused functions…

narumiruna/pi-extensions · 98 tokens

using-pi-subagents

Operate pi-subagents jobs safely, including direct-work decisions, least-privilege tool selection, thinking-level selection, delegation, bidirectional messaging, parallel starts, timeout selection, waiting, cancellation, result handling, verification, and writer isolation.

narumiruna/pi-extensions · 54 tokens

configuring-pi-starship

Configure @narumitw/pi-starship and answer questions about its pi-starship.toml settings. Use when the user asks to create, edit, repair, migrate, or understand pi-starship.toml, or asks which pi-starship module, variable, option, style, palette, preset, or runtime behavior to use. Do not use for generic TOML, shell…

narumiruna/pi-extensions · 98 tokens

surf

Control Chrome browser via CLI for testing, automation, and debugging. Use when the user needs browser automation, screenshots, form filling, page inspection, network/CPU emulation, DevTools streaming, or AI queries via ChatGPT/Gemini/Perplexity/Grok/AI Studio.

w-winter/dot314 · 60 tokens

prose-review

Review prose written for others (e.g., user-facing documentation, prompts for other LLMs, reports, plans, inline comments, docstrings) for local jargon leakage, orphaned references, missing grounding, and audience or genre mismatch. Always run on prose you produce or materially edit, except for routine conversational…

w-winter/dot314 · 84 tokens

text-search

Search indexed text corpora with qmd. For indexed content, prefer qmd over grep.

w-winter/dot314 · 22 tokens