@artale/pi-weigh

Weigh your context. Visual HTML report of system prompt token budget — per-tool breakdown, section analysis, health indicator. Zero dependencies.

Package details

extension

Install @artale/pi-weigh from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@artale/pi-weigh
Package
@artale/pi-weigh
Version
1.2.2
Published
Apr 21, 2026
Downloads
188/mo · 22/wk
Author
artale
License
MIT
Types
extension
Size
22.6 KB
Dependencies
0 dependencies · 0 peers

Security note

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

README

@artale/pi-weigh

Token burden analysis for pi. See exactly what's consuming your context window.

Replaces the broken pi-token-burden package (protobufjs crash on Windows).

Install

npm install -g @artale/pi-weigh

Features (v1.1)

  • System prompt breakdown — Core instructions, tool descriptions, project context, skill catalog
  • Per-tool token cost — Every tool ranked by weight with source attribution
  • Per-skill token cost — Skill catalog entries ranked by size
  • Deactivation candidates — Tools >200 tokens that could be disabled, with savings estimate
  • History tracking — Token burden snapshots over time with trend indicators
  • HTML report — Auto-opens detailed visual report in browser
  • Machine-readableweigh tool returns structured JSON for agents

Tools

  • weigh — Get token burden breakdown (JSON)

Commands

  • /weigh — Generate HTML report + terminal summary