pi-load-skill
Pi extension for loading skills on demand from any location
Package details
Install pi-load-skill from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-load-skill- Package
pi-load-skill- Version
1.2.3- Published
- Apr 29, 2026
- Downloads
- 452/mo · 21/wk
- Author
- bnenu
- License
- MIT
- Types
- extension
- Size
- 18.3 KB
- Dependencies
- 1 dependency · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-load-skill
Load your skills on demand from any location. Keep your pi agent lean — don't load all your skills when you don't need them, add only the ones you need for that session.
Features
- Load skills on-demand: Load individual skills or entire skill directories from any path
- Session-scoped: Skills persist in the session file and are restored automatically on
/reload,/resume,/fork, and pi restart - Native injection: Loaded skills appear in the system prompt with name, description, and location — the agent can read the full skill content on demand
- Unload skills: Remove loaded skills when no longer needed
Installation
Option 1: From npm
pi install npm:pi-load-skill
Option 2: Local development
pi -e ./extensions/load-skills.ts
Usage
Load Skills
Load all skills from a directory:
/load-skills ./path/to/skills-folder
Load a single skill:
/load-skills ./path/to/skill-folder
The extension will:
- Find all skills in the directory (or validate a single skill)
- Add them to pi's skill discovery system via
resources_discover - They appear in the
<available_skills>section of the system prompt with their file location - The agent can read the full skill content on demand using the
readtool
List Loaded Skills
/list-loaded-skills
Unload Skills
Unload a specific skill:
/unload-skills skill-name
Unload all loaded skills:
/unload-skills
Example
# Start pi
pi
# In the pi session:
/load-skills ./my-skills
# Skills now appear in the system prompt — the agent can use them
What skills do you have available?
# Unload when done
/unload-skills
How It Works
- On
/load-skills: Skills are validated, added to the in-memory map, a snapshot is appended to the session file viapi.appendEntry(), and pi reloads - On any session transition (
/reload,/resume,/fork, pi restart):session_startfires, the extension replays the current branch viactx.sessionManager.getBranch(), finds the lastpi-load-skillsnapshot entry, and restores the map from it - On
/new: A fresh session has no prior entries — the map starts empty
Persistence Model
| Event | Skills in session |
|---|---|
/load-skills |
snapshot appended to session + reload triggered |
/unload-skills |
snapshot appended to session + reload triggered |
/reload |
branch replayed → skills restored ✓ |
/new |
fresh session, no entries → map empty ✓ |
/resume |
branch replayed → skills restored ✓ |
/fork |
branch up to fork point replayed ✓ |
| pi restart + resume | branch replayed → skills restored ✓ |
| pi restart (no resume) | fresh session → map empty ✓ |
Skill Format
Skills must follow the Agent Skills standard:
---
name: my-skill
description: What this skill does and when to use it.
---
# My Skill
## Usage
Instructions for using the skill...
Requirements
- pi >= 0.65.0
- Node.js >= 18
License
MIT
Made with reespec and ❤️ in EU