@indexyz/pi-skill

Codex-style $skill-name invocation anywhere in a pi prompt

Packages

Package details

extension

Install @indexyz/pi-skill from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@indexyz/pi-skill
Package
@indexyz/pi-skill
Version
0.1.44
Published
Nov 4, 2026
Downloads
813/mo · 83/wk
Author
indexyz
License
MIT
Types
extension
Size
14.3 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

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

Releases are published to npm as @indexyz/pi-skill; each release is tagged @indexyz/pi-skill@<version>.

To try a repository checkout (after npm install at the repository root):

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 --skill paths — including skills marked disable-model-invocation, which never appear in the system prompt.
  • Every distinct referenced skill gets its own native [skill] name block; 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 $HOME or $9.99 in prose is safe.
  • $$name does not invoke a skill, and the model receives $$name with both dollar signs.
  • While the model is answering, the block travels inside your queued message, as Pi does for /skill:, so it arrives with your words rather than in a model turn of its own. With several skills queued in one message, the terminal collapses only the first.

Development

Verified against Pi 1.5.0.

npm install
npm run check --workspace @indexyz/pi-skill

License

MIT