@benvargas/pi-ancestor-discovery
Recursive ancestor discovery for pi resources (skills, prompts, themes)
Package details
Install @benvargas/pi-ancestor-discovery from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@benvargas/pi-ancestor-discovery- Package
@benvargas/pi-ancestor-discovery- Version
1.1.1- Published
- Feb 4, 2026
- Downloads
- 48/mo · 19/wk
- Author
- benvargas
- License
- MIT
- Types
- extension
- Size
- 11.7 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@benvargas/pi-ancestor-discovery
Recursive ancestor discovery for pi resources (skills, prompts, themes).
This extension uses the resources_discover hook (pi v0.51.0+) to walk upward from your current working directory and discover resource folders at each ancestor level.
Install
pi install npm:@benvargas/pi-ancestor-discovery
Default behavior
- Enabled: skills
- Disabled: prompts, themes
- Search paths:
.pi/skills,.agents/skills - Boundary: home directory (
~)
This means it will look for .pi/skills and .agents/skills at each ancestor directory from cwd up to your home directory.
Configuration
Create a JSON config file in one of these locations:
- Project:
.pi/extensions/pi-ancestor-discovery.json - Global:
~/.pi/agent/extensions/pi-ancestor-discovery.json
Project config overrides global config. If neither exists, the extension writes the default config to the global path on first run.
Example: enable prompts and themes
{
"boundary": "home",
"resources": {
"skills": {
"enabled": true,
"searchPaths": [".pi/skills", ".agents/skills"]
},
"prompts": {
"enabled": true,
"searchPaths": [".pi/prompts"]
},
"themes": {
"enabled": true,
"searchPaths": [".pi/themes"]
}
}
}
Example: include Claude skills too
{
"resources": {
"skills": {
"enabled": true,
"searchPaths": [".pi/skills", ".agents/skills", ".claude/skills"]
}
}
}
Boundary options
"home"or"~": stop at the home directory (default)"root"or"/": stop at the filesystem root"/absolute/path": stop when that absolute path is reached
The boundary directory is included in the search.
Notes
- Paths are returned closest-first, so nearer resources win name collisions.
- Absolute or
~-prefixed search paths are treated as fixed locations and appended after ancestor discovery.
Uninstall
pi remove npm:@benvargas/pi-ancestor-discovery
License
MIT