agentleFS
lglucaslglucas/ai-dev-operating-system/.claude/skills/usage-monitor/SKILL.md

usage-monitor

Skill12 starsChanged 49 days agoMITView on GitHub

Track real-world usage and cost across LLM providers, hosting, DB, and email after a feature ships or a launch happens. Complements `cost-watchdog` (preventive). Triggers when the user says "tô gastando muito", "quanto custa", "quanto deu de fatura", or after launch.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a feature that calls a metered service ships.

    line 13
  2. Distinctive:

    When a billing alert fires.

    line 14
  3. Very specific:

    If the user hasn't connected a usage API: "para automatizar, preciso da chave read-only da [provider].

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Usage Monitor

When to run this skill

  • 24h after a public launch.
  • Weekly during the first month after launch.
  • Whenever the user asks "quanto tá custando" / "tô gastando muito" / "como tá a fatura".
  • After a feature that calls a metered service ships.
  • When a billing alert fires.

Dashboard format

📊 Usage & cost — last 7 days

🤖 LLM (Anthropic):
   Input tokens:        1.2M (R$ 9.00)
   Output tokens:       340K (R$ 17.00)
   Cache reads:         800K (R$ 0.60)
   Total:               R$ 26.60
   Per active user:     R$ 0.27
   ⚠️  Up 340% vs prev week — investigate.

☁️  Hosting (Vercel):
   Bandwidth:           4.2 GB / 100 GB free
   Function invocations: 22K / 100K free
   Status:              🟢 within free tier

🗄️  Database (Supabase):
   DB size:             142 MB / 500 MB free
   Active users (mau):  18 / 50K free
   Status:              🟢 within free tier

✉️  Email (Resend):
   Sent:                240 / 3000 free
   Status:              🟢 within free tier

💰 Total billable this week: R$ 26.60
🔮 Projected month: R$ 114

Sources of truth

  • Anthropic: Console → Billing → Usage. API: /v1/organizations/usage_report.
  • Vercel: Dashboard → Usage tab.
  • Supabase: Dashboard → Project Settings → Usage.
  • Resend: Dashboard → Logs.
  • Stripe: Dashboard → Reports.

If the user hasn't connected a usage API: "para automatizar, preciso da chave read-only da [provider]. Sem ela, eu te lembro de checar manualmente toda segunda."

Triggers for action

SinalAção recomendada
LLM custo / usuário ativo > R$ 1Revisar prompts, considerar Haiku, ativar cache.
Bandwidth > 70% do free tierAuditar imagens grandes, downloads.
DB > 70% do free tierAuditar tabelas grandes, archive.
Spike > 200% week-over-weekInvestigar imediatamente — provável loop / abuse.
Erro de cobrança / cartão recusadoAvisar usuário no chat.

Vibe coder explanation

Imagina que cada serviço que você usa tem um relógio rodando. Toda semana eu olho os relógios pra você e falo: "tudo OK", "tá perto do limite", ou "tem algo estranho". Você não precisa entrar em 5 dashboards.

Output cadence

  • Weekly: 5-line summary in chat.
  • On spike: same-day alert with the cause.
  • Monthly: file session-log/YYYY-MM-cost-review.md with totals + top 3 levers to reduce.

Relationship to cost-watchdog

  • cost-watchdog = preventive (before code ships).
  • usage-monitor = reactive (after code is in production).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.