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

agent-hygiene

v0.1.1

Published

Scan your agent setup, score it against 20 proven token/cost-reduction techniques, and optionally apply fixes.

Readme

agent-hygiene CLI

Your agents are dirty, inefficient, and wasting resources.

Clean your agents -> Improve your habits -> Save the world 🌍

LeanMaxxing Leaderboard soon?

Quick Start

npx agent-hygiene

Let agents help you clean w/ exact prompts.

Example Output

What It Checks

22 checks across four categories. Auto checks read your config files. Session checks analyze real usage via AgentsView. Advisory checks are habit reminders.

Context Efficiency (35% of score)

| Check | Tier | What it catches | |---|---|---| | .claudeignore coverage | Auto | Build artifacts flooding context | | CLAUDE.md size | Auto | System prompt over 80 lines | | AGENTS.md size | Auto | Codex instructions over 80 lines | | Rules verbosity | Auto | CLAUDE.md/AGENTS.md written with bulleted bloat and filler | | Skills vs fat CLAUDE.md | Auto | Domain knowledge crammed into CLAUDE.md instead of skills | | MCP tool search deferral | Auto | All MCP tools loaded upfront instead of deferred | | Context window pressure | Session | Peak session exceeding 100K tokens |

Cost Optimization (30% of score)

| Check | Tier | What it catches | |---|---|---| | Autocompact threshold | Auto | No compaction until context is already huge | | Subagent model override | Auto | Subagents running on Opus instead of Haiku | | Default model selection | Auto | Opus set as default model | | Opus model overuse | Session | >40% of tokens going to the priciest model | | Prompt cache efficiency | Session | <30% cache hit rate | | Subagent cost efficiency | Session | Subagents burning Opus tokens |

Structure (20% of score)

| Check | Tier | What it catches | |---|---|---| | Path-scoped rules | Auto | No .claude/rules/ directory | | Settings JSON schema | Auto | Missing $schema in settings.json | | Merge tiny rule files | Auto | Too many small rule files that should be combined | | Codex configuration | Auto | Missing or misconfigured Codex setup |

Habits (15% of score)

| Check | Tier | What it catches | |---|---|---| | /clear between tasks | Advisory | Context bleeding between unrelated tasks | | /btw for side questions | Advisory | Breaking flow for quick lookups | | Default effort level | Advisory | Running at max effort when low/medium works | | Delegate to subagents | Advisory | Doing research in the main thread | | Plan mode for complex work | Advisory | Jumping into multi-file changes without /plan |

All 18 agent-CLI techniques documented here: docs/techniques/. Techniques for direct API/SDK use live under docs/api-direct-usage-techniques/.

Features

  • scan - letter grade (A+ to F) with category breakdown and per-check details
  • scan --fix - auto-fix failing checks where possible
  • snapshot save/compare - before/after baselines with cost deltas
  • track - token usage trends, model cost breakdown, cache hit rates (via AgentsView)
  • profile - all-time stats and blind spots (checks that have never passed)
  • history - rolling score history with sparkline
  • export - anonymized JSON for leaderboard sharing (shipping soon)
  • badge - shields.io-style SVG for your repo

CI Integration

Want to use Agent Hygiene in a GitHub Action? See an untested example in action.yml.

AgentsView Integration

4 of the 22 checks (the Session tier) rely on real token usage data from your agent sessions. AgentsView provides that data- it reads your local agent logs and calculates per-session costs, model breakdowns, and cache hit rates without sending anything off your machine.

Without AgentsView installed, those 4 checks get skipped and you'll see a notice in the scan output.

To install:

curl -fsSL https://agentsview.io/install.sh | bash

On Windows:

powershell -ExecutionPolicy ByPass -c "irm https://agentsview.io/install.ps1 | iex"

Once installed, run agent-hygiene scan again and the Session checks (Opus overuse, context bloat, cache miss rate, session length, subagent cost) will light up.

LeanMaxxing Leaderboard (coming soon)

TokenMaxxers can't have all the fun.

Agents Supported

Claude Code, Codex

Want to add checks for Cursor, Windsurf, Copilot, or another agent? There's a step-by-step prompt that walks your AI through the entire process- discovery, checks, tests, and docs. See contrib/add-agent-checks/PROMPT.md.

References

  • Thanks to @atre for the inspiration and the original techniques behind this project. Read his article: Claude Code in Production
  • Thanks to @tkmx for the inspiration for the leaderboard.

License

MIT - Copyright (c) 2026 Patrick Gallagher