pi-agent-expert

Documents pi CLI internals, extension API, and agent/skill authoring contracts for orchestration work.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/psmfd/pi-config --skill pi-agent-expert-psmfd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pi-agent-expert
Source: https://github.com/psmfd/pi-config/tree/main/agent/skills/pi-agent-expert
Command: npx skills add https://github.com/psmfd/pi-config --skill pi-agent-expert-psmfd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working on the pi coding-agent orchestration substrate (extensions, agents, skills, prompts) requires accurate knowledge of pi's CLI modes, JSON event stream, extension API, and authoring contracts, which are scattered across installed docs and compiled dist files and drift between releases. ## Core Features & Use Cases - CLI and event-stream reference: Covers pi's interactive, -p print, and --mode json modes, the JSON-Lines event types, exit codes, and signal handling that the vendored subagent extension parses. - Extension API summary: Documents pi.registerTool, the full event catalog, ExtensionContext, pi.sendMessage steering modes, and the pi.events bus for extension authors. - Agent and skill authoring contracts: Specifies SKILL.md frontmatter rules, wrapper frontmatter fields, discovery precedence, prompt-template syntax, and settings precedence. - Use Case: Before modifying agent/extensions/subagent/index.ts or adding a new agent wrapper, load this skill to verify current event names, frontmatter whitelist fields, and the snapshot-bump procedure against the installed pi version. ## Quick Start Ask the pi-agent-expert subagent to explain how the JSON event stream works before changing the subagent extension's output parser.

Frequently Asked Questions about pi-agent-expert

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

FAQPage Schema
How do I author a SKILL.md file for the pi coding agent?▼

Create a directory containing SKILL.md with YAML frontmatter requiring name (1-64 lowercase chars) and description (max 1024 chars). Missing description is a hard error; the skill will not load. Optional fields include license, compatibility, metadata, allowed-tools, and disable-model-invocation.

How do I register a custom tool in a pi extension?▼

Use pi.registerTool inside the extension's default-exported factory function, providing a name, description, TypeBox parameters schema, and an async execute function. The execute handler receives an AbortSignal, an onUpdate callback for streaming progress, and the ExtensionContext.

Does pi support steering a running subagent subprocess?▼

No, pi.sendMessage steering works only in-process and does not cross subprocess boundaries. Subagents spawned with -p and --mode json are single-shot with no documented stdin steering channel during the run.

Why is my pi skill not appearing in available_skills?▼

The skill is hidden if disable-model-invocation is true, the description is missing or exceeds 1024 characters, or the name violates the lowercase naming rules. Skills hidden this way can still be invoked explicitly via /skill:name when enableSkillCommands is set.

What is the difference between pi agents and pi skills?▼

Skills are pi-native knowledge packages loaded on demand via SKILL.md discovery. Agents in this repo are a custom subagent-extension concept: markdown wrappers parsed to spawn isolated child pi subprocesses with specific tool allowlists and system prompts.