Install
Install with PiG
pig install npm:@hfrancisla/pi-skill-toolInstall with Pi
pi install npm:@hfrancisla/pi-skill-toolPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.2.7 (README.md). PiG does not review it.
pi-skill-tool
A pi extension that adds a Claude Code-style skill tool for loading additional skills by exact name.
What It Does
- Registers
skill({ name })for model-driven skill loading and skill-to-skill delegation. - Preserves pi's native
/skill:namecommand. User-invoked skills are expanded by pi before the model runs. - Prevents the tool from rereading a skill that was already expanded by
/skill:nameor loaded earlier in the same turn. - Rewrites pi's model-facing skill catalog to use the
skilltool instead of direct file reads. - Removes skill file locations and the now-redundant relative-path rule from that catalog.
- Exposes pi's built-in documentation as an in-memory
pi-docsskill when the structured documentation section is available. - Enforces pi's
disable-model-invocationvisibility rule.
The extension uses pi's current structured system-prompt API and official skill/frontmatter helpers. Physical skill results include the skill's base directory so relative references remain usable.
Install
pi install npm:@hfrancisla/pi-skill-tool
Restart pi after installation if the current session does not load the extension automatically.
Usage
User-invoked skill:
/skill:grill-with-docs
Pi expands the command before the model runs. The model can then follow that skill and load additional skills it names:
skill({"name":"grilling"})
skill({"name":"domain-modeling"})
The skill tool accepts one exact, case-sensitive skill name:
{
"name": "grilling"
}
A normal skill can be loaded by the model when its description matches the task. A skill with disable-model-invocation: true remains user-only through /skill:name. A repeated request for a skill already loaded in the current turn returns already-loaded without rereading the file.
Tool Contract
description: Load a skill's full instructions and workflow by exact name.
parameter: { name: string }
A physical skill result contains its instructions and base directory. The virtual pi-docs skill is served from memory and does not require a skill file.
Development
The current implementation is validated against @earendil-works/pi-coding-agent 1.6.1. Pi and TypeBox remain host-provided peer dependencies at runtime; matching development dependencies are installed locally for reproducible type checking.
npm install
npm run check
npm pack --dry-run
Release
npm run check
npm pack --dry-run
npm publish --access public
This package is public and uses the MIT license.