pi-context-view

Pi extension to visualize context token usage and inspect hidden prompt, tool, and extension injections

Packages

Package details

extension

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

$ pi install npm:pi-context-view
Package
pi-context-view
Version
0.2.4
Published
Jul 21, 2026
Downloads
412/mo · 275/wk
Author
dimk90
License
MIT
Types
extension
Size
1.2 MB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ],
  "image": "https://media.githubusercontent.com/media/dimk90/pi-context-view/cbf53257118d811188a48591905fb9438fd54536/doc/images/pi-context-view.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-context-view

License: MIT npm version Pi Package

Pi extension that visualizes what fills the model's context and lets you inspect the parts you normally can't see: the base prompt, tool definitions, and instructions injected by other extensions.

Features

  • Context usage map - visualize used and free context space, grouped by category (tools, skills, messages, and more).

  • Context injections - explore the hidden pieces of the context: the initial prompt, tool definitions, and extension injections.

Commands

  • /context - shorthand for /context usage.
  • /context usage - open the context usage visualization.
  • /context injections - show the hidden content of the context at session start or resume.

Usage Examples

/context

See what fills your context. For example, check what remains after compaction:

Context usage view showing estimated context composition

/context injections

Inspect hidden parts of the context, such as tool definitions:

Context injections view and item preview

Install

pi install npm:pi-context-view

Context

pi-context-view does not add any instructions or messages to the model context.

License

MIT