cost-guardrail

cost-guardrail is a skill for Claude Code from jpantsjoha/ai-native-developer-experience. It costs 55 tokens per session (988 once invoked), scanned A, original, Apache-2.0.

A cost-checking guide for systems that use large language models (LLMs), which generate text or other results from prompts. It covers model choice, token limits, and cloud resource sizing.

In plain words
What is it for?
Use it when designing or reviewing an LLM system, choosing between model sizes, scaling usage, or estimating the cost of a feature or release.
Why use it?
It helps prevent designs from creating unnecessarily high bills, especially when an expensive model runs for every request or a workload grows.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the join-the-team plugin — 21 skills, 3 commands, 1 hook shipped together

Good fit Use it when designing or reviewing an LLM system, choosing between model sizes, scaling usage, or estimating the cost of a feature or release.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jpantsjoha/ai-native-developer-experience/cost-guardrail
Install

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.

Any agent
npx skills add jpantsjoha/ai-native-developer-experience --skill cost-guardrail
Clone the repo
git clone --depth 1 https://github.com/jpantsjoha/ai-native-developer-experience

Made for: Claude Code.

Or install join-the-team, the plugin that ships this one along with the rest of its 21 skills, 3 commands, 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-guardrail

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jpantsjoha/ai-native-developer-experience/cost-guardrail"><img src="https://agentmods.dev/badge/skills/jpantsjoha/ai-native-developer-experience/cost-guardrail.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 988 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.00055 $0.00988
Opus 5 $0.00028 $0.00494
Sonnet 5 $0.00011 $0.00198
Haiku 4.5 $0.00006 $0.00099

Measured 8d ago against content hash 7fc2123013ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

cost-guardrail 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 8d 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.

skills/cost-guardrail/SKILL.md · 81 lines

How it starts

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

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?

    General tiering principle (verify current pricing against your provider's documentation before relying on it):

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

Read the full file on GitHub · 81 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. 8d ago First seen · 81 lines · 55 tokens per session scan A 7fc2123013ed

Subscribe to this mod's changes

cost-guardrail is a skill published in the GitHub repository jpantsjoha/ai-native-developer-experience (11 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 55 tokens to every session and 988 once invoked, about $0.0003 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

mlops-engineer

Provides MLOps patterns for ML CI/CD pipelines, model registries, monitoring, and data drift detection. Use when setting up ML infrastructure or when the user mentions MLOps, model deployment, ML pipeline, or model monitoring.

tranhieutt/software_development_department · 52 tokens

tensorrt-llm

High-throughput LLM inference on NVIDIA GPUs.

NousResearch/hermes-agent · 18 tokens

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

agent-platform-endpoint-management

Manages Agent Platform serving endpoints. Use when you need to create, list, describe, update, or delete serving endpoints for model deployment on Agent Platform. Also use when troubleshooting endpoint permission, quota, or resource busy errors. Don't use for deploying models to endpoints or for running model…

google/skills · 64 tokens

gke-inference

Deploys and optimizes AI/ML inference workloads on GKE, using GPUs, TPUs, and model servers. Use when deploying GKE inference servers, configuring GKE GPU resources for inference, or deploying LLMs on GKE. Don't use for generic batch jobs or HPC task queues (use gke-batch-hpc instead).

google/skills · 74 tokens