errors

An error-report retrieval command for reading end-user exceptions collected by a Cloudflare Worker in a D1 database. It groups reports from Rust crashes, Rust commands, and the frontend over a selected period of up to 90 days.

In plain words
What is it for?
Use it to retrieve and summarize errors from the last 1 to 90 days, using a supplied number of days or the default seven-day window.
Why use it?
It turns stored technical error records into a readable summary so developers can see what users are experiencing without inspecting the database directly.

Command for 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 commands/talayash/agentrium/errors
Clone the repo
git clone --depth 1 https://github.com/talayash/agentrium

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,547 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 $0.00000 $0.01547
Opus 5 $0.00000 $0.00773
Sonnet 5 $0.00000 $0.00309
Haiku 4.5 $0.00000 $0.00155

Measured 2d ago against content hash 3b32b48fd72f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

errors scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/errors.md · 124 lines

How it starts

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

Retrieve end-user error reports from ct-analytics

You are pulling end-user error/exception reports stored by the ct-analytics Cloudflare Worker (D1 table errors) and writing a human-readable summary inline. Errors are populated by POST /error_report from three sources: rust_panic, rust_command, frontend. Retention is 90 days.

Arguments

$ARGUMENTS - Window in days (e.g. 1, 7, 30). Plain integer or with trailing d (e.g. 7d). Defaults to 7 if empty. Clamped to [1, 90].

Step 1: Resolve the window

  1. Parse $ARGUMENTS. Strip a trailing d if present. Coerce to integer. If empty or invalid, use 7.
  2. Clamp to [1, 90].
  3. Tell the user the resolved window (e.g. "Pulling errors for the last 7 days...").

Step 2: Try the Worker endpoint first (preferred)

  1. Resolve the stats token, in this order:
    • $env:CT_STATS_TOKEN if set
    • Otherwise, retrieve STATS_TOKEN from your auto-memory at ct_analytics_tokens.md (memory type reference, slug ct-analytics-tokens). Do not print the token to the user or include it in any saved file.
  2. If a token is available, call:
    GET https://ct-analytics.claude-terminal.workers.dev/errors/summary?days={N}&limit=20
    Header: x-ct-token: {STATS_TOKEN}
    
    On Windows PowerShell, use Invoke-RestMethod with -Headers @{ 'x-ct-token' = $token } and capture to a variable; do not echo the token.
  3. If the request returns HTTP 200 with JSON, parse it and skip to Step 4.
  4. If the request returns 404 (endpoint not deployed yet), tell the user the Worker needs a one-time deploy and offer to run it:
    Run from workers/ct-analytics/: npx wrangler deploy
    
    Ask before running. If they decline, fall through to Step 3.
  5. If the request fails for any other reason (no token, non-2xx, network error), fall through to Step 3.

Step 3: Fallback - query D1 directly via wrangler

Run wrangler from workers/ct-analytics/ against the production D1 (--remote). Use --json so the output is parseable. Run all queries; capture stdout per query.

Read the full file on GitHub · 124 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. 2d ago First seen · 124 lines · 0 tokens per session scan A 3b32b48fd72f

Subscribe to this mod's changes

errors is a command published in the GitHub repository talayash/agentrium (39 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,547 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.