Skip to content

feat: support inline skill references with $ autocomplete #282

Description

@somewan820

Problem

Pi currently exposes loaded skills as /skill:name slash commands. Slash command completion is only available at the beginning of a message, so a user cannot reference a skill naturally inside an already-written prompt.

For example, this does not offer skill completion:

Please review this endpoint using $farbay-java-develop

Proposal

Add inline skill references using $skill-name:

  • Typing $ at a token boundary opens completion for the skills currently loaded in the session.
  • Tab accepts a skill reference without submitting the message.
  • On submit, the selected reference is expanded to the native skill content before the model turn.
  • $ references work anywhere in the user message.
  • Existing /skill:name behavior remains unchanged.
  • Existing @path/to/file completion and file-reference behavior remains unchanged.

Example:

Please review this endpoint using $farbay-java-develop, focusing on authentication.

Implementation constraints

  • Use Pi as the source of truth for loaded skills, resource loading, trust, and reload lifecycle.
  • Do not duplicate the skill loader in OpenPI.
  • Keep the raw user-visible message distinct from the expanded model-visible prompt where the existing lifecycle supports that distinction.
  • Define behavior for unknown skills, escaped dollar signs, multiple references, and references adjacent to punctuation.

Acceptance criteria

  • Inline $ completion lists only currently loaded skills.
  • Selecting a skill does not submit the message.
  • A submitted inline reference actually loads the corresponding SKILL.md content.
  • Existing slash skill commands and @ file completion do not regress.
  • Tests cover completion, expansion, unknown references, and mixed inline text.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions