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

oafish

v0.3.0

Published

Output compression for AI coding agents

Downloads

44

Readme

oafish

Output compression for AI coding agents. Same answer, fewer tokens.


Before

"Sure! I'd be happy to help you with that. The issue you're experiencing is likely caused by a missing null check in the authentication middleware. What's happening is that when the token is undefined, the code attempts to call .split() on it, which throws a TypeError. You'll want to add a guard before that line."

After (/oafish)

"Auth middleware: token undefined → .split() throws. Add null guard before line 42."

~75% fewer output tokens. Full accuracy.


Install

curl -fsSL https://oafish.bitclaw.com/install | bash

Detects which agents are installed and wires up each one automatically.

| Agent | Install method | Auto-activates | |---|---|---| | Claude Code | Plugin (hooks + skill) | Yes — every session | | Cursor | .cursor/rules/oafish.md | Yes | | Windsurf | .windsurf/rules/oafish.md | Yes | | Cline | .clinerules/oafish.md | Yes | | GitHub Copilot | .github/copilot-instructions.md | Yes | | opencode | ~/.config/opencode/AGENTS.md | Yes | | Gemini CLI | GEMINI.md | Yes | | Codex / Roo / Amp / Goose | npx skills add bitclaw/oafish | On invoke |

Or copy rules/oafish.md manually into any agent's rules directory.


Usage

/oafish           activate (full mode)
/oafish lite      professional tight — keeps full sentences
/oafish ultra     maximum compression — arrows, abbreviations
stop oafish       deactivate
normal mode      deactivate

Mode persists across turns. No drift. Deactivates only on explicit command.


Intensity levels

| Level | What changes | Example | |---|---|---| | lite | No filler/hedging. Full sentences. | "Your component re-renders because you create a new object reference each render." | | full | Drop articles, fragments OK. | "New object ref each render. Inline prop = re-render. Wrap in useMemo." | | ultra | Abbreviations, arrows for causality. | "Inline prop → new ref → re-render. useMemo." |

Auto-clarity: oafish suspends for security warnings, destructive operations, and anywhere compression risks misread. Resumes after.


How it works

For Claude Code, oafish installs three hooks:

  • SessionStart (activate) — injects compression rules at session open, writes active mode to ~/.config/oafish/.active
  • UserPromptSubmit (tracker) — handles /oafish commands, reinforces mode each turn
  • PostToolUse (compress) — digests verbose Read/Bash/MCP outputs before they fill context

The compress hook is the high-leverage part: large file reads and bash output can consume thousands of context tokens per call. oafish intercepts them and injects a terse digest instead:

[oafish] Read: auth.ts — 312L | ts | fns: login, logout, validateToken, refreshSession
[oafish] Bash: npm test — 47 passing, 2 failing: auth.test.ts:88, user.test.ts:112

For file-based agents (Cursor, Windsurf, etc.), the rules file is written directly — no hooks, same compression behavior via prompt rules.


Benchmarks

Benchmarks measure token reduction against a live model.

export ANTHROPIC_API_KEY=sk-...   # or add to .env.local
uv run benchmarks/run.py

See CONTRIBUTING.md for prerequisites.


Build from source

Requires Bun.

bun install
bun run build       # compiles hooks/src/*.ts → hooks/dist/*.js

Hook source is TypeScript (hooks/src/). Compiled JS is committed to hooks/dist/ so installs require no build step on the user's machine.


License

MIT