← Catalog

pi-slash-anywhere

Trigger slash commands, prompt templates, and skills anywhere inline in prompt messages with smart autocomplete and zero-friction expansion.

ExtensionSkill

Install

Install with PiG

pig install npm:pi-slash-anywhere

Install with Pi

pi install npm:pi-slash-anywhere
Review before installing

Packages 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": [
    "./extensions/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.6 (README.md). PiG does not review it.

⚡ pi-slash-anywhere

Use slash commands, prompt templates, and skills anywhere inline in your prompts.

GitHub Release CI Status License: MIT Pi Packages LINUX DO

本项目积极参与并认可 LINUX DO 社区。

Features • Installation • How It Works • Configuration • Contributing

中文


By default in Pi, slash commands (/help, /clear) and skill references are only triggered at the very start of a line.

pi-slash-anywhere brings full inline autocompletion and auto-expansion to any position in your prompt message — whether you are referencing multiple skills mid-sentence or typing slash shortcuts on the fly.

Please analyze this auth module using /skill:security-audit and then review with /skill:code-review
                                       ▲                                          ▲
                                   Autocompleted                             Autocompleted

✨ Key Features

  • 🎯 Inline Trigger Anywhere: Type / anywhere preceded by whitespace or at the start of a line to bring up suggestions.
  • 🔍 Unified Autocomplete Aggregation:
    • 🛠 Skills: /skill:<name>
    • ⚡ Interactive Commands: /clear, /model, /help, etc.
    • 📝 Prompt Templates: Dynamic project prompt templates.
  • 🛡 Smart Path Boundary Detection:
    • Automatically avoids false positives on file paths (e.g. foo/bar, https://).
    • Seamlessly retreats to native file completion when typing a directory path like /src/components/.
  • 🚀 Zero-Friction Skill Prepending:
    • Inline tokens like /skill:diagnosing-bugs are automatically stripped of YAML frontmatter and prepended to your prompt context with clear boundary tags upon submission.
    • Fully deduplicated and resilient: unresolved skills stay as plain text without throwing errors or blocking execution.

📦 Installation

Install the latest version directly into your global Pi environment:

pi install git:github.com/toRolex/pi-slash-anywhere

To update to the latest version at any time:

pi update git:github.com/toRolex/pi-slash-anywhere
pi install npm:pi-slash-anywhere

Option 3: Local Development / Temporary Session

Run once without persistent installation:

pi -e ./extensions/index.ts

Or link locally:

pi install .

💡 How It Works

1. Autocompletion Trigger

Whenever your cursor follows a space and a /, the completion popup is summoned:

InputTriggered?Candidates
/ (start of line)✅Commands, Skills, Templates
check this /✅Commands, Skills, Templates
check this /skill:✅Filtered strictly to skills
http://... or a/b❌Ignored (non-whitespace boundary)
/usr/local/❌Converted to native file completion

2. Prompt Interception & Injection

When you submit a message containing inline skill tokens:

Input:

Please review this PR with /skill:code-review and /skill:diagnosing-bugs

What Pi & Agent receives:

[Included Skill: code-review]
<skill instructions and body...>

[Included Skill: diagnosing-bugs]
<skill instructions and body...>

Please review this PR with /skill:code-review and /skill:diagnosing-bugs

⚙️ Configuration

You can customize behavior in your ~/.pi/agent/settings.json or project settings:

{
  "pi-slash-anywhere": {
    "enabled": true,       // Enable or disable inline skill transformation
    "fuzzy": true          // Match suggestions with fuzzy search
  }
}

🛠 Development & Testing

# Clone the repository
git clone https://github.com/toRolex/pi-slash-anywhere.git
cd pi-slash-anywhere

# Install dependencies
npm install

# Run unit and integration tests
npm test

# Typecheck
npm run typecheck

Thanks for the support and feedback from the friends at LINUX DO.


🤝 Contributing & License

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

Distributed under the MIT License.