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

@promptster/cc-audit

v0.5.0

Published

Audit Claude Code (and other agent) usage from local transcripts: spend attribution, model right-sizing, and AI-fluency signals.

Readme

npx @promptster/cc-audit

That's it. No install, no API key, no signup. It reads your local Claude Code history (~/.claude/projects) and shows you spend by model, the fixable waste (context you paid to carry that a /compact or /clear would have shed), what your always-on config costs every turn, and AI-fluency signals like plan-mode rate.

Built by Promptster — we measure and level up AI-engineering fluency across whole teams. cc-audit is the local, open-source slice of that, for your own machine. More below ↓


Quick start

# one-off — nothing to install
npx @promptster/cc-audit

# use it regularly? install it
npm i -g @promptster/cc-audit && cc-audit

Prefer a single self-contained executable (no Node)? Grab a pre-built binary for macOS (arm64 / x64) or Linux (x64) from the latest release — or build your own with npm run bundle (via bun).

What it finds

  • 💸 Spend, attributed$/mo by model, your most expensive sessions, and cost broken down per prompt when a session actually did two different things.
  • Fixable waste, first — the avoidable carry: context held past the ~160K /compact line, and task-switches a /clear would have reset. Real dollars, billed only above a conservative line — never a fabricated "all carry is waste" number.
  • Always-on context tax — what your CLAUDE.md, memory, skills, plugins, and MCP servers cost you every turn. Useful ≠ free.
  • 🧭 AI-fluency signals — plan-mode rate, prompts-per-session, command/skill leak, subagent spend, and a skill/MCP ROI ledger (what's earning its keep vs. dead weight).
  • 🎚️ Model right-sizing (opt-in --judge) — which premium-model tasks a cheaper tier would have nailed. The frontier-vs-cheap call stays your policy; this just prices it.

Usage

npx @promptster/cc-audit                 # local audit (default)
npx @promptster/cc-audit --judge         # + hosted right-sizing analysis
npx @promptster/cc-audit --open          # + shareable public web report
npx @promptster/cc-audit --json          # machine-readable, local-only unless a flag is given

| Flag | What it does | | --- | --- | | --since-days N | Only look at the last N days. | | --root DIR | Point at a transcript root other than ~/.claude/projects. | | --rows N | How many rows to show in the leaderboards. | | --aggressiveness conservative\|balanced\|aggressive | How eagerly to flag over-modeled tasks as cuts (default balanced). | | --judge | Hosted right-sizing — sends task gists + metadata, never code. | | --open | Upload the privacy-safe aggregate and open a shareable web report. | | --json | Print the aggregate record as JSON (always local-only, pure stdout). |

cc-audit label   [--n 50]  # judge real sessions → a sheet you hand-label
cc-audit score   <file>    # score your labels vs. the judge (precision/recall)
cc-audit fix               # turn recommendations into reviewable patches (never auto-applied)

What leaves your machine

By default: nothing. The audit runs fully local — no network, no key. Two optional steps upload data, and each asks first, gated proportional to what leaves:

| Tier | Trigger | What's sent | | --- | --- | --- | | 0 — local read | first run | Sticky one-time ack. Reads ~/.claude/projects. Nothing leaves. | | 1 — right-sizing | --judge | Each task's gist + metadata (model, token counts, turn shape) to the hosted model. Never your code, prompts, file paths, or repo names. | | 2 — shareable report | --open | The privacy-safe aggregate (shares and counts — never raw $ or code) to a public link. Defaults to No, re-confirmed each run. |

--json and any non-TTY run are strictly non-interactive: only an explicit --judge/--open sends anything, so CI stays local. A random anonymous machine ID (a hash, not your hostname) is minted for dedup only if you share a report.

How it works

The deterministic half — parse → attribute → report — runs entirely on your machine. Egress is a separate, opt-in tier that only fires on an explicit flag:

                    ┌──────────── LOCAL · deterministic · no network, no key ─────────────┐
  ~/.claude/        │                                                                     │
   projects   ───▶  │   adapter ─▶ model ─▶ attribute ─▶ ┬─ fluency ────────┐             │
  (your             │  (claudeCode)  (Session/  (spend    ├─ alwaysOn ───────┼─▶ report    │
   transcripts)     │                 Span)     by model) └─ contextHygiene ─┘   (TUI)     │
                    └─────────────────────────────────────┬───────────────────────────────┘
                                                          │
                                       opt-in · consent-gated ▼
                            --judge ─▶ right-sizing     task gists + metadata ─▶ hosted model
                            --open  ─▶ shareable report privacy-safe aggregate ─▶ public link

| Stage | Modules | | --- | --- | | Ingest | adapters/claudeCode.tsmodel.ts (Session/Span). Tool-agnostic, so Codex/Cursor adapters can drop in later. | | Analyze (local) | attribute.ts, pricing.ts + vendor/ (cost tables), fluency.ts / alwaysOn.ts / contextHygiene.ts, tied together by audit.ts into an AuditResult; aggregate.ts is the privacy-safe record. | | Render | report.ts + theme.ts (the only module that knows ANSI). | | Egress (opt-in) | judgeClient.ts (--judge), open.ts (--open), fixClient.ts / fix.ts (cc-audit fix). All behind consent.ts. |

The core principle, preserved by design: no code path phones home on a bare or non-interactive run.

Not the assessment CLI

This is not @promptster/cli (bin: promptster), which candidates use to run Promptster hiring assessments. cc-audit audits your own Claude Code spend and fluency. Different command, different job — you can have both installed without conflict.

Contributing

npm install
npm run build      # tsc → dist/
npm test           # vitest
npm run lint       # oxlint
node dist/cli.js   # run it locally

Pricing tables live in src/vendor/ (a hand-copied mirror — see MAINTAINING.md). Issues and PRs welcome.

💼 Built by Promptster

cc-audit is the open-source, local slice of what Promptster does for engineering organizations: measure how fluently a team actually wields AI — spend, waste, and skill — and turn that into a level-up plan. If the numbers this tool surfaces for you are interesting, they're a lot more interesting across a whole team.

See Promptster for teams →

License

MIT