iblai-api-spend-caps

iblai-api-spend-caps is a skill for Claude Code, Codex from iblai/api. It costs 137 tokens per session (3,288 once invoked), scanned A, original, MIT.

An API tool for setting and reading an organization's limits on spending for language-model chats. Limits can apply to the whole organization, one agent, or one user working with one agent, over a day, week, month, or year.

In plain words
What is it for?
Use it to configure or inspect spending limits, choose blocking or alert-only behavior, set warning thresholds, and view progress toward a limit.
Why use it?
It prevents model costs from exceeding a chosen amount or warns administrators as spending approaches that amount.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/iblai/api/iblai-api-spend-caps
Any agent
npx skills add iblai/api --skill iblai-api-spend-caps
Clone the repo
git clone --depth 1 https://github.com/iblai/api

Made for: Claude Code, Codex.

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 iblai-api-spend-caps

README.md
[![agentmods](https://agentmods.dev/badge/skills/iblai/api/iblai-api-spend-caps.svg)](https://agentmods.dev/skills/iblai/api/iblai-api-spend-caps)
Your own site
<a href="https://agentmods.dev/skills/iblai/api/iblai-api-spend-caps"><img src="https://agentmods.dev/badge/skills/iblai/api/iblai-api-spend-caps.svg" alt="Measured on agentmods" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,288 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00137 $0.03288
Opus 5 $0.00068 $0.01644
Sonnet 5 $0.00027 $0.00658
Haiku 4.5 $0.00014 $0.00329

Measured 5d ago against content hash f88350a8155c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

iblai-api-spend-caps scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X PUT "$dm/api/ai-mentor/orgs/$IBLAI_ORG/spend-caps/tenant/" \
skills/iblai-api-spend-caps/SKILL.md · 236 lines

How it starts

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

iblai-api-spend-caps

Configure and read LLM spend caps for an organization. A spend cap is an admin-imposed maximum LLM cost enforced at one of three scopes:

  • tenant — the whole org (one cap per platform).
  • agent — one agent/mentor (one cap per agent).
  • user_agent — one user on one agent (an explicit per-user cap).

Each cap has a rolling interval (day/week/month/year, calendar aligned), a dollar limit (max_cost_usd), an enforcement mode (block refuses further chats once exceeded; alert_only only notifies), and alert thresholds (fractions of the limit that fire a near-limit alert). When a chat is blocked, the request is refused with HTTP 429 and a body naming the interval that was hit (dollar amounts are deliberately omitted). Spend counters are reconciled from ClickHouse on a schedule and surfaced read-only so a UI can render a progress bar.

Auth & conventions

  • Base URL: https://api.iblai.app/dm — these are Data Manager (DM) endpoints, so the /dm prefix is required; the /api/ai-mentor/... paths below are appended to it (e.g. https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/spend-caps/tenant/). Omitting /dm will not resolve.
  • Header: Authorization: Api-Token $IBLAI_API_KEY on every request.
  • Path vars: {org} = $IBLAI_ORG (the org key). {mentor} = an agent's unique_id (a UUID). {user_id} / {username} = the target learner.
  • Endpoint prefix twin: every path under api/ai-mentor/ also resolves under api/ai-agent/ (alias); either works, pick one and be consistent.
  • Permission tiers: all cap configuration endpoints (tenant / agent / user-agent read+write) require a platform admin (RBAC action prefix Ibl.Mentor/SpendCaps/*). The status endpoint is learner-safe: any authenticated member may read their own status, and admins may read any user's — it returns only a coarse zone + percent, never raw dollars.
  • PUT is upsert: writing a cap that doesn't exist yet returns 201 Created; writing over an existing one returns 200 OK.
  • DELETE and PUT (destructive / budget-changing) calls say "Confirm with the user first."
  • Not connected yet? Run /iblai-api-login first to populate IBLAI_ORG, IBLAI_USERNAME, and IBLAI_API_KEY.

Read the full file on GitHub · 236 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. 5d ago First seen · 236 lines · 137 tokens per session scan A f88350a8155c

Subscribe to this mod's changes

iblai-api-spend-caps is a skill published in the GitHub repository iblai/api (15 stars, last pushed 4d ago), licensed MIT. It adds 137 tokens to every session and 3,288 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

llm-cost-advisor

WHAT — Recommend the most cost-effective LLM provider for a given task type. Shows estimated cost per run across available providers and integrates with devcompanion llm-status to show what is actually available.

ulises-jeremias/agent-toolkit · 46 tokens

threnody-cost

View cost/spend dashboard with role, tier, and provider breakdowns from Threnody's local cost telemetry. Use when asked about cost, spend, budget, tokens used, savings, or how much a task/period cost.

timjensgrossinger/threnody · 51 tokens

adobe-express-monetization

Monetize Adobe Express add-ons with subscriptions and payments. Use when designing checkout flows, defining subscription tiers, implementing webhook verification, managing entitlements, or securing backend billing logic.

Sandgrouse/adobe-express-dev-skill · 44 tokens

pricing-update

Sync OpenUsage's pricing supplement with Cursor's published model pricing. Pulls https://cursor.com/docs/models-and-pricing.md, diffs it against pricingsupplement.json, updates entries/aliases/multipliers, validates, and opens a PR. Use when Cursor adds or re-prices models, a spend tile shows a warning triangle for an…

robinebers/openusage · 85 tokens

lov-skill-pricing

为一个或多个 Agent Skill 生成可解释的 Skill Pricing Card:结合创作者时间与维护成本、用户价值、稀缺性、购买信心和生态潜力,输出建议价、价格区间、渠道策略及证据缺口;触发语包括“给这个 Skill 定价”和 “price this Skill”。.

lovstudio/skills · 78 tokens

vindicate

Use when the user wants to write, add, fix, stabilize (flaky), refactor, run, or audit Playwright browser tests, draft requirements/stories from a recording (no tests), find test-coverage gaps, scaffold a Playwright project, or set up Playwright CI. Vindicate's guided workflow for grounded, conformant Playwright test…

OpenEvident/vindicate · 77 tokens