ai-dev-operating-system: Skill for Claude Code

.claude/skills/cost-watchdog/SKILL.md

cost-watchdog is a skill for Claude Code from lglucas/ai-dev-operating-system. It costs 104 tokens per session (755 once invoked), scanned A, original, MIT.

A checklist for spotting potentially costly technical choices before they are implemented. It covers AI models, paid hosting tiers, metered third-party services, and database patterns that may become expensive as usage grows.

In plain words
What is it for?
Use it before adding a paid or usage-based service, upgrading a hosting tier, choosing an AI model, or introducing patterns such as repeated polling, unbounded retries, N+1 queries, or full-table scans.
Why use it?
It helps reveal recurring charges and scaling risks while a design is still easy to change. It is intended for prevention, rather than tracking spending after launch.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

This is lglucas/ai-dev-operating-system's own configuration. It tells Claude Code how to work on ai-dev-operating-system 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 ai-dev-operating-system configures →

Part of the ai-dev-operating-system plugin — 28 skills, 11 commands, 12 agents, 1 hook shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to lglucas/ai-dev-operating-system. 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/lglucas/ai-dev-operating-system/main/.claude/skills/cost-watchdog/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lglucas/ai-dev-operating-system

Made for: Claude Code.

Or install ai-dev-operating-system, the plugin that ships this one along with the rest of its 28 skills, 11 commands, 12 agents, 1 hook.

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-watchdog

README.md
[![agentmods](https://agentmods.dev/badge/skills/lglucas/ai-dev-operating-system/cost-watchdog/github.svg)](https://agentmods.dev/skills/lglucas/ai-dev-operating-system/cost-watchdog)
Your own site
<a href="https://agentmods.dev/skills/lglucas/ai-dev-operating-system/cost-watchdog"><img src="https://agentmods.dev/badge/skills/lglucas/ai-dev-operating-system/cost-watchdog/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-watchdog

Your own site · 80×15
<a href="https://agentmods.dev/skills/lglucas/ai-dev-operating-system/cost-watchdog"><img src="https://agentmods.dev/badge/skills/lglucas/ai-dev-operating-system/cost-watchdog.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 755 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.
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.00104 $0.00755
Opus 5 $0.00052 $0.00378
Sonnet 5 $0.00021 $0.00151
Haiku 4.5 $0.00010 $0.00076

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

Security

Grade A, and why

cost-watchdog 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 10d 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.

.claude/skills/cost-watchdog/SKILL.md · 64 lines

How it starts

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

Cost Watchdog

When to run this skill

  • Before introducing any third-party service (LLM provider, DB, queue, monitoring, search, image, email).
  • Before suggesting a paid tier of any service the user is currently on free tier of.
  • When proposing model selection (Claude Opus vs Sonnet vs Haiku, GPT-4 vs 4o-mini, etc.).
  • When implementing patterns that scale poorly: N+1 queries, polling loops, full-text scans, unbounded retries.
  • When the user says "está caro" / "está cobrando demais" / "fiquei sem créditos".

Cost flags to watch

LLM costs

  • Default to Claude Haiku 4.5 or Sonnet 4.6 for routine work. Use Opus only for tasks that justify it (deep reasoning, business strategy, architecture).
  • Always cache prompts that have a stable system prefix (saves up to 90% of input tokens).
  • Loops are dangerous. If a feature calls the LLM in a loop, calculate worst case before shipping.
  • Streaming + early termination when user might stop reading.

Hosting

  • Vercel Hobby (free) is fine until ~100 users. Pro ($20/mo) only when you hit limits.
  • Supabase Free tier: 500 MB DB, 1 GB storage, 50K monthly active users. Plenty for prototypes.
  • Don't enable database point-in-time recovery before paying users exist.

Database patterns

  • Unbounded SELECT without pagination → flag.
  • Realtime subscriptions on noisy tables → flag.
  • Full-table scans in serverless functions → flag (cold-start tax + bandwidth).

Third-party services

  • Stripe: percentage-based, no flag below revenue.
  • Resend: 3K emails/month free. Flag transactional volume design.
  • PostHog free tier: 1M events/mo. Flag if event firing in loops.
  • Sentry free: 5K errors/mo. Flag noisy retry catch blocks.

Vibe coder explanation

Cloud services are like a cab meter. Some run flat-rate (you pay even idle), some run per-trip (per request), some are free up to a limit then suddenly expensive. Before you ship, I'll show you which meter is running and what the worst-case bill looks like if your idea goes viral.

Read the full file on GitHub · 64 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. 10d ago First seen · 64 lines · 104 tokens per session scan A 3bd82e33c7f8

Subscribe to this mod's changes

cost-watchdog is a skill published in the GitHub repository lglucas/ai-dev-operating-system (11 stars, last pushed 1mo ago), licensed MIT. It adds 104 tokens to every session and 755 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

daily-market-review

A daily review workflow for China’s A-share stock market. It combines index prices, limit-up data, sector money flows, and market sentiment—investor optimism or fear—to assess the day and possible future directions.

huangrichao2020/pretty-skills · 116 tokens

portfolio-diagnosis

A diagnosis process for Chinese stock portfolios that combines the holdings, current market prices, industry information, recent events, money flows, and market sentiment. It can use a screenshot, text list, or spoken description of the holdings.

huangrichao2020/pretty-skills · 115 tokens

capital-injection-bank-insurance

A research and monitoring guide for capital injections, share offerings, and other capital-raising events at Chinese banks and insurance companies. It explains why these events happen, who funds them, and how they affect regulatory capital.

huangrichao2020/pretty-skills · 31 tokens

next-round-baotuan

A framework for studying periods when investors concentrate around the same stocks or market theme, and for watching for signs that this concentration may break down. It combines market conditions, industry trends, policy, valuation, and warning indicators.

huangrichao2020/pretty-skills · 149 tokens

serenity-stock-choke

A stock-screening workflow for China’s A-share market, based on supply-chain bottlenecks. A bottleneck is a part, material, or process that can stop a larger industry if its supply is interrupted.

huangrichao2020/pretty-skills · 210 tokens

german-elster-tax-filing

Use this skill to run a complete intake for a german personal income tax return in elster for tax years 2024 onward, estimate the tax result, and map the final values into the correct official forms and fields.

jawwadfirdousi/agent-skills · 123 tokens