Agent skill · data analytics · jeremylongshore

clade-observability

Monitor Claude API calls \u2014 log tokens, latency, costs, errors,\

Why this skill is useful

Adds specific logging patterns and metrics for monitoring Claude API usage that the AI wouldn't reliably generate on its own.

What it needs

Requires @claude-ai/sdk installed locally. Requires anthropic account access. About 2k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Anthropic Observability Overview Every messages.create call should be instrumented. Track tokens, latency, cost, model, and errors. Logging Wrapper Key Metrics to Track Metric Source Alert Threshold -------- -------- ---------------- Error rate error logs > 5% over 5 minutes p95 latency durationms > 10s (Sonnet) Daily cost estimatedcost sum > 2x daily average 429 rate errortype = ratelimit > 10/minute 529 rate errortype = overloaded > 5/minute Token usage inputtokens + outputtokens > daily budget Anthropic Console Monitoring Usage dashboard: console.anthropic.com → Usage Spending limits: console.anthropic.com → Settings → Limits API logs: Not available via API — use your own logging Output Every Claude API call logged with tokens, latency, cost estimate, and model Error calls logged with request ID, status code, and error type Metrics dashboarded: error rate, p95 latency, daily cost, 429/529 rates Spending alerts configured in Anthropic console Error Handling Error Cause Solution ------- ------- ---------- API Error Check error type and status code See clade-common-errors Examples See Logging Wrapper with trackedCreate(), estimateCost() function, Key Metrics table with alert thresholds, and Anthropic Console Monitoring section above. Resources Usage Dashboard Rate Limits Next Steps See clade-incident-runbook for when things go wrong. Prerequisites Completed clade-install-auth Logging infrastructure (console, structured logs, or observability platform) Production Claude integration to monitor Instructions Step 1: Review the patterns below Each section contains production-ready code examples. Copy and adapt them to your use case. Step 2: Apply to your codebase Integrate the patterns that match your requirements. Test each change individually. Step 3: Verify Run your test suite to confirm the integration works correctly.

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/clade-observability--e0d9a4

View the source on GitHub

Browse the @skills marketplace