Bo’s Blog

Tuesday, 10th February 2026

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)

  1. Startup indexing: Pi scans skills.md files under configured directories and builds a skill registry.
  2. Prompt-time exposure: Pi includes only lightweight metadata in system prompt:
    • skill name
    • skill description
    • skill location
  3. Runtime matching: When user intent matches a skill description, the agent loads that skill file via read.
  4. 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, ......]"

# 11:18 pm

2026 » February

MTWTFSS
      1
2345678
9101112131415
16171819202122
232425262728