pi-extension-authoring
Authoring Pi TypeScript extensions — ExtensionAPI, custom tools, commands, UI hooks, resources_discover, `registerProvider()`, and how extendResources merges skill paths after base reload. Use when the user builds or debugs pi extensions, registers tools, adds /commands, hooks events, integrates TUI components, or ships extension examples. Use for "how do I extend pi", "extension API", "registerTool", "registerProvider", even if pi-mono is not mentioned.
How do I install this agent skill?
npx skills add https://github.com/romiluz13/pi-agent-skills --skill pi-extension-authoringIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides instructional guidance and grounding for authoring TypeScript extensions for the Pi platform. It references local files and a public GitHub repository for documentation. No malicious patterns, obfuscation, or dangerous execution commands were detected.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
Pi extension authoring
Ground every answer in pi-mono/ files below.
Grounding
pi-mono/packages/coding-agent/docs/extensions.md— capabilities, lifecycle, patterns.pi-mono/packages/coding-agent/examples/extensions/README.md— runnable examples index.pi-mono/packages/coding-agent/src/core/resource-loader.ts—extendResources()appends paths viamergePathsafter existinglastSkillPaths(late paths lose name collisions to earlier ones unless names differ).pi-mono/packages/coding-agent/src/core/agent-session.ts— extension commands vs queued prompts; skill expansion hooks.pi-mono/packages/coding-agent/docs/tui.md— extension TUI component integration with@mariozechner/pi-tui:Componentrendering contract, overlay patterns, input handling in extension context.pi-mono/packages/coding-agent/docs/custom-provider.md—registerProvider()for proxies, OAuth/SSO, custom APIs, and custom model definitions.
Invariants
- Extensions can register tools, commands, themes, prompts, and extra skill paths; exact API surface is defined in docs and example modules — start from
docs/extensions.md, not memory. - Dynamic resource discovery patterns live under
pi-mono/packages/coding-agent/examples/extensions/(e.g.dynamic-resources/listing in examples README).
Workflows
- New extension: Read
docs/extensions.md, clone the closestexamples/extensions/template, then align with projectAGENTS.mdif working insidepi-mono. - Skills from extensions: Trace
extendResources+mergePathsinresource-loader.tsto explain ordering with user/project/package skills. - Extension TUI: Read
docs/tui.mdfor theComponentrendering contract in extension context; combine withpi-tuiskill for library-level APIs. - Custom providers via extension: See
pi-mono/packages/coding-agent/docs/custom-provider.mdforregisterProvider()OAuth flows and proxy patterns (grounded inpi-cli-workspace).
Anti-patterns
- Do not assert MCP support in core; optional via extension (see coding-agent README philosophy).
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/romiluz13/pi-agent-skills/pi-extension-authoring">View pi-extension-authoring on skillZs</a>