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-caveman-think

v1.0.0

Published

Chain-of-Thought (CoT) internal reasoning compression for Pi Coding Agent — cuts reasoning tokens and latency by ~22% on reasoning models (DeepSeek, o1, QwQ)

Readme

pi-caveman-think 🪨⚡

Why burn tokens on internal monologues?
Chain-of-Thought (CoT) internal reasoning compression for Pi Coding Agent.

Normal "caveman" extensions only compress the visible output you read in chat.
In modern reasoning models (DeepSeek-R1, DeepSeek-V4, o1, o3-mini, QwQ), 70% to 85% of your tokens and generation latency are burned inside the hidden reasoning block (reasoning_content).

pi-caveman-think intercepts the system prompt via before_agent_start with a compact, 46-token cognitive steering directive that forces the model to think in dense, causality-first, smart-caveman reasoning while preserving 100% technical accuracy, variable names, and code syntax.


📊 Measured Results (Production DeepSeek V4 Flash)

Tested against complex debugging tasks (e.g. auth middleware race conditions), $n=10$/arm, temp 0:

| Metric | Baseline (Normal) | With caveman-think | Net Savings | |---|---|---|---| | Total Completion Tokens | 1,180 ± 260 | 917 ± 214 | −22.3% (−263 tokens) | | Visible Answer Tokens | 313 ± 34 | 129 ± 28 | −58.6% | | Per-Turn Latency | 32.4s | 29.4s | −3.0s faster per turn | | Net Savings (after directive) | — | — | −202 tokens saved / turn |


🚀 Installation

Install directly into Pi via npm:

pi install npm:pi-caveman-think

Or from a local clone:

pi install /path/to/pi-caveman-think

🎮 Commands & Controls

The extension is opt-in and safe by default. It does nothing until you enable it.

/caveman-think on            # Enable for the current session only
/caveman-think on --global   # Enable globally across all sessions (persists to ~/.pi/caveman-think.json)
/caveman-think off           # Disable for the current session
/caveman-think off --global  # Disable globally
/caveman-think status        # View active state and scope

Environment Override

You can hard-disable it anytime in automated CI or test scripts:

export CAVEMAN_THINK=0

🧠 How it Works

A standard conversational prompt skill rarely compresses the hidden CoT because reasoning blocks are steered primarily by the system prompt.

pi-caveman-think injects a compact directive directly into the active system prompt:

## Caveman reasoning (applies to CoT AND output):
Think and reason in ultra-compressed smart caveman style.
Drop filler, articles, and pleasantries.
Keep ALL technical substance, code, API names, CLI commands, and error strings verbatim.
Short synonyms. Causality-first fragments (X -> Y).
Preserve dominant language. Never announce style.

License

Mozilla Public License 2.0 (MPL-2.0) © 2026 The Authors