npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-curated-tools

v1.0.0

Published

Intent-driven read and bash output curation with durable token savings and cost tracking for Pi

Readme

Pi Curated Tools Extension

A high-signal, context-saving extension for pi.

Overview

Large file reads (read) and verbose terminal outputs (bash) are the biggest contributors to context bloat and degradation over long agent sessions.

This extension wraps the built-in tools (read, bash) with an Intent-Driven Sub-Agent Curator:

  1. Mandatory intent parameter: Requires the LLM agent to specify what exact information or outcome it is looking for.
  2. Sub-Agent Curation Step: A fast sub-model extracts only relevant code snippets (preserving line numbers), error traces, and matching answers before passing them into the main agent's context.
  3. Dual Token Tracking:
    • Context Saved: Tracks how many cumulative tokens were prevented from entering the main agent's long-term context window.
    • Sub-Agent Cost: Tracks the exact one-off tokens (input and output) spent by the sub-agent model call.

Outputs shorter than 250 characters bypass the curator and are returned directly.


Installation

The extension is installed globally at: ~/.pi/agent/extensions/curated-tools/

It auto-loads on startup or can be reloaded in an active session with /reload.


Commands

  • /curator-model
    Interactively select from a compact shortlist of the active and fast models. Use /curator-model <provider/model-or-pattern> to choose any other registered model (e.g. claude-3-5-haiku, gemini-2.0-flash, or gpt-4o-mini). The default is OpenRouter's openai/gpt-5.6-luna, requested with reasoning disabled and a dedicated final-output budget.

  • /curation-stats
    Show a detailed lifetime and current-session breakdown of:

    • Total tool calls
    • Context tokens saved vs. curated tokens injected
    • Sub-agent token consumption (one-off input + output)
    • Cached tokens, measured curator cost, and the immediate token-price break-even ratio
    • Per-tool stats (read, bash)

Usage is durably recorded across Pi sessions in ~/.pi/agent/curated-tools/token-usage.jsonl. Set PI_CURATION_STATS_PATH to store the append-only ledger elsewhere.


Live Status Widget

While running, the extension continuously updates a bottom widget:

🌿 Context Saved: ~48.2k tokens (74% reduction) | Sub-agent spent: ~14.1k tokens across 14 calls