cc-metrics CLAUDE.md

cc-metrics CLAUDE.md is an instructions file for Claude Code from lasswellt/cc-metrics. It costs 4,657 tokens per session, scanned A, original, MIT.

Project instructions for a dashboard that records Claude Code usage through OpenTelemetry, a standard way to send application measurements, stores them in RethinkDB, and displays them in a web interface.

In plain words
What is it for?
Use it to run the dashboard, initialize or troubleshoot its database, inspect incoming metrics, recalculate statistics, and test changes.
Why use it?
It collects the project’s startup, database, testing, and metrics-checking commands in one place so contributors can develop and verify the dashboard consistently.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; positional $N argument; mentions Claude Code.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/lasswellt/cc-metrics/claude-md
Clone the repo
git clone --depth 1 https://github.com/lasswellt/cc-metrics

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cc-metrics CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lasswellt/cc-metrics/claude-md.svg)](https://agentmods.dev/instructions/lasswellt/cc-metrics/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/lasswellt/cc-metrics/claude-md"><img src="https://agentmods.dev/badge/instructions/lasswellt/cc-metrics/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,657 This file is loaded in full into every session.
When invoked 4,657 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.04657 $0.04657
Opus 5 $0.02329 $0.02329
Sonnet 5 $0.00931 $0.00931
Haiku 4.5 $0.00466 $0.00466

Measured 6d ago against content hash 48e3b160d562, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

cc-metrics CLAUDE.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:4318/api/debug/metrics # View raw metrics
CLAUDE.md · 564 lines

How it starts

The opening of the file, as written. The whole thing — 564 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Claude Code Metrics Dashboard is a Node.js application that monitors Claude Code usage via OpenTelemetry Protocol (OTLP). It receives telemetry data from Claude Code, stores it in RethinkDB, and displays real-time metrics through a web dashboard.

Essential Commands

Development

npm start                # Start the dashboard server
npm run dev             # Same as start (alias)
npm run debug           # Start with DEBUG=true for verbose logging
npm run recalc-stats    # Recalculate aggregated stats from sessions

Database Setup

npm run setup           # Initialize RethinkDB database schema
                        # (Runs automatically on first server start)

Note: Database setup happens automatically when you first start the server. The npm run setup command is useful for:

  • Manual initialization before starting the server
  • Troubleshooting database issues
  • CI/CD pipelines
  • Verifying database connectivity

Testing

Test the OTLP endpoint manually:

curl http://localhost:4318/api/debug/metrics              # View raw metrics
curl http://localhost:4318/api/debug/stats-comparison    # Compare session totals vs aggregated stats

Database

rethinkdb --http-port 8081               # Start RethinkDB server (web UI on port 8081)
docker run -d --name rethinkdb \        # Run RethinkDB in Docker
  -p 28015:28015 -p 8081:8080 rethinkdb

Git Workflow

CRITICAL: The main branch is protected. Always create a feature branch for your work.

Branch Management Rules

  1. Always create a new branch for each session/task

    git checkout -b feature/descriptive-name
    # Example: feature/add-cost-tracking
    # Example: fix/metrics-aggregation-bug
    
  2. Branch naming conventions:

    • feature/ - New features or enhancements
    • fix/ - Bug fixes
    • refactor/ - Code refactoring
    • docs/ - Documentation updates
    • test/ - Test additions or updates

Read the full file on GitHub · 564 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 564 lines · 4,657 tokens per session scan A 48e3b160d562

Subscribe to this mod's changes

cc-metrics CLAUDE.md is an instructions file published in the GitHub repository lasswellt/cc-metrics (10 stars, last pushed 6mo ago), licensed MIT. It adds 4,657 tokens to every session, about $0.0233 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

Vibe-Research AGENTS.md

AGENTS.md instructions for simonlin1212/Vibe-Research, covering vibe-research-agent 金融研究宪法, 0. 三条不可越线, 1. 数据纪律(五问 gate:给出任何数字或结论前逐条自问), 2. 研究哲学(评估框架,不是预测工具) and 3. 估值口径(你只选输入、解释输出;计算交给 calc/).

simonlin1212/Vibe-Research · 4,469 tokens

worldmonitor AGENTS.md

AGENTS.md instructions for koala73/worldmonitor, covering agents.md, task mode and authority, start here, surface routing and architecture invariants.

koala73/worldmonitor · 2,568 tokens

vizro copilot-instructions.md

Copilot instructions for mckinsey/vizro, covering github copilot instructions for vizro, pull requests from bots and automated tooling and everything else.

mckinsey/vizro · 332 tokens

openclaw-dashboard CLAUDE.md

Claude Code instructions for mudrii/openclaw-dashboard, covering go development standards, project constraints, internal packages, environment and commands.

mudrii/openclaw-dashboard · 1,519 tokens

metabase copilot-instructions.md

Copilot instructions for metabase/metabase, covering metabase developer assistant instructions, code review standards, security critical issues, performance red flags and code quality essentials.

metabase/metabase · 377 tokens

clawmetry AGENTS.md

AGENTS.md instructions for vivekchand/clawmetry, covering agents.md — for ai coding agents, quick context, where new code goes (open-core split), the rules that bite and common tasks.

vivekchand/clawmetry · 1,608 tokens