pi-extension

Develop custom Pi extensions with slash commands, LLM tools, and lifecycle hooks.

Updated Jan 22, 2024
One-click install
npx skills add https://github.com/nathankoerschner/dotfiles --skill pi-extension
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pi-extension
Source: https://github.com/nathankoerschner/dotfiles/tree/main/agent-skills/_shared-skills/pi-extension
Command: npx skills add https://github.com/nathankoerschner/dotfiles --skill pi-extension

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill allows users to create custom commands, tools, and behaviors within the Pi environment, tailoring the AI's functionality to specific needs and workflows.

Core Features & Use Cases

  • Custom Commands: Define new slash commands for Pi.
  • LLM Tools: Create capabilities that the LLM can call.
  • Event Handling: Intercept and modify user input or agent context.
  • Persistence: Store extension-specific state.
  • Use Case: You want to create a new command /summarize-meeting that takes a transcript and generates a concise summary, or you need an extension that automatically formats code snippets before they are sent to the LLM.

Quick Start

Use the pi-extension skill to create a new command that greets the user.

Frequently Asked Questions about pi-extension

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

FAQPage Schema
How do I create custom slash commands in the Pi environment?

To create custom slash commands in Pi, you use the pi-extension skill to define new command behaviors. These commands are placed in ~/.pi/agent/extensions/ for global accessibility and can be reloaded using the /reload command for testing.

What can I build using Pi environment extensions?

Pi environment extensions allow you to build custom slash commands, LLM-callable tools, lifecycle hooks, context filtering, session persistence, UI prompts, and model or provider integrations. They tailor the AI's functionality to specific workflows and needs.

How do I add custom LLM-callable tools to Pi?

You add custom LLM-callable tools to Pi by developing an extension with the pi-extension skill. Place the newly created tools in the ~/.pi/agent/extensions/ directory so the agent can access and invoke them during sessions.

Can I intercept and modify user input before it reaches the LLM in Pi?

Yes, you can intercept and modify user input before it reaches the LLM in Pi. The pi-extension skill enables event handling through lifecycle hooks, allowing you to filter context and format input dynamically before processing.

Does Pi support session persistence and state storage for custom extensions?

Pi supports session persistence and state storage for custom extensions. The pi-extension skill provides the capabilities to store extension-specific state, ensuring data persists across interactions within the Pi environment.

Where do I place custom Pi extensions for global accessibility?

You place custom Pi extensions in the ~/.pi/agent/extensions/ directory for global accessibility. After placing them there, you can use the /reload command to test and activate the new extensions immediately.