jedarden

Subscription Quota Governor — AI skill for Claude Code

AI community

Provider-neutral subscription quota pacing for Claude Code, Codex, and Z.AI.

How to install Subscription Quota Governor

This entry records only its repository, not the path inside it, so there is no exact command to give. Open jedarden/subscription-quota-governor and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Subscription Quota Governor does

Provider-neutral subscription quota pacing for Claude Code, Codex, and Z.AI.

Alternatives in AI

  • Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
  • Claudexor — Multi-harness control plane for Claude Code, Codex, Cursor, and OpenCode: quota-aware rotation across multiple 425 ★
  • onWatch — Open-source Go CLI that tracks AI API quota usage across 7 providers (Synthetic, Z.ai, Anthropic, Codex, GitHu 397 ★

README

Subscription Governor

`subgov` is a provider-neutral quota governor for subscription-backed AI coding agents. It observes reset windows, learns quota burn per worker, and publishes or applies a conservative worker target. One process can govern separate `claude-anthropic`, `codex`, and `claude-zai` accounts without confusing the protocol used by an agent with the subscription that pays for it.

The initial release includes native quota collectors for:

  • Claude Code's Anthropic OAuth usage surface;
  • Codex's documented account/rateLimits/read app-server method;
  • normalized JSON over files, HTTP, or command output for Z.AI and custom integrations.

Why account identity is explicit

An agent speaking the Anthropic protocol may actually consume Z.AI Coding Plan quota. `subgov` therefore keys all policy and state by a configured account name. Fleet labels and provider protocol names have no effect on quota attribution.

Install and try it

cargo install --path .
subgov --config examples/claude-code.yaml check
subgov --config examples/codex.yaml snapshot codex
subgov --config examples/all-three.yaml run --once --observe-only

Run in `--observe-only` mode for at least two polling intervals before enabling actuation. The `linear_to_reset` strategy deliberately holds the current target until it has two observations in the same reset generation; zero observed delta is not treated as free capacity. An empty fleet starts at the configurable `bootstrap_workers` value so the governor can learn an initial burn rate.

Configurable utilization

Utilization is a fraction from `0.0` to `1.0`. Set either a consumption target or a reserve; they are equivalent:

utilization:
  target_utilization: 0.85 # consume up to 85% by reset
  # reserve_fraction: 0.15 # equivalent; do not set both
  strategy: linear_to_reset
  stale_after_seconds: 900
  stale_behavior: hold
  minimum_sample_seconds: 300
  windows:
    weekly_scoped:
      target_utilization: