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 kensaurus/cursor-kenji --skill plan-llm-cost-guardrailsgit clone --depth 1 https://github.com/kensaurus/cursor-kenjiWrote 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/kensaurus/cursor-kenji/plan-llm-cost-guardrails)<a href="https://agentmods.dev/skills/kensaurus/cursor-kenji/plan-llm-cost-guardrails"><img src="https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/plan-llm-cost-guardrails/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/kensaurus/cursor-kenji/plan-llm-cost-guardrails"><img src="https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/plan-llm-cost-guardrails.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00078 | $0.01796 |
| Opus 5.5 | $0.00031 | $0.00718 |
| Sonnet 5.5 | $0.00016 | $0.00359 |
| Haiku 4.5 | $0.00008 | $0.00180 |
Grade A, and why
plan-llm-cost-guardrails 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 2mo 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 — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LLM Cost-Guardrail Audit + Remediation Plan
Degree of freedom: HIGH — inventory call sites, score unbounded paths, plan. Stay plan-only. No limits or routing changes until approved.
This skill vs neighbors
| Skill | Owns |
|---|---|
| plan-llm-cost-guardrails (this) | Token / quota / runaway-loop plan |
audit-langfuse-llm |
Quality and cost traces |
audit-infra-cost |
Hosting / egress bill |
audit-llm-security |
Unbounded consumption as an attack |
How to reason (every plan item)
- Propose — token cap, kill switch, breaker, or fallback
- Risk — worst-case spend × who can reach the path
- Keep-working — call sites that already bound tokens and account usage
- Phase — caps → breakers → fallback → visibility (do not execute)
Worked example
Propose: per-user daily token cap + hard daily-spend kill switch on
lib/ai.ts. Risk: public/api/chatcan replay a 50K context until the bill dies; RPM-only does not count. Keep-working: summarizer path already setsmax_tokens. Phase: Phase 1 — caps & kill switch.
Role: Senior platform engineer (LLM spend + abuse resistance).
Task: Inventory every LLM call site, test against the 3-layer guardrail model,
score unbounded paths, phase remediations, emit plan-llm-cost-guardrails.md.
Audit & plan only — no limits or routing changes until approved.
Find every path to a runaway bill. Cap it. Change nothing until approved.
Token cost scales with input + output tokens, not request count — a single
50K-token context replayed three times can exhaust a budget while staying under any
RPM cap. Vibe-coded AI features ship with no spend cap, no per-user quota, no
max_tokens, no circuit breaker — compounded by prompt-injection cost amplification
and forged-webhook quota fraud (the empty-signing-secret bypass class).
This is the prevention counterpart to Langfuse observability: Langfuse tells you what spend happened; this audits what's capped.
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.
- 2mo ago First seen · 170 lines · 78 tokens per session scan A d9276e9aca1c
plan-llm-cost-guardrails is a skill published in the GitHub repository kensaurus/cursor-kenji (9 stars, last pushed 2mo ago), licensed MIT. It adds 78 tokens to every session and 1,796 once invoked, about $0.0003 per session on Opus 5.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-09-03.
plan-llm-cost-guardrails compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| plan-llm-cost-guardrailskensaurus/cursor-kenji | Skill | 9 | 2mo ago | MIT | A | 78 | Claude Code |
| ai-evals-builderluisabwk/kraken | Skill | 2 | 8mo ago | none | A | 72 | Cursor |
| firebase-aievanca/flutter-ai-rules | Skill | 677 | 19d ago | MIT | A | 30 | Claude Code |
| ai-cost-guardtimurgaleev/vibestack | Skill | 8 | 20d ago | MIT | A | 28 | Claude Code |
| code-review-codexjaansokk/cursor_tools | Skill | 1 | 11d ago | MIT | A | 45 | Claude Code |
| yt-transcriptjaansokk/cursor_tools | Skill | 1 | 11d ago | MIT | A | 104 | Claude Code |
| ui-designjaansokk/cursor_tools | Skill | 1 | 11d ago | MIT | A | 50 | Codex |