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

cc-agent-monitor

v0.2.2

Published

Analyze Claude Code subagent token usage and visualize agent chain trees from transcript JSONL

Readme

cc-agent-monitor

Claude Code subagent monitoring.

npm version License: MIT Node.js

English | 한국어


What Is This

Tracks how many subagents spawn per session, what they do, and how many tokens they use.

  • Real-time statusline — view directly in the statusline, no separate window needed.
  • One-command setupcc-agent-monitor init registers hooks and config automatically.
  • No dependencies — no external packages.

Quick Start

npm install -g cc-agent-monitor
cc-agent-monitor --init

init registers the hooks and creates a config file. That's it. You can also run npx cc-agent-monitor --init.

Use --skip-init to skip the interactive setup and use all defaults.

After init, start Claude Code and the statusline appears automatically each session.

Configuration

cc-agent-monitor config          # Show current config
cc-agent-monitor config --reset  # Reset to defaults

| Setting | Default | Description | |---------|---------|-------------| | liveColor | neon-cycle | LIVE indicator color | | mainColor | orange | Main session color | | staleThresholdMs | 900000 | Stale threshold (15 min) | | rows.value | 5 | Max visible statusline rows |

How It Works

After setup, this table shows up at the bottom of your terminal:

✦ Agents ────────────────────────────────────────────────────
│ Status       │ Agent    │ Task                     │ Used  │
├──────────────┼──────────┼──────────────────────────┼───────┤
│ ◉ LIVE       │ main     │ (general-purpose) impl…  │ ----  │
│ ◉ LIVE       │ main     │ (Explore) find config…   │ ----  │
│ ◉ done(31s)  │ main     │ (Plan) design approach   │ ~12k  │
│ ● LIVE       │ reviewer │ code review task-001     │ ----  │
└──────────────┴──────────┴──────────────────────────┴───────┘

| Column | Meaning | |--------|---------| | Status | ◉ LIVE active built-in / ● LIVE active custom / done(Ns) completed / ⚠ stale no update | | Agent | main = built-in types / custom name for user-defined agents | | Task | (type) description for built-in / description for custom | | Used | Token count. ---- = running (tokens show on completion) |

Three moving parts.

  1. Hooks fire on agent lifecycle events. SubagentStart, SubagentStop, PostToolUse, Stop.
  2. State files collect per-agent records. ~/.cc-agent-monitor/state/{sessionId}/
  3. Statusline reads them and draws the table.

Limitations

  • Running agents show ---- for tokens. Numbers appear when all tasks complete. (anthropics/claude-code#43456)
  • Compacted sessions — token data tracking may be affected.
  • Teammate/swarm — different lifecycle, not tracked.

Requirements

  • Node.js 18+
  • Claude Code with hook support
  • Tested on Windows PowerShell + Claude Code CLI only. macOS/Linux and VS Code extension not yet tested.

License

MIT