Pi Meta-Inspection Skill
Use this skill whenever you or the user needs to understand how the pi harness works internally (commands like /session, startup behavior, skill loading, etc.). It guides you to examine the local pi source tree (~/repos/pi-mono, forked from badlogic/pi-mono) and relevant documentation.
When to Use
- •User asks “How does
/sessionwork?” “Where are sessions stored?” “How does skill discovery happen?” - •A question arrives that feels “out of band” (unrelated to current coding task) and might refer to pi’s own features or commands.
- •You need to confirm implementation details about pi commands, modes, or settings.
- •Debugging or extending the harness requires reading its source or docs.
Repository Layout
- •
~/repos/pi-mono/– full pi mono-repo fork- •
packages/pi-coding-agent/– main CLI + agent harness code (Node.js/TypeScript) - •
docs/– markdown docs mirrored under the installed npm package (~/.nvm/.../node_modules/@mariozechner/pi-coding-agent/docs) - •
examples/,extensions/, etc. for reference implementations
- •
Workflow
- •
Confirm Context
- •Ask the user what they already know and what level of detail they need (high-level summary vs. code-level explanation).
- •
Locate Source
- •Use
rg,ls, orfindinside~/repos/pi-monoto discover relevant files:bashcd ~/repos/pi-mono rg -n "/session" -g"*.ts"
- •For docs, start with
docs/or the npm-installed README (~/.nvm/.../README.md).
- •Use
- •
Read Before Editing
- •Use the
readtool to inspect files (per harness rules, don’tcat). - •Take note of key functions, modules, or commands.
- •Use the
- •
Summarize Findings
- •Provide a clear explanation referencing the files inspected (paths + relevant sections).
- •Quote or paraphrase the code/README as needed.
- •
Answer Follow-up Questions
- •If something is unclear, keep searching the repo (e.g.,
rg "new Session"orrg "BrowserTools").
- •If something is unclear, keep searching the repo (e.g.,
Tips
- •If a user question feels unrelated to the current repo (“What does
/sessiondo?” during a coding task), pause and consider whether it’s a meta request before proceeding. - •Combine this skill with
planning-with-filesif your investigation spans multiple files or needs documentation for future reference. - •When exploring the same topic repeatedly, consider creating notes under
/home/paul/.pi/agent/skills/meta-notes/(or similar) so future you can follow faster. - •If the code points to upstream
badlogic/pi-mono, note the git remote or commit references so the user can sync.
Learned Lessons
Document useful file locations, command internals, or debugging tricks here as you uncover them. This becomes a living index for self-inspection.