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

@statforge/claudestat-alert-slack

v0.1.0

Published

Slack alerting for @statforge/claudestat — quota, loops, and cost alerts via Incoming Webhook.

Readme

claudestat-alert-slack

Slack alerting for @statforge/claudestat — sends quota, loop, and cost alerts to Slack via Incoming Webhook.

Install

npm install -g @statforge/claudestat-alert-slack

Quick start

# 1. Create a Slack Incoming Webhook: https://api.slack.com/messaging/webhooks
# 2. Ensure claudestat daemon is running
claudestat start

# 3. Start the alerter
claudestat-alert-slack --webhook-url https://hooks.slack.com/services/...

Or use an env var:

export CLAUDESTAT_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
claudestat-alert-slack

Alerts (4)

| Alert | Condition | Message | |---|---|---| | Quota cycle high | computeQuota().cyclePct >= 85 | ⚠️ Quota Cycle at {pct}%+ with token usage and reset countdown | | Loops detected | Latest session has loops_detected > 0 | 🔄 Loops Detected with session ID, loop count, efficiency | | High-cost session | Latest session cost ≥ --session-cost-threshold (default $5) | 💰 High-Cost Session with session ID and cost | | Shutdown | SIGTERM/SIGINT received | claudestat-alert-slack stopped with uptime |

CLI flags

claudestat-alert-slack [options]

Required:
  -w, --webhook-url <url>             Slack Incoming Webhook URL

Options:
  -i, --interval <seconds>            Poll interval (default: 60)
  -d, --dedup-minutes <number>        Dedup window (default: 30, 0 = disabled)
  -s, --session-cost-threshold <usd>  Cost alert threshold (default: 5)
  --state-file <path>                 State file (default: ~/.claudestat-slack-state.json)
  --dry-run                           Print alerts to stdout (no Slack POST)
  --throw-on-no-daemon                Exit 1 if daemon unreachable on first poll
  --quiet-shutdown                    No shutdown notification
  -v, --version                       Show version
  -h, --help                          Show help

Dedup

Alerts are deduplicated within a configurable window (default 30 min). State persists to ~/.claudestat-slack-state.json across restarts, so you won't get spammed with the same alert after a process restart.

Use --dedup-minutes 0 to disable dedup (useful for testing with --dry-run).

Dry run

claudestat-alert-slack --webhook-url https://hooks.slack.com/test --dry-run --interval 10 --dedup-minutes 0

Prints formatted Slack messages to stdout without sending anything.

Requirements

  • Node.js >= 22 (for node:sqlite in claudestat)
  • @statforge/claudestat daemon running (claudestat start)
  • Slack Incoming Webhook URL

License

MIT