pi-slash-anywhere

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

Packages

Package details

extension

Install pi-slash-anywhere from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-slash-anywhere
Package
pi-slash-anywhere
Version
0.1.6
Published
Oct 17, 2026
Downloads
948/mo · 219/wk
Author
torolex
License
MIT
Types
extension
Size
189.4 KB
Dependencies
0 dependencies · 2 peers
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

⚡ 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

Option 1: Direct from Git (Recommended)

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

Option 2: From npm / Pi Package Gallery

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:

Input Triggered? 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

Friendship Link

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.