boxel: Skill for Claude Code

.claude/skills/client-perf-diagnosis/SKILL.md

client-perf-diagnosis is a skill for Claude Code from cardstack/boxel. It costs 595 tokens per session (10,588 once invoked), scanned A, original, MIT.

A guide for diagnosing slow or freezing browser sessions from the host application's performance telemetry. The telemetry records browser events, sends them to the server, and makes them available as structured logs and Grafana dashboards.

In plain words
What is it for?
Use it to investigate slow card loads, server requests, deserialization, browser freezes, rebuilds, and client errors.
Why use it?
A vague report such as "the app was slow" does not show what happened or which account and browser session were affected. The recorded events help reconstruct the sequence of client-side work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is cardstack/boxel's own configuration. It tells Claude Code how to work on boxel 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 boxel configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/apply.sh --env local.

Reuse

Borrowing it

Nothing to install: this file belongs to cardstack/boxel. 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/cardstack/boxel/main/.claude/skills/client-perf-diagnosis/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/cardstack/boxel

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 client-perf-diagnosis

README.md
[![agentmods](https://agentmods.dev/badge/skills/cardstack/boxel/client-perf-diagnosis/github.svg)](https://agentmods.dev/skills/cardstack/boxel/client-perf-diagnosis)
Your own site
<a href="https://agentmods.dev/skills/cardstack/boxel/client-perf-diagnosis"><img src="https://agentmods.dev/badge/skills/cardstack/boxel/client-perf-diagnosis/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 client-perf-diagnosis

Your own site · 80×15
<a href="https://agentmods.dev/skills/cardstack/boxel/client-perf-diagnosis"><img src="https://agentmods.dev/badge/skills/cardstack/boxel/client-perf-diagnosis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 595 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,588 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00595 $0.10588
Opus 5.5 $0.00238 $0.04235
Sonnet 5.5 $0.00119 $0.02118
Haiku 4.5 $0.00060 $0.01059

Measured 5d ago against content hash b15d147b605c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

client-perf-diagnosis 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 5d 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.

host instrument → fetch(keepalive) POST /_client-telemetry → one `boxel:client-perf`
.claude/skills/client-perf-diagnosis/SKILL.md · 357 lines

How it starts

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

Client performance diagnosis

The host runs an always-on, passive client performance instrument. It samples the main thread and hooks the client's own server interactions, batches what it sees into a bounded ring buffer, and beacons the batch to the realm-server's POST /_client-telemetry route. The route re-emits one structured JSON log line per event on the boxel:client-perf channel; alloy tails the realm-server's stdout into Loki, and the "Host App Client Performance" Grafana dashboard (uid boxel-client-perf) — the host app is the instrumented client; boxel-cli and other API clients do not beacon — reads those lines with | json.

This is the tool for turning a vague field complaint — "the app was slow loading my card", "my tab froze" — into a measured story attributed to a specific account. Every event carries the authenticated matrix_user_id and a per-tab session_id, so you can start from who and reconstruct what their browser was doing.

The pipeline

host instrument  →  fetch(keepalive) POST /_client-telemetry  →  one `boxel:client-perf`
JSON log line per event  →  alloy tails realm-server stdout  →  Loki  →  Grafana `| json`

Nothing about this is a separate data store: it rides the same log pipeline every realm-server log already uses. A client event is just a realm-server log line with a known shape.

What gets measured, and how often

The instrument gathers at each signal's natural cadence, decoupled from how often it talks to the network:

  • The main thread is probed by a ~100ms heartbeat; long-animation-frame (LoAF) / longtask observers fire as the browser reports them; the JS self-profiler (on sampled sessions) samples continuously; the event hooks (card-load, server-request, deserialize, rebuild, realm-event) record at the instant each occurs; uncaught exceptions and unhandled rejections are captured as they surface, coalesced by signature so a loop reports a count rather than a flood.
  • Those samples accumulate in a ring buffer that a separate ~1s flush loop batches and POSTs at most once per second, and only when the batch carries signal. An otherwise-quiet tab still beacons a compact keepalive on a fixed cadence, so an active session_id is visible even when nothing is wrong.

Read the full file on GitHub · 357 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. 5d ago First seen · 357 lines · 595 tokens per session scan A b15d147b605c

Subscribe to this mod's changes

client-perf-diagnosis is a skill published in the GitHub repository cardstack/boxel (27 stars, last pushed today), licensed MIT. It adds 595 tokens to every session and 10,588 once invoked, about $0.0024 per session on Opus 5.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-10-21.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

cwv-optimizer

Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages. Goes deeper than generic CWV advice by understanding EDS-specific performance patterns including the 100KB LCP budget, E-L-D loading phases, block rendering behavior, and third-party script impact. Produces specific fixes for LCP, CLS, and…

adobe/skills · 112 tokens

incident-response-incident-response

Coordinate production incident triage, mitigation, investigation, recovery, and follow-up. Use when responding to outages or other incidents that require structured operational coordination.

rmyndharis/antigravity-skills · 36 tokens

ci-fixer

CI failures - read error, minimal fix, verify.

sipyourdrink-ltd/bernstein · 15 tokens