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-forensics

v1.0.2

Published

Agent Cost Observability — Analyze Claude Code session logs to find token waste, calculate costs, and get actionable optimization recommendations.

Readme

agent-forensics

Agent Cost Observability for Claude Code. Analyze session logs to find token waste, calculate costs, and get actionable optimization recommendations.

Install

npx agent-forensics analyze <path>

Or install globally:

npm install -g agent-forensics

Usage

Basic analysis

npx agent-forensics analyze ~/.claude/projects/my-project/

Scans for .jsonl session logs and prints a cost breakdown with token usage, model distribution, tool usage, and hot turns.

Full analysis

npx agent-forensics analyze ~/.claude/projects/my-project/ --full

Includes everything in basic, plus:

  • Waste patterns — redundant file reads, debug loops, context bloat, expensive model misuse, verbose output, sub-agent sprawl
  • Recommendations — actionable changes to CLAUDE.md and .claudeignore
  • Savings estimates — projected per-session and monthly savings

JSON output

npx agent-forensics analyze session.jsonl --json

Outputs raw JSON for piping into other tools or dashboards.

What it detects

| Pattern | Severity | Description | |---------|----------|-------------| | Redundant file reads | Medium | Same file read 3+ times in a session | | Debug loops | High | 5+ consecutive Bash calls (retry loops) | | Context bloat | Medium | Low cache read:create ratio | | Expensive model misuse | High | Opus used for simple single-tool operations | | Verbose output | Low | Turns with >4K output tokens | | Sub-agent sprawl | Medium | 10+ sub-agents spawned in one session |

API Access

For programmatic access, use the hosted API:

POST https://api.agentsconsultants.com/api/analyze
Content-Type: application/json

{ "content": "<jsonl-content>", "tier": "full" }

Pricing

  • CLI: Free and open source (MIT)
  • API Basic: $0.05/analysis
  • API Full: $5.00/analysis

Privacy

All analysis is done in-memory. No session data is stored or logged, locally or via the API.

License

MIT