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

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmustier/pi-extensions/extending-pi
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 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/github.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/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 extending-pi

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.00070 $0.01775
Opus 5.5 $0.00028 $0.00710
Sonnet 5.5 $0.00014 $0.00355
Haiku 4.5 $0.00007 $0.00178

Measured 1mo ago against content hash 8d9dd092d07a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (495 stars, last pushed 3d ago), licensed MIT. It adds 70 tokens to every session and 1,775 once invoked, about $0.0003 per session on Opus 5.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

using-pi-subagents

Operate pi-subagents jobs safely, including direct-work decisions, least-privilege tools and attachments, thinking levels, delegation, bidirectional messaging, parallel starts, timeouts, waiting, cancellation, result handling, verification, and writer isolation.

narumiruna/pi-extensions · 54 tokens

configure-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 · 97 tokens

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

typesafe-ai

Build AI-powered software with TypeSafe and Jev, or use pi-typesafe's typesafequestion tool for typed semantic judgments and probabilities. Use when a feature needs programmable common sense, when an LLM prompt-and-parse step could become a structured decision, or when designing, calling, evaluating, or…

narumiruna/pi-extensions · 98 tokens

configure-pi-sync

Explain @narumitw/pi-sync settings and guide safe setup through its existing manager. Use when the user asks how to configure pi-sync.json, choose Git, WebDAV, R2, or S3 storage, select synced content, understand automatic controls, or recover unsupported settings. This skill provides guidance only, not settings edits…

narumiruna/pi-extensions · 93 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