This agentic workflow guides running a bundled Python calibrator for Antigravity, Codex, or custom quota pools, after checking required CLI prerequisites. It sets mandatory interpretation and confidence rules for quota readings, lockouts, spend estimates, and session attribution, then specifies a concise diagnostic report or HTML cockpit output.
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Execute this Skill directly on the user's behalf—never ask the user to manually copy-paste CLI commands when the agent can run the bundled calibrator itself.
Estimate the true API-dollar capacity, weekly-to-5h multiplier, remaining
runway, reset countdown, alternate available pools, and top burning sessions of
percentage-based AI subscriptions by reconciling local tokscale spend against
live provider quota fractions.
Verify the required CLIs before running calibration; fail explicitly if missing instead of guessing quota sizes or fabricating token prices.
command -v tokscale && tokscale --versiontokscale is missing, report the missing prerequisite (bun install -g tokscale or npm install -g tokscale) and stop.--provider antigravity), also verify command -v agy.
Antigravity quota comes from agy -p /usage --output-format json; local CLI
spend is read from tokscale client antigravity-cli.--provider codex), quota comes from tokscale usage --json
and local spend from tokscale client codex.--provider custom), pass
the provider's reported --used-pct (or --remaining-fraction) with either
--client <tokscale-client> --since YYYY-MM-DD or --spend-usd <amount>.Resolve <skill-dir> from this loaded SKILL.md path and execute the bundled
zero-dependency Python 3.9+ calibrator directly.
python3 "<skill-dir>/scripts/calibrate_quota.py" --provider antigravity \
--include-codex --html /tmp/ai-quota-cockpit.html --open--samples 2 --settle-seconds 5, --timeout 60, automatic top-5
session attribution whenever any bucket is >= 80% used or locked, and
bounded turn-level forensics (strictly scoped to top_sessions IDs) separating
primary-session burn, concurrent subagents, and 5-minute Prompt Cache TTL
cold-resend (20x) waste.--plan-usd <monthly_price> (when known) to compute weekly API ROI,
--include-codex to append live same-machine Codex standby accounts,
--html <path> [--open] to generate and open a zero-CDN live business cockpit,
--top-sessions N to override top-session count (0 to skip), --json for
structured output, or --samples 1 only when no concurrent sessions are active.tokscale usage + tokscale hourly)python3 "<skill-dir>/scripts/calibrate_quota.py" --provider codexPass --top-sessions 5 to include top Codex sessions, or --account-email to
target a specific Codex account.
python3 "<skill-dir>/scripts/calibrate_quota.py" --provider custom \
--label "My Plan (Weekly)" --used-pct 20.0 \
--client claude --since 2026-11-14Or supply spend directly when reconciling an external billing export:
python3 "<skill-dir>/scripts/calibrate_quota.py" --provider custom \
--label "Partner Pool (5h)" --used-pct 15.0 --spend-usd 4.50 \
--cache-write-upper-usd 5.10Read references/methodology.md when interpreting lockout caps, soft lockouts, mixed-model hours, multi-account bias, or adding a new provider.
< 2% consumed).
Single low-output turns sit inside reservation jitter and have skewed cache
ratios, misestimating pool capacity by 4–5×. Grade < 2% buckets LOW and
rely on real multi-turn usage (>= 5% preferred, >= 10% for HIGH).remaining_fraction delta (v2 - v1) and
the used_5h / used_weekly ratio across two reads:
v2 > v1): true RESERVATION_REFUND_OR_REPLICA_LAG
— warn and downgrade confidence.v2 < v1, <= 5% relative on >= 20% used):
normal concurrent session activity (CONCURRENT_BURN info note), keeping
HIGH confidence instead of false-alarm downgrades.< 1% soft lockout, clamped multipliers, and LOCKOUT_CAP.
1% (0.01) pre-reservation floor, so buckets
with 0.1% < remaining < 1% are already in SOFT_LOCKOUT.5h hits LOCKED or SOFT_LOCKOUT, 5h is clamped near 0% while
weekly keeps deducting—treat the observed u5 / uw ratio as a lower
bound (>= Xx), not an exact multiplier.5h bucket hits lockout from a fresh simultaneous 5h+weekly
start while weekly remains open, local spend directly measures that 5h
hard cap (LOCKOUT_CAP), distinct from unknown-timestamp SATURATED
(LOW).reset_time into local time, subtract pure pre-window hours,
surface mixed-hour boundaries transparently as [min, upper] in both JSON
and Markdown, and report both base tokscale spend and 5-minute cache-write
upper bounds when cacheWrite == 0.5h bucket resets mid-hour, tokscale hourly can mix pre-reset
spend into the boundary hour and make a naive 5h implied cap or runway
exceed its sibling weekly pool. The script flags MID_HOUR_RESET_OVERCOUNT,
withholds bogus dollar projections, and reports % remaining cleanly until
post-reset spend settles.top_sessions and window_forensics when a pool is >= 80%
or locked to quantify concurrent subagents, CONTEXT_SNOWBALL average/peak
context length, and 5-minute Prompt Cache TTL cold-resend (20x) waste—
preferring zero-compression lossless levers (subagent offload + avoiding
>5m cold resends) over unrealistic <250k auto-compact rules.tokscale unpriced/stale-pricing
stderr notices and UNKNOWN_WINDOW labels).Deliver a concise, direct diagnostic report (do not dump raw commands for the
user to run). When --html <path> --open is used to open the live decision
cockpit in the browser, keep the chat reply ultra-concise (3 bullet business
conclusions: active/locked status + reset countdown, top zero-compression
lossless savings lever, and clickable link to the opened HTML) instead of
repeating the full calibration table in chat. For text-only output, include:
Weekly ÷ 5h multiplier (noting clamp lower bound if
applicable), and any locked/soft-locked pools with exact reset countdown.LOCKED/SOFT_LOCKOUT badge) | Implied Pool | Remaining
Runway (~$ / ~msgs / ETA) | Confidence.>= 80%):
Top burning sessions (highlighting any CONTEXT_SNOWBALL outlier) and
immediately available alternate pools in the same subscription.daymade/claude-code-skills
c70d3b7
commandtokscaletokscale usagetokscale hourlyagybunbun installnpmnpm installpython3tokscaleagycalibrate_quota.pybrowserIf you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.