system-prompt-omni
Display, export, and record the effective pi coding agent system prompt
Package details
Install system-prompt-omni from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:system-prompt-omni- Package
system-prompt-omni- Version
0.3.2- Published
- Sep 11, 2026
- Downloads
- 331/mo · 315/wk
- Author
- weiwch
- License
- Apache-2.0
- Types
- extension
- Size
- 46 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
system-prompt-omni
Display the full pi coding agent system prompt — with all injected tools,
guidelines, context files, and skills — in a scrollable full-screen overlay. The extension can
also export safe SYSTEM.md and APPEND_SYSTEM.md source files globally or for the current
project, and records each changed effective prompt in the current session.
Usage
/system-prompt
/system-prompt export
/system-prompt export system global
/system-prompt export system project
/system-prompt export append global
/system-prompt export append project
Inside the prompt viewer:
| Key | Action |
|---|---|
↑↓ / j k |
Scroll line |
PgUp / PgDn |
Scroll page |
Home / End |
Jump to top/bottom |
c |
Copy full prompt and tool definitions to clipboard |
e |
Open the export wizard |
Esc / q |
Close |
The export wizard writes to one of these locations:
| Scope | SYSTEM.md |
APPEND_SYSTEM.md |
|---|---|---|
| Global | $PI_CODING_AGENT_DIR/SYSTEM.md or ~/.pi/agent/SYSTEM.md |
$PI_CODING_AGENT_DIR/APPEND_SYSTEM.md or ~/.pi/agent/APPEND_SYSTEM.md |
| Project | <cwd>/.pi/SYSTEM.md |
<cwd>/.pi/APPEND_SYSTEM.md |
SYSTEM.md export is intentionally safe: if a custom prompt is already configured, its source
text is exported. Otherwise, the extension removes dynamically injected append text, project
context, skills, and current working directory from the assembled prompt before writing the
static default prefix. Pi will inject those dynamic sections again when it loads the exported
file.
APPEND_SYSTEM.md export writes the currently configured append text. If none is configured,
the wizard can create an empty starter file. Existing files are never overwritten without
confirmation. Run /reload after exporting to load the new file.
Prompt recording
Before each provider request, the package compares the SHA-256 hashes of the effective system
prompt and serialized active tool definitions with the latest snapshot on the active session
branch. When either changes, a durable custom session entry with type pi-system-prompt records:
- the full effective system prompt, its hash, and UTF-8 byte length;
- provider, model, API, and thinking-level metadata;
serializedTools, the tool-definition value copied from Pi's final provider payload and encoded as a compact JSON string; and- provider-level system/developer instructions extracted from the serialized request.
No second tool representation is stored. Tool definitions are not rebuilt or sorted, so array
order and provider-specific structure stay identical to the before_provider_request payload.
{
"serializedTools": "[{\"type\":\"function\",\"function\":{\"name\":\"read\",\"description\":\"Read files\",\"parameters\":{\"type\":\"object\"}}}]"
}
The exact representation follows the active API. OpenAI Responses, Anthropic, Google, Bedrock,
and pi-messages therefore retain their own transmitted tool schema rather than being converted
to the Chat Completions shape. Load this package after extensions that rewrite provider requests
so it observes their final tool order and definitions.
The recorder never stores the complete provider payload, never adds its custom entries to the LLM context, and returns the payload unchanged. Loading it last also ensures rewritten provider instructions are included in the snapshot.
Install
pi install git:github.com/weiwch/system-prompt-omni
For local development:
pi install /path/to/system-prompt-omni
Development
npm test
Release
Keep the version in package.json and the Git tag in sync, then push the tag:
git tag v0.4.0
git push origin v0.4.0
The release workflow tests and publishes the package to npm before creating the matching GitHub
Release. Prerelease versions (for example, v0.4.0-beta.1) use npm's next tag and create a
GitHub prerelease. The workflow can also be run manually with an existing tag to safely repair a
partial release.
Publishing uses npm Trusted Publishing (OIDC), so the npm package must trust the GitHub repository
weiwch/system-prompt-omni and workflow filename publish.yml, with direct publishing allowed.
No long-lived npm token is required.
License
Apache-2.0. See LICENSE, which also contains the upstream attribution and a summary of this fork's modifications.
Upstream and acknowledgements
This project is a modified fork of
jandrikus/pi-system-prompt. Many thanks to
Alex (jandrikus) and the upstream contributors for the original system-prompt viewer. The
upstream work and this fork are distributed under the Apache License 2.0; the original license
and attribution are retained.