Skip to main content
skill CX Codex

slo-check — Claude Code skill for SLO checks

Turns Agent Monitor events into an SLO scorecard for session completion, tool calls, and API errors. Use it to compare results with targets and track remaining error budget.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill slo-check -a claude-code
Open on GitHub

What slo-check does

The skill calculates three indicators from Agent Monitor: the share of completed sessions, tool success rate, and API error rate. It compares each result with its target. The defaults are at least 95% completion, at least 99% tool success, and no more than 1% errors. Open sessions are left out of the completion-rate denominator.

It marks each objective as met or breached, then calculates how much error budget remains. For a breach, it can inspect sessions that contributed most, using GET /api/events?session_id=X. It only reads API data. If curl cannot reach http://localhost:4820, start the dashboard with npm start from the repository root.

Pass custom targets such as completion=95 success=99 error=1, or limit the reporting period with last 7d or today. The Agent Monitor API must be reachable for the skill to calculate these metrics.

What it helps with

  • compare session metrics against SLO targets
  • calculate remaining error budget for each objective
  • identify sessions driving an SLO breach
  • limit a report to a chosen time window

Example prompts for the agent

  • Check whether our session completion, tool success, and error rates meet their SLOs.
  • Compare Agent Monitor results with completion=95 success=99 error=1.
  • Report SLOs for last 7d and identify sessions contributing most to any breach.

How to install slo-check

1Skills CLI (Vercel)

npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill slo-check -a claude-code

2Manually: put the files in place

~/.claude/skills/slo-check/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/slo-check/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about slo-check

How do I install slo-check in Claude Code?

Run npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill slo-check -a claude-code. The skill file is located at ~/.claude/skills/slo-check/SKILL.md.

What does slo-check do?

It calculates session completion, tool success, and API error rates from Agent Monitor data, then checks them against SLO targets and reports the remaining error budget. It can also trace breached objectives to contributing sessions.

Can I set custom targets or a reporting window?

Yes. Pass targets such as completion=95 success=99 error=1, or use a period like last 7d or today. Without custom targets, the skill uses 95% completion, 99% tool success, and a 1% error rate.

Source text

SKILL.md · MIT
---
name: slo-check
description: >
  Define and check simple service-level objectives for Claude Code from Agent
  Monitor data — session completion rate, tool success rate
  (PostToolUse/PreToolUse), and error rate (APIError/total) — then compare each
  to its target and report the error budget remaining. Use when reporting
  reliability or when someone asks "are we meeting our SLOs?".
---

# SLO Check

Turn raw event counts into a clear SLO scorecard with error-budget accounting.

## Input

The user provides: **$ARGUMENTS**

This may be:
- empty — use the default SLO targets below over all available data
- targets like "completion=95 success=99 error=1" — override the defaults (percentages)
- a window like "last 7d" or "today" — restrict the measurement period

Default SLO targets: completion rate ≥ 95%, tool success rate ≥ 99%, error rate ≤ 1%.

## Data Sources

| Endpoint | Returns |
|----------|---------|
| `GET /api/analytics` | `event_types` (PreToolUse, PostToolUse, APIError counts), `sessions_by_status`, `daily_events` (365d), `daily_sessions` (365d) — the raw numerators/denominators for every SLI |
| `GET /api/stats` | `total_sessions`, `total_events`, `events_today`, `sessions_by_status` — fleet totals and recency |
| `GET /api/events?session_id=X` | Per-session stream — drill into the sessions that breach an SLO |

## Report Sections

### 1. Service Level Indicators (SLIs)
Compute each SLI from `GET /api/analytics` / `GET /api/stats`:
- **Completion rate** = completed sessions / total sessions (from `sessions_by_status`; count `active`/`running` as in-flight, exclude them from the denominator if still open).
- **Tool success rate** = `PostToolUse / PreToolUse` (capped at 100%).
- **Error rate** = `APIError / total_events`.
Within a window, derive the numerators/denominators from `daily_events` / `daily_sessions`.

### 2. SLO Scorecard
For each SLI, compare to its target and mark MET ✅ or BREACHED ❌.

### 3. Error Budget
For each objective, report the **error budget** and how much remains:
- Budget = `1 − target` (e.g., 1% for a 99% target).
- For "higher-is-better" SLOs (completion, success): remaining = `(observed − target) / (1 − target)`.
- For "lower-is-better" SLOs (error rate): remaining = `(target − observed) / target`.
- A negative result means the budget is exhausted — report how far over (e.g., "2.7× over budget").

### 4. Breach Drill-Down
For any breached SLO, list the sessions contributing most to the breach (most failed tools or most APIErrors) via `GET /api/events?session_id=X`.

## Output

- A Markdown scorecard table: SLI | observed | target | status | error budget remaining.
- Rates as percentages to 2 decimals; any currency in USD to 4 decimals.
- Cite exact counts and `session_id` values — never fabricate numerators or denominators.
- End with the SLO most at risk and the single action that would recover the most budget.
- Read-only: only report what the API returns. If `curl` cannot reach `http://localhost:4820`, tell the user to start the dashboard with `npm start` from the repo root.

© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar skills

SKILL.md skills catalog →

From the same set60

workflow-report Creates workflow intelligence reports from CCAM orchestration and delegation data. Surfaces tool bottlenecks, concurrency, and context compaction. CX Codex +1 ★ 1,121repo stars reliability-report This skill reviews CCAM session outcomes, hook events, alerts, and tool failures to produce a reliability report. Use it for health reviews or incident follow-up. CX Codex +1 ★ 1,121repo stars executive-report Turns CCAM sessions, analytics, cost and alerts into one stakeholder report. Handy before a release or a leadership update. CX Codex +1 ★ 1,121repo stars cost-report Generates scoped CCAM token and spend reports by model, provider, source, and session. Useful for tracking agent costs and spotting unpriced usage. CX Codex +1 ★ 1,121repo stars regression-alert Compares agent reliability this period against the last one and flags where it got worse. Handy when you need to know if things degraded. CX Codex +1 ★ 1,121repo stars hook-failure-audit Audits hook delivery health using Agent Monitor metrics, tracking unreturned tool calls, unclosed subagents, and stalled ingestion pipelines. CX Codex +1 ★ 1,121repo stars error-scan Scans recent Claude Code sessions for API errors and unfinished tool calls, then ranks failures by tool and model. Useful when you need to see what is breaking. CX Codex +1 ★ 1,121repo stars api-error-report Turns Agent Monitor data into a report on APIError events: how many, in which sessions and models, and what likely caused them. CX Codex +1 ★ 1,121repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor