Pi Core - The skills base. Pi uses skills.md to teach AI do different things instead of using the prompt. In packages/coding-agent/src/core/skills.ts
export interface Skill {
name: string;
description: string;
filePath: string;
baseDir: string;
source: string;
disableModelInvocation: boolean;
}
export interface LoadSkillsResult {
skills: Skill[];
diagnostics: ResourceDiagnostic[];
}
Key behavior from the implementation
- Skills are formatted in XML
(<available_skills> ... </available_skills>) - Only skills with disableModelInvocation !== true are included.
- The system prompt tells the model to:
- inspect available skill name + description
- use the read tool to load the full skill file when relevant
- resolve relative paths against the skill directory
So the model does not ingest all skill content upfront — it gets a compact index first, then loads details on demand.
Pi Skill Flow (What actually happens)
- Startup indexing: Pi scans skills.md files under configured directories and builds a skill registry.
- Prompt-time exposure: Pi includes only lightweight metadata in system prompt:
- skill name
- skill description
- skill location
- Runtime matching: When user intent matches a skill description, the agent loads that skill file via read.
- Execution guidance: skills.md contains concrete instructions:
- step-by-step procedure
- shell commands
- examples
- task-specific constraints
This creates a lazy-loading playbook system: small prompt footprint, detailed guidance only when needed.
Following is an example of a skills.md file:
---
name: call isin look up function
description: Retrieve the OTC data given an ISIN (International Securities Identification Number)
---
# Retrieving OTC data for given ISIN
Run once before first use:
bash
cd /path/to/script
source /venv/bin/python isin_data_retrieval.py "[ISIN_1, ISIN2, ......]"
Recent articles
- I Passed My Driving Test - and And I Have Something to Say - 30th March 2026
- Microsoft Copilot and the MCP Integration Experience — A Mess - 16th March 2026
- WeChat -- The Worst Chatting App Ever Made - 7th March 2026