cc-monitor-worker

skill
Security Audit
Warn
Health Pass
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 18 GitHub stars
Code Warn
  • network request — Outbound network request in src/proxy.ts
Permissions Pass
  • Permissions — No dangerous permissions requested
Purpose
This tool monitors Claude Code usage by deploying a serverless proxy to Cloudflare Workers. It captures API activity and logs it to the Workers Analytics Engine for SQL-based analytics.

Security Assessment
The tool operates as a lightweight API gateway or OpenTelemetry endpoint, meaning it directly intercepts and handles sensitive API keys and usage data. It makes legitimate outbound network requests (`src/proxy.ts`) to forward traffic to the Anthropic API. There are no hardcoded secrets or dangerous execution permissions. The README explicitly requires implementing Bearer token authentication to secure the deployed endpoint, though the security of your data ultimately depends on how well you configure and protect your own Cloudflare account secrets. Overall risk is rated as Medium due to the sensitive nature of the data (API keys and usage context) passing through the proxy.

Quality Assessment
The project appears healthy and actively maintained, with repository updates pushed as recently as today. It uses the permissive MIT license, includes a clear description, and has detailed documentation for multiple setup methods. Community trust is currently modest at 18 GitHub stars, suggesting it is an early-stage or niche project rather than a widely battle-tested tool.

Verdict
Use with caution — the code itself is transparent and safe, but self-hosting a gateway that intercepts sensitive API traffic requires careful configuration and a secure Cloudflare environment.
SUMMARY

Claude Code monitoring with Cloudflare Workers & Workers Analytics Engine

README.md

Claude Code Monitoring w/ Cloudflare Workers

Monitor your Claude Code usage with Cloudflare Workers and Workers Analytics Engine.

  • Public, Secure endpoint
  • Powerful analytics via SQL
  • Truly Serverless, zero-maintenance

One-click deployment with

Deploy to Cloudflare

Two-modes of Monitoring

There are two option to monitoring your Claude Code usage:

  1. Using OpenTelemetry
  2. Using LLM Gateway

Each has its own needs and pros and cons. You should choose an option based on your needs.

Monitoring via OpenTelemetry

This is officially supported, and recommended way to monitor Claude Code usage.

Claude exports precise activities and use cases into a defined metrics schema. It includes all the context for analyzing costs, productivity, and usage patterns.

However, Claude Code's OTEL integration is not durable. A lot of data will not being collected. It's better suited for tracking trends rather than accurate usage data.

See README_OTEL for more details.

Monitoring via API Proxy

Claude Code also allow to use a custom LLM gateway.

Implementing an LLM gateway allows you to intercept all requests to Claude Code and calculate exact API costs. It can be used to monitor other coding agents such as OpenCode as well.

However, API requests don't include the context of the Claude Code application, making it difficult to analyze accurate usage patterns.

See README_PROXY for more details.

Data Retention

Cloudflare Analytics Engine only stores data for the past three months.

To analyze older data, you must archive it separately.

Security

The endpoint uses Bearer token authentication:

  • Development: Set AUTH_SECRET in .dev.vars
  • Production: Use wrangler secret put AUTH_SECRET

Use strong, randomly generated secrets and rotate secrets regularly.

License

MIT

Reviews (0)

No results found