@indexyz/pi-skill0.1.43
Codex-style $skill-name invocation anywhere in a pi prompt
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
@indexyz/pi-skill
Codex-style $skill-name invocation anywhere in a pi prompt.
Pi expands skills only through the /skill:name command at the start of a message. This extension lets you reference loaded skills inline, while rendering every referenced skill as its own native, collapsible block:
[skill] code-review (… to expand)
使用 $code-review 这个 skill review 代码
The model receives the same XML block Pi uses for /skill:name, as a separate context message before the original prompt:
<skill name="code-review" location="/path/to/code-review/SKILL.md">
References are relative to /path/to/code-review.
…skill instructions…
</skill>
使用 $code-review 这个 skill review 代码
Install
pi install npm:@indexyz/pi-skill
For local development:
pi -e ./pi-skill/index.ts
Usage
Type $ followed by a skill name anywhere in your prompt:
$code-review # whole prompt is the skill
请先 $code-review 一下最近的改动 # inline, mid-sentence
对比 $code-review 和 $simplify-codebase 两份检查清单
Typing $ at the start of a token (line start or after whitespace) opens an
autocomplete popup listing every loaded skill with its description, just like
/skill: completion. Suggestions fuzzy-match on the skill name.
- Works with every skill pi has loaded: global (
~/.pi/agent/skills,~/.agents/skills), project (.pi/skills,.agents/skills), package, settings, and--skillpaths — including skills markeddisable-model-invocation, which never appear in the system prompt. - Every distinct referenced skill gets its own native
[skill] nameblock; use Pi's tool-output expansion key to reveal the full instructions. - Each context message uses the same
<skill name="…" location="…">format pi emits for/skill:name, so relative references inside the skill keep working. - The original user prompt stays readable instead of being replaced by the full skill bodies.
- A token that matches no loaded skill is left untouched, so
$HOMEor$9.99in prose is safe. - Write
$$namefor a literal$name.
Development
npm install
npm run check --workspace @indexyz/pi-skill
Release
The repository's v* tag workflow checks all workspaces and publishes every local version that is not already on npm. Configure @indexyz/pi-skill as an npm trusted publisher for 5aaee9/pi-agent-extensions and .github/workflows/publish.yml; the workflow uses short-lived OIDC credentials instead of a stored npm token.
License
MIT