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.
npx skills add RBraga01/builder-ai --skill ai-cost-auditgit clone --depth 1 https://github.com/RBraga01/builder-aiWrote 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.
[](https://agentmods.dev/skills/rbraga01/builder-ai/ai-cost-audit)<a href="https://agentmods.dev/skills/rbraga01/builder-ai/ai-cost-audit"><img src="https://agentmods.dev/badge/skills/rbraga01/builder-ai/ai-cost-audit/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.
<a href="https://agentmods.dev/skills/rbraga01/builder-ai/ai-cost-audit"><img src="https://agentmods.dev/badge/skills/rbraga01/builder-ai/ai-cost-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.01508 |
| Opus 5 | $0.00024 | $0.00754 |
| Sonnet 5 | $0.00010 | $0.00302 |
| Haiku 4.5 | $0.00005 | $0.00151 |
Grade A, and why
ai-cost-audit 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.
How it starts
The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Cost Audit
The Law
EVERY LLM FEATURE HAS A COST TRAJECTORY. DISCOVER IT BEFORE 10× SCALE DISCOVERS YOU.
"It's cheap enough now" is a claim about current volume, not future volume.
"The API has reasonable pricing" is not a projection.
Token counts + call volume + cost at 10× scale IS a cost audit.
When to Use
Trigger:
- Before launching any LLM feature (pre-launch projection)
- When monthly API bill increased > 20% with no obvious cause
- Before scaling a feature to a new user segment
- Before committing to a model or provider for a high-volume use case
When NOT to Use
- Internal one-off scripts or developer tools with < 50 calls/day — cost is negligible; write the call, move on
- Features still in prototype where the call structure will change significantly before launch — audit after the design stabilises
- When total monthly API cost is guaranteed < $50 regardless of 10× scale — skip the audit, check the bill quarterly
The Process
Step 1 — Count Tokens Precisely
Do not estimate. Count:
import tiktoken
enc = tiktoken.get_encoding("cl100k_base") # cl100k for GPT/Claude
def count_tokens(text: str) -> int:
return len(enc.encode(text))
# Measure each segment separately
print("System prompt:", count_tokens(system_prompt))
print("Avg context:", count_tokens(avg_context_sample))
print("Avg user message:", count_tokens(avg_user_message_sample))
print("Avg output:", count_tokens(avg_output_sample))
Get real samples from logs or representative test data — not the "hello world" example.
Step 2 — Measure Call Volume
Calls per user session: N
Sessions per day: M
Background/batch calls per day: K
Retry rate: R% (from logs or estimate)
Total calls per day: (N × M) + K × (1 + R/100)
Step 3 — Calculate Current Cost
COST_PER_1K_INPUT = 0.003 # $/1k tokens — replace with actual model pricing
COST_PER_1K_OUTPUT = 0.015
def cost_per_call(input_tokens, output_tokens):
return (input_tokens / 1000 * COST_PER_1K_INPUT
+ output_tokens / 1000 * COST_PER_1K_OUTPUT)
daily_cost = cost_per_call(avg_input, avg_output) * calls_per_day
monthly_cost = daily_cost * 30
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.
- 10d ago First seen · 177 lines · 49 tokens per session scan A 546159c02475
ai-cost-audit is a skill published in the GitHub repository RBraga01/builder-ai (2 stars, last pushed 3d ago), licensed MIT. It adds 49 tokens to every session and 1,508 once invoked, about $0.0002 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-31.
Other skills, from other repositories
ai-engineering-toolkit
6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.
prompt-master
Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…
flux2-lora-training
Plan or review LoRA and edit-training work specifically for FLUX.2 Klein or Qwen-Image-Edit, including paired datasets, trainer-version contracts, and held-out fidelity checks. Do not use for generic Stable Diffusion/DiT training, prompt authoring, or model serving; route those tasks to their specialized skill.
vlm-segmentation
Choose and evaluate VLM or segmentation pipelines, including text-conditioned detection, masks, part labels, model-license constraints, and measured GPU deployment choices. Use when a task has a VLM or segmentation component; route pure diffusion prompting, training, or serving to its specialized skill.
deepseek-provider-contract
Validate a proposed DeepSeek API integration before any key or project context is sent: check thinking-mode tool-call history, strict-schema assumptions, bounded output, and provider data boundaries. Use when integrating DeepSeek, adding DeepSeek tool calls or streaming, debugging DeepSeek 400 after a tool call, or…
forensic-prompt-compiler
Forensic image-to-prompt compiler for image generation models. Use this skill whenever the user wants to: convert/describe an existing image into a generation prompt, reconstruct a scene as a prompt, generate prompts from reference images for AI image tools (Midjourney, FLUX, Stable Diffusion, DALL-E, or any diffusion…