gateway-usage

gateway-usage is a skill for Claude Code, Codex from cu-aaii/claude-skills. It costs 39 tokens per session (1,763 once invoked), scanned A, original, MIT.

A tool that reads live response information from the Cornell AI Gateway to report API spending, limits, and remaining budget. The gateway is a service that routes requests to language models.

In plain words
What is it for?
Use it to check spend to date, maximum and remaining budget, per-request cost, rate limits, gateway version, and related billing caveats.
Why use it?
It provides a quick way to check current usage and cost when normal account-detail endpoints are unavailable or restricted.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

Good fit Use it to check spend to date, maximum and remaining budget, per-request cost, rate limits, gateway version, and related billing caveats.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cu-aaii/claude-skills/gateway-usage
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 cu-aaii/claude-skills --skill gateway-usage
Clone the repo
git clone --depth 1 https://github.com/cu-aaii/claude-skills

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 gateway-usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/cu-aaii/claude-skills/gateway-usage/github.svg)](https://agentmods.dev/skills/cu-aaii/claude-skills/gateway-usage)
Your own site
<a href="https://agentmods.dev/skills/cu-aaii/claude-skills/gateway-usage"><img src="https://agentmods.dev/badge/skills/cu-aaii/claude-skills/gateway-usage/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 gateway-usage

Your own site · 80×15
<a href="https://agentmods.dev/skills/cu-aaii/claude-skills/gateway-usage"><img src="https://agentmods.dev/badge/skills/cu-aaii/claude-skills/gateway-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,763 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.
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.00039 $0.01763
Opus 5 $0.00019 $0.00881
Sonnet 5 $0.00008 $0.00353
Haiku 4.5 $0.00004 $0.00176

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

Security

Grade A, and why

gateway-usage 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/usage.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

- **Never** run your own `curl` with the key inline, **never** `echo`/`grep`/`printf` the raw key value, and **never** pass the key as `ANTHROPIC_AUTH_TOKEN="sk-..." ...` inline in a command. Any of those writes the live
gateway-usage/SKILL.md · 71 lines

How it starts

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

Cornell AI Gateway usage check

Use this skill whenever a user asks about their Cornell AI Gateway (LiteLLM, api.ai.it.cornell.edu) spend, budget, or remaining usage on their virtual key.

What this skill does

Run the bundled scripts/usage.sh, which:

  1. Resolves the gateway key from a 4-source order (env, then macOS Keychain, then cornell-ai-helper config.toml, then Cowork plugin mount), so one file works across the Claude Code CLI, a managed Mac, and the Cowork sandbox.
  2. Makes one cheap 1-token completion call to capture the live x-litellm-* response headers (spend, max budget, per-call cost, gateway version).
  3. Attempts GET /key/info as a bonus (some keys may have broader access), but expects and handles a 403 gracefully. On the Cornell gateway, normal end-user keys are restricted to llm_api_routes only and cannot call /key/info, /user/info, or /spend/logs. Header data is the primary and usually only source.
  4. Prints a clean summary: spend to date, max budget, computed remaining budget, this check's own cost, TPM/RPM limits if present, and the standing billing caveats (flat $0.002/request fee, $10/mo free tier is per TEAM not per key, 90-day key expiry, midnight-UTC reset cadence).

Key-safety rules (do not violate)

The whole point of this skill is that the key stays inside usage.sh and never reaches the chat transcript. To keep it that way:

  • Only invoke the skill by running the bundled script. Let the script resolve the key internally.
  • Never run your own curl with the key inline, never echo/grep/printf the raw key value, and never pass the key as ANTHROPIC_AUTH_TOKEN="sk-..." ... inline in a command. Any of those writes the live credential into the transcript permanently.
  • The script already truncates to the last 4 characters (...XXXX). Preserve that truncation in everything you show the user. If you ever see a full sk- value in output, stop and warn the user their key is exposed and should be rotated.

Read the full file on GitHub · 71 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 71 lines · 39 tokens per session scan A a09760a6eef7

Subscribe to this mod's changes

gateway-usage is a skill published in the GitHub repository cu-aaii/claude-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 1,763 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

comptable

Comptabilité, fiscalité et facturation pour entreprises françaises. Gère écritures PCG, déclarations TVA, IS/IR, clôture annuelle, liasse fiscale (2033/2065), FEC, états financiers, et chaîne facturation (mentions obligatoires, numérotation, Factur-X/UBL/CII, plateformes agréées PDP/PA, e-reporting, réforme 2026…

romainsimon/paperasse · 143 tokens

fiscaliste

Fiscaliste IA pour la fiscalité personnelle des particuliers français : optimisation et déclaration de l'impôt sur le revenu, IFI, revenus du capital, revenus fonciers, equity salarial, crypto-actifs et PER. Couvre le calcul de l'IR (barème, quotient familial, décote, PAS, CEHR, revenus exceptionnels), la déclaration…

romainsimon/paperasse · 302 tokens

syndic

Gère un parc de copropriétés en France avec vue portfolio consolidée. Couvre administration, comptabilité (décret 2005, plan comptable copro, 5 annexes), assemblées générales (convocation, PV, notification), appels de fonds, travaux, fournisseurs, recouvrement d'impayés et transition de syndic. Maîtrise les majorités…

romainsimon/paperasse · 194 tokens

financial-statement-analysis

Reads a set of financial statements and establishes what changed and why — fluctuation analysis against prior period and against budget, profitability, liquidity, solvency and efficiency ratios, benchmarking, and the non-GAAP measures presented alongside them. Use this to interpret results, review a counterparty's or…

cbrock84/headcount · 93 tokens

daily-budget-check

Run a daily spend check-in against a daily budget on the Agent Monitor dashboard — today's spend vs the daily target, pace through the day, and the projected overage if the current pace holds. Uses /api/pricing/cost and /api/sessions (grouped by startedat = today). Use for a quick daily spend check-in or a…

hoangsonww/Claude-Code-Agent-Monitor · 81 tokens

ib-collar

Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.

staskh/trading_skills · 30 tokens