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

token-phish-blocker

v1.1.2

Published

Always-on anti-hedging policy for the Pi coding agent — auto-fix instead of caveat, with a mandatory audit trail and a live status-line counter.

Readme

Always-on anti-hedging policy for the Pi coding agent — auto-fix instead of caveat.

npm version pi.dev catalog MIT license CI

Install

pi install npm:token-phish-blocker

Or browse it on the pi.dev package catalog.

From git, if you're not using npm:

pi install git:github.com/getdatasurge/token-phish-blocker

Try it once without installing:

pi -e npm:token-phish-blocker

What it does

Agents love to hedge: "one caveat — I didn't handle the empty-array case," "just a heads up, I didn't wire up error logging." That's a fixable gap phrased as commentary instead of fixed.

Token Phish Blocker injects a 4-rule policy into the system prompt on every turn: stop hedging, fix trivial and blocking issues before calling the task done, stay inside the current task's blast radius, and log every such auto-fix through a mandatory tool call. The log call drives a live counter in the footer, so the policy being "on" is directly observable — not just asserted.

That's the whole thing. 30 seconds, no config, no runtime deps.

The four rules

| Rule | What it means | | --- | --- | | 1. No hedging | Banned caveat phrasing ("one thing I didn't do", "just a heads up", ...) — fix it instead of mentioning it. | | 2. Auto-implement | Trivial fixes and fixes that block the task from actually working land before you say "done" — no permission-asking. | | 3. Stay in scope | Auto-fixes are limited to the blast radius of the current task. Anything bigger still gets surfaced, plainly. | | 4. Log every auto-fix | Every rule-2 fix calls token_phish_blocker_log with a one-line description — mandatory, and it's the audit trail. |

Full text: docs/POLICY.md.

The audit trail

Every auto-fix appends a tab-separated line to ~/.pi/agent/token-phish-blocker.log:

ISO-timestamp<TAB>cwd<TAB>description

Example:

2026-08-12T03:14:07.221Z	/home/user/projects/api	added missing null check in parseConfig() that would have crashed on empty input

The status line

The moment a session starts, the footer shows the counter at zero — that's your proof the policy is injected and active:

🎣 TPB · 0 fixes

Each token_phish_blocker_log call ticks it up live, so by the end of a session you can see exactly how many caveats became fixes instead:

🎣 TPB · 3 fixes

| Situation | What you see | | --- | --- | | Fresh session | 🎣 TPB · 0 fixes — policy injected, nothing logged yet | | After auto-fixes | 🎣 TPB · N fixes, updating the moment each fix lands | | Headless (pi -p "...") | No status line — the audit log still gets every entry | | TPB_NO_STATUS=1 | Counter hidden — policy and audit log keep working |

Nothing to install or configure — the status-line helper ships inside the extension and registers itself on session start.

Customizing the policy

Copy docs/POLICY.md to ~/.pi/agent/token-phish-blocker-policy.md and edit it. The override file replaces the built-in policy verbatim. Delete it to fall back to the built-in policy.

FAQ

Does it work in omp? Yes — omp install npm:token-phish-blocker.

Does it phone home? No. Zero network calls, zero runtime dependencies. The only writes are to the local log file.

How do I turn it off? pi remove npm:token-phish-blocker, or disable it per-project via pi config.

How do I hide the status counter? Set TPB_NO_STATUS=1 in your environment. The policy injection and audit log keep working.


MIT © getdatasurge · issues