Tooluck logoTooluck
SKILL.md

cost-alert

Agent skill fromhoangsonww/Claude-Code-Agent-Monitor

Review the configured cost alert rules and the alerts currently fired on the Agent Monitor dashboard, then explain exactly what tripped and why. Uses /api/alerts (fired feed) and /api/alerts/rules (definitions). Use when checking spend alerts or asking why a cost alarm went off.

How to install cost-alert

install cost-alert
# install the Claude-Code-Agent-Monitor pack with the skills CLI
npx skills add hoangsonww/Claude-Code-Agent-Monitor

# or add only this skill to Claude Code: copy the folder

plugins/ccam-cost-guard/skills/cost-alert/

# into

~/.claude/skills/cost-alert/ (all projects)

.claude/skills/cost-alert/ (one project)

plugins/ccam-cost-guard/skills/cost-alert/SKILL.md

MITFull file
1# Cost Alert
2
3Audit the spend guardrails: which rules exist, which have fired, and what tripped them.
4
5## Input
6
7The user provides: **$ARGUMENTS**
8
9This may be empty (review everything), `"unacked"` (only unacknowledged alerts),
10or a rule name to focus on.
11
12## Data Sources
13
14| Endpoint | Returns |
15|----------|---------|
16| `GET /api/alerts/rules` | `{ rules: [{ id, name, rule_type, config, enabled, cooldown_seconds }] }` — the guardrail definitions |
17| `GET /api/alerts` | `{ alerts: [{ id, rule_id, rule_name, rule_type, session_id, agent_id, message, details, triggered_at, acked }], total, unacked, limit, offset }` — the fired-alert feed, newest first. `?unacked=true` filters to unacknowledged |
18
19## What the rule types mean
20
21| `rule_type` | `config` | Fires when |
22|-------------|----------|------------|
23| `token_threshold` | `{ total_tokens }` | A session's cumulative tokens (input + output + cache_read + cache_write) cross the ceiling — the spend-relevant guardrail |
24| `event_pattern` | `{ event_type?, tool_name?, summary_contains?, count?, window_minutes? }` | Matching events reach `count` within the window |
25| `inactivity` | `{ minutes }` | An active session goes quiet for `minutes` |
26| `status_duration` | `{ status, minutes }` | An agent is stuck in `working`/`waiting` for `minutes` |
27…

Excerpt shown under the repository's MIT license.

More skills in Claude-Code-Agent-Monitor

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates