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.
npx agentmods add skills/tmustier/pi-extensions/extending-pinpx skills add tmustier/pi-extensions --skill extending-pigit clone --depth 1 https://github.com/tmustier/pi-extensionsWrote 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.
[](https://agentmods.dev/skills/tmustier/pi-extensions/extending-pi)<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>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.
| Model | Per session | Once 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 |
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.
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) 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 |
What ships with it
12 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.
- CHANGELOG.md 986 B
- package.json 652 B
- README.md 686 B
- skill-creator/.npmignore 11 B
- skill-creator/CHANGELOG.md 1.6 KB
- skill-creator/LICENSE 1.0 KB
- skill-creator/package.json 755 B
- skill-creator/README.md 991 B
- skill-creator/references/PUBLISHING.md 1.1 KB
- skill-creator/scripts/validate_skill.py 7.1 KB runs code
- skill-creator/SKILL.md 4.8 KB
- skill-creator/tests/test_validate_skill.py 2.3 KB runs code
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.
- 5d ago First seen · 89 lines · 70 tokens per session scan C 8d9dd092d07a
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.
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…
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.
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…
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.
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…
text-search
Search indexed text corpora with qmd. For indexed content, prefer qmd over grep.