gateway-usagelisted
Install: claude install-skill cu-aaii/claude-skills
# 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 internal