cost-guardrail
LLM and cloud cost awareness — model tiering, token budgets, right-sizing, and when a cheaper model suffices.
Skill by jpantsjoha
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jpantsjoha-cost-guardrail
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cost-guardrail
What's inside
- Skill name
cost-guardrail- Description
- LLM and cloud cost awareness — model tiering, token budgets, right-sizing, and when a cheaper model suffices. Trigger before finalising any architecture that calls LLMs, before scaling a workload, or when a cost estimate is needed.
- License
- Apache-2.0
- Instructions
- 82 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- model-routing.md · references/
SKILL.md (first lines)
# Cost Guardrail > **The most expensive model is the one running on every request when it does not need to.** LLM cost is not a finance problem — it is an architecture problem. The design determines the bill. This skill enforces cost-awareness as a first-class design constraint, not an afterthought. ## When to use - Designing any system that calls an LLM (directly or via an agent) - Before scaling a workload to higher volumes - When a cost estimate is required for a feature or release - When reviewing an architecture for unbounded cost vectors - When choosing between model tiers for a given task ## Procedure 1. **Identify every LLM call in the system** — list: which agent or component makes the call, the model tier used, the approximate input and output token counts, and the call frequency (per user action / per minute / per batch). 2. **Apply the model tiering test** — for each LLM call, ask: - Does this task require deep reasoning, or is it classification / extraction / reformatting? - Can the task be completed with a smaller or faster model? - Is the model tier choice based on evidence (benchmark, A/B test) or assumption? Starting hypotheses only (verify current pricing and qualify each task family before relying on them): | Task type | Appropriate tier | |---|---| | Simple classification, extraction, summarisation | Small / fast model | | Complex reasoning, multi-step planning, code generation | Mid-tier model | | Deep analysis, architecture decisions, adversarial review | Highest-tier model | A short ticket or one-file change does not qualify a cheap model. Require independent acceptance, preserve consequence floors, count failed attempts and bound escalation. Use the project's explicitly adopted routing mode; the [routing guide](references/model-routing.md) is not automatic consumer activation. Model/effort changes require a fresh baseline. 3. **Identify unbounded cost vectors** — flag any call pattern where the token count or call volume has no upper bound: - Loops that call an LLM until a condition is met (with no max-iteration guard) - User-triggered calls with no rate limiting - Context windows that grow unboundedly across a conversation - Batch jobs with no per-run budget ceiling 4. **Estimate the monthly cost envelope** — for each LLM call: ``` estimated monthly cost ≈ (input tokens × input price) + (output tokens × output price) × calls/month ``` Use current published rates from your provider. Do not use rates from training data — they change. 5. **Add cost controls** — for each unbounded vector: - Set a max-token budget per call (trim context if needed) - Add rate limiting at the application layer - Add a budget alert at the infrastructure layer - Consider caching repeated calls with identical or near-identical inputs 6. **Check for caching opportunities** — LLM calls that return the same result for the same input are cacheable. Prompt caching (where supported by the provider) can reduce cost significantly on repeated prefixes. 7. **Document the cost model** — in the ADR or design doc, record: model tiers chosen, rationale, estimated monthly cost at target scale, and the controls in place. ## Outputs - LLM call inventory: component | model tier | input tokens (est.) | output tokens (est.) | frequency | monthly cost (est.) - Unbounded cost vectors flagged with mitigations - Monthly cost estimate at target scale - Recommended model tier per call with rationale ## Guardrails - **Never use pricing from training data.** Rates change. Fetch current rates from the provider's documentation before estimating. - **A call that "works" at low volume may be unaffordable at scale.** Always estimate at the target scale, not the current scale. - **Caching is not optional for high-frequency repeated calls.** An uncached LLM call repeated thousands of times per day is a design flaw. - **Token budgets are architecture decisions.** Decide them explicitly; do not let the model decide by consuming whatever context is available. ## Anti-rationalization table | Excuse | Counter | |---|---| | "It's only a few cents per call" | At scale, cents become thousands of dollars. Estimate the monthly envelope. | | "We'll optimise later" | Cost optimisation is hardest after the architecture is set. Do it now. | | "The big model gives better results" | Verify with a test. Small models are often sufficient for structured tasks. | | "We don't know the volume yet" | Estimate a range. A 10x cost swing between low and high volume is a design risk. |
From jpantsjoha/ai-native-developer-experience, Apache-2.0.
More from jpantsjoha/ai-native-developer-experience
- 0.641score
using-the-harness
jpantsjoha
Session-start orientation for this team harness.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
cloud-expert
jpantsjoha
Cloud guardrails for any vendor workload — Google Cloud (GCP, Vertex AI, GKE), AWS (IAM, EKS, Bedrock), Azure (Entra ID, Policy, AKS), Alibaba Cloud (RAM…
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
operating-model-bootstrap
jpantsjoha
Bootstrap or harden a project's operating model for mixed human and AI delivery teams.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
pr-reviewer
jpantsjoha
Review gate for correctness, reuse, and simplification.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
cloud-checkup
jpantsjoha
Read-only SRE checkup of any GCP project: deterministic probes of the edge, Cloud Run services, 7-day error logs, Cloud Scheduler, alert policies and uptime…
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
system-performance-guardrail
jpantsjoha
Measure, root-cause, fix, verify and record performance contention on a developer machine: cloud-sync daemons (iCloud Drive, OneDrive, Dropbox, Google Drive)…
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
frontend-performance-audit
jpantsjoha
Measure real frontend performance — Core Web Vitals (LCP, CLS, INP), page-load traces, CPU and network throttling, Lighthouse accessibility/SEO scores, and…
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
get-it-done
jpantsjoha
Pursue an agreed goal to a working outcome without waiting: decompose it, re-prioritise as evidence arrives, branch, gate, get an independent review (a…
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
github-manager
jpantsjoha
Use when configuring or optimising GitHub repositories for cost-effective, consistent operations — CI triggers, Actions billing, issue tracking, labelling…
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
mcp-server-scaffold
jpantsjoha
Scaffold and govern an MCP server as a bounded tool seam.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
spec-first-delivery
jpantsjoha
Force plan, HLD, ADRs, and constraints to exist BEFORE any code is generated.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
sitrep
jpantsjoha
Synthesise a status, standup, or situation-report from current work state.
SkillAFreshness: A★ 13Claude Code +9
Signals
- Stars
- 13
- Forks
- 4
- Open issues
- 2
- Last commit (this folder)
- Oct 16, 2026 (12 days ago)
- Last release
- Oct 16, 2026 (12 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Website
- jpantsjoha.com
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jpantsjoha
- 0.641score
pr-reviewer
jpantsjoha
Review gate for correctness, reuse, and simplification.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
system-performance-guardrail
jpantsjoha
Measure, root-cause, fix, verify and record performance contention on a developer machine: cloud-sync daemons (iCloud Drive, OneDrive, Dropbox, Google Drive)…
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
cloud-expert
jpantsjoha
Cloud guardrails for any vendor workload — Google Cloud (GCP, Vertex AI, GKE), AWS (IAM, EKS, Bedrock), Azure (Entra ID, Policy, AKS), Alibaba Cloud (RAM…
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
operating-model-bootstrap
jpantsjoha
Bootstrap or harden a project's operating model for mixed human and AI delivery teams.
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
cloud-checkup
jpantsjoha
Read-only SRE checkup of any GCP project: deterministic probes of the edge, Cloud Run services, 7-day error logs, Cloud Scheduler, alert policies and uptime…
SkillAFreshness: A★ 13Claude Code +9 - 0.641score
using-the-harness
jpantsjoha
Session-start orientation for this team harness.
SkillAFreshness: A★ 13Claude Code +9
Cite this page
cost-guardrail skill. Agent Mart. https://agentmart.dev/skills/jpantsjoha-cost-guardrail (last updated 2026-10-24)