cost-alert

cost-alert is a skill for Claude Code, Codex from hoangsonww/Claude-Code-Agent-Monitor. It costs 63 tokens per session (786 once invoked), scanned A, original, MIT.

A skill that reviews spending alert rules and the alerts those rules have triggered in the Agent Monitor dashboard.

In plain words
What is it for?
Use it to inspect enabled rules, review fired alerts, filter to alerts not yet acknowledged, and see the session or agent involved.
Why use it?
It explains which spending or activity condition caused an alert, so you can understand the warning instead of guessing.

Skill for Claude CodeCodex

Written for Claude Code and Codex: $ARGUMENTS substitution, but also agents/openai.yaml present.

Part of the ccam-cost-guard plugin — 5 skills, 3 commands, 1 agent shipped together

Good fit Use it to inspect enabled rules, review fired alerts, filter to alerts not yet acknowledged, and see the session or agent involved.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hoangsonww/claude-code-agent-monitor/cost-alert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill cost-alert
Clone the repo
git clone --depth 1 https://github.com/hoangsonww/Claude-Code-Agent-Monitor

Made for: Claude Code, Codex.

Or install ccam-cost-guard, the plugin that ships this one along with the rest of its 5 skills, 3 commands, 1 agent.

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 cost-alert

README.md
[![agentmods](https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/cost-alert/github.svg)](https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/cost-alert)
Your own site
<a href="https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/cost-alert"><img src="https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/cost-alert/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 cost-alert

Your own site · 80×15
<a href="https://agentmods.dev/skills/hoangsonww/claude-code-agent-monitor/cost-alert"><img src="https://agentmods.dev/badge/skills/hoangsonww/claude-code-agent-monitor/cost-alert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 786 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00063 $0.00786
Opus 5 $0.00032 $0.00393
Sonnet 5 $0.00013 $0.00157
Haiku 4.5 $0.00006 $0.00079

Measured 13d ago against content hash d4b015e991b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cost-alert 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 13d 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.

plugins/ccam-cost-guard/skills/cost-alert/SKILL.md · 56 lines

How it starts

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

Cost Alert

Audit the spend guardrails: which rules exist, which have fired, and what tripped them.

Input

The user provides: $ARGUMENTS

This may be empty (review everything), "unacked" (only unacknowledged alerts), or a rule name to focus on.

Data Sources

Endpoint Returns
GET /api/alerts/rules { rules: [{ id, name, rule_type, config, enabled, cooldown_seconds }] } — the guardrail definitions
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

What the rule types mean

rule_type config Fires when
token_threshold { total_tokens } A session's cumulative tokens (input + output + cache_read + cache_write) cross the ceiling — the spend-relevant guardrail
event_pattern { event_type?, tool_name?, summary_contains?, count?, window_minutes? } Matching events reach count within the window
inactivity { minutes } An active session goes quiet for minutes
status_duration { status, minutes } An agent is stuck in working/waiting for minutes

For cost work, focus on token_threshold. Translate its token ceiling to dollars using the blended rate from /api/pricing/cost (total_cost / total_tokens) so the user sees the alarm in money terms.

Report Sections

1. Configured guardrails

Table from /api/alerts/rules: name, type, the human-readable threshold (e.g. token_threshold → 12,500,000 tokens ≈ $50.0000), enabled state, cooldown. Flag rules that are disabled or have no spend-relevant guardrail at all.

2. Fired alerts

Table from /api/alerts: rule name, triggered_at, scope (session/agent id), acked, and the message. Lead with the unacked count. Honor "unacked" input by querying ?unacked=true.

Read the full file on GitHub · 56 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 13d ago First seen · 56 lines · 63 tokens per session scan A d4b015e991b4

Subscribe to this mod's changes

cost-alert is a skill published in the GitHub repository hoangsonww/Claude-Code-Agent-Monitor (991 stars, last pushed 4d ago), licensed MIT. It adds 63 tokens to every session and 786 once invoked, about $0.0003 per session on Opus 5. 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.