pi-extension

Develop and debug custom extensions for the Pi coding agent framework.

1|1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/valtterimelkko/agent-workflow-skills --skill pi-extension-valtterimelkko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pi-extension
Source: https://github.com/valtterimelkko/agent-workflow-skills/tree/main/skills/pi-extension
Command: npx skills add https://github.com/valtterimelkko/agent-workflow-skills --skill pi-extension-valtterimelkko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @earendil-works/pi-coding-agent, typebox, @earendil-works/pi-ai.

What problem does it solve?

This skill addresses the complexity of extending the Pi coding agent, providing a structured approach to implementing custom tools, commands, and lifecycle handlers while avoiding common migration pitfalls.

Core Features & Use Cases

  • Extension Lifecycle Management: Provides patterns for handling session events like startup, compaction, and shutdown to ensure persistent and reliable agent behavior.
  • API Implementation: Offers clear guidance on the current ExtensionAPI, including command registration, tool execution signatures, and UI interaction methods.
  • Use Case: Use this skill when you need to add a custom slash command to your agent to trigger a specific workflow or when you need to persist custom state across agent sessions.

Quick Start

Use the pi-extension skill to guide the implementation of a new custom tool that registers a command and handles user input via the current ExtensionAPI.

Frequently Asked Questions about pi-extension

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a custom slash command to the Pi coding agent?

To add a custom slash command to the Pi coding agent, implement a custom extension using the current ExtensionAPI to register commands and handle user input within the @earendil-works ecosystem.

How does session persistence work for Pi agent extensions?

Session persistence for Pi agent extensions works by utilizing lifecycle event handlers for startup, compaction, and shutdown, ensuring reliable behavior and state retention across agent sessions.

What is the best way to debug a TypeScript coding agent extension?

The best way to debug a TypeScript coding agent extension is to use the pi-extension skill, which provides structured patterns for implementing custom tools while avoiding common API migration pitfalls.

Can I handle lifecycle events like startup and shutdown in the @earendil-works ecosystem?

Yes, you can handle lifecycle events like startup and shutdown in the @earendil-works ecosystem by utilizing provided extension lifecycle management patterns to ensure persistent agent behavior.

Do I need typebox to build custom tools for the Pi coding agent?

Yes, typebox is a required dependency for building custom tools and extensions for the Pi coding agent, ensuring proper type validation and adherence to current API signatures.

Why does my Pi agent extension break after an API update?

Pi agent extensions often break after API updates due to outdated execution signatures or compaction hooks; this skill ensures adherence to current ExtensionAPI patterns to avoid these migration pitfalls.