pi-package-authoring
Pi package authoring
Grounding
pi-mono/packages/coding-agent/docs/packages.md— manifest, install commands, layout.pi-mono/packages/coding-agent/README.md— Pi Packages section (pi install,package.jsonpikey, keywords).pi-mono/packages/coding-agent/src/core/package-manager.ts—resourcePrecedenceRank(package-origin resources sort after user/project).
Invariants
- Packages integrate through the same resource resolution pipeline as local dirs; package-origin metadata ranks after user/project auto paths — see
resourcePrecedenceRankinpi-mono/packages/coding-agent/src/core/package-manager.ts. - Third-party packages execute code; skills can instruct arbitrary actions — security notes are first-party in
docs/packages.mdand coding-agent README.
Workflows
- Define a package: Mirror the
package.jsonexample fromdocs/packages.md/ README; verify conventional dirs (skills/,extensions/, etc.) against those docs. - Predict overrides: Combine package-manager precedence with
loadSkills“first name wins” (pi-mono/packages/coding-agent/src/core/skills.ts).
Anti-patterns
- Do not invent CLI flags not documented in
docs/packages.md/ README.
More from romiluz13/pi-agent-skills
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.
23pi-customization
Pi coding agent customization — Themes, Keybindings, Prompt Templates, System Prompt overrides, and Settings. Use when configuring or modifying the visual appearance, UI colors, keyboard shortcuts, prompt templates, or the default system prompt behavior of the pi terminal agent. Use for "custom theme pi", "change keybindings", "modify system prompt", "SYSTEM.md", "APPEND_SYSTEM.md", "settings.json", "keybindings.json", "prompt template", even if pi-cli-workspace is already active.
21pi-cli-workspace
Pi terminal agent workspace — install, /commands, sessions, compaction, settings.json, AGENTS.md, skill discovery, precedence, session JSONL, /tree, providers/auth, models.json, credential resolution, platform setup, editor (@file, Tab, images, !bash), message queue (steering, follow-up), built-in tools (read/bash/edit/write/grep/find/ls, --tools, --no-tools), print mode (-p, piped stdin), SYSTEM.md/APPEND_SYSTEM.md, CLI flags (-c, -r, --session, --fork, --no-session), @files args, resource flags (--no-extensions, --no-skills), model shorthand (provider/id, name:thinking), all slash commands, env vars, philosophy (no MCP/sub-agents/plan-mode by design). Use for pi config, skills, sessions, compaction, providers, models, tmux, Termux, Windows, tools, modes, system prompt, message queue, or "does pi support X".
19pi-rpc-sdk
Pi headless RPC JSONL over stdin/stdout, strict LF framing, --mode json event streaming, and Node SDK alternatives (AgentSession). Use when integrating pi --mode rpc, pi --mode json, writing a client that speaks the protocol, reading JSON event streams, or choosing RPC vs in-process SDK. Use for "pi rpc client", "JSONL framing", "readline rpc", "--mode json", "json events", "embed pi without subprocess", "createAgentSession", "AgentSessionRuntime", "ModelRegistry", "embed pi", "SDK factory", even if the user only pasted JSON lines.
19