agentrium: Command for Claude Code

.claude/commands/errors.md

errors is a command for Claude Code from talayash/agentrium. It costs 0 tokens per session (1,547 once invoked), scanned A, original, MIT.

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

Written for Claude Code: $ARGUMENTS substitution.

This is talayash/agentrium's own configuration. It tells Claude Code how to work on agentrium itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentrium configures →

Reuse

Borrowing it

Nothing to install: this file belongs to talayash/agentrium. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/talayash/agentrium/master/.claude/commands/errors.md
Clone the repo
git clone --depth 1 https://github.com/talayash/agentrium

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 errors

README.md
[![agentmods](https://agentmods.dev/badge/commands/talayash/agentrium/errors/github.svg)](https://agentmods.dev/commands/talayash/agentrium/errors)
Your own site
<a href="https://agentmods.dev/commands/talayash/agentrium/errors"><img src="https://agentmods.dev/badge/commands/talayash/agentrium/errors/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for errors

Your own site · 80×15
<a href="https://agentmods.dev/commands/talayash/agentrium/errors"><img src="https://agentmods.dev/badge/commands/talayash/agentrium/errors.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.01547
Opus 5.5 $0.00000 $0.00619
Sonnet 5.5 $0.00000 $0.00309
Haiku 4.5 $0.00000 $0.00155

Measured 1mo ago against content hash 3b32b48fd72f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (46 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.