← Catalog

@yesifan/pi-system-prompt

Pi extension: /system-prompt prints the real system prompt (with tool & skill context) sent to the model

Extension

Install

Install with PiG

pig install npm:@yesifan/pi-system-prompt

Install with Pi

pi install npm:@yesifan/pi-system-prompt
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": [
    "./index.js"
  ]
}

README

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

pi-system-prompt

A Pi extension that adds a /system-prompt slash command.

/system-prompt prints everything Pi sends to the model before the user message: the system message text and the tools array.

Install

Requires Node.js 22.19.0 or newer. The development baseline is Pi SDK 1.5.2.

pi install npm:@yesifan/pi-system-prompt
# project-local installation from a monorepo checkout:
pnpm --filter @yesifan/pi-system-prompt build
pi install -l ./packages/pi-system-prompt

After installing, run /reload in a Pi session (or restart Pi), then:

/system-prompt

/system-prompt (current session)

Renders a dump with exactly two sections:

  • SYSTEM PROMPT (system message text) — the fully assembled system prompt string sent as the system message (from before_agent_start/getSystemPrompt()).
  • TOOLS (tools array sent to the model) — the tools from the last before_provider_request payload, dumped verbatim as JSON (the real tool definitions).

Nothing else is printed (no meta block, no prompt-inputs list, no tool registry dump). No file is written; it just displays directly.

How /system-prompt captures the real values

  • before_agent_start captures event.systemPrompt (the fully assembled system prompt string for the turn).
  • before_provider_request captures event.payload, from which the exact tools array is read.

License

MIT

Development

See docs/development.md for how to install the package locally during development and how to update the extension after source changes.