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

Written for no agent in particular: nothing here depends on one.

Good fit Use it to configure or inspect spending limits, choose blocking or alert-only behavior, set warning thresholds, and view progress toward a limit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iblai/api/iblai-api-spend-caps
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 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/github.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/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 iblai-api-spend-caps

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 26
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 29
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 155
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 159
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.5 $0.00055 $0.01315
Sonnet 5.5 $0.00027 $0.00658
Haiku 4.5 $0.00014 $0.00329

Measured 3mo ago against content hash f88350a8155c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 2mo ago), licensed MIT. It adds 137 tokens to every session and 3,288 once invoked, about $0.0005 per session on Opus 5.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

iblai-api-spend-caps compared with skills from other repositories

iblai-api-spend-caps next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
iblai-api-spend-capsiblai/apiSkill152mo agoMITA137Claude Code, Codex
llm-cost-advisorulises-jeremias/agent-toolkitSkill28todayMITA45Claude Code
slack-cliulises-jeremias/agent-toolkitSkill28todayMITA45Claude Code
trdulises-jeremias/agent-toolkitSkill28todayMITA54Claude Code
fix-protocol-financial-tradinghamzabellouch/agent-skillsSkill81mo agoMITA65Claude Code, Codex
open-banking-iso20022-apishamzabellouch/agent-skillsSkill81mo agoMITA71Claude Code, Codex
x402-protocolDexter-DAO/opendexter-ideSkill2yesterdayMITA41Claude Code