azain47

Cpa Subrouter — Development skill for Claude Code

Development community

Interactive one-command setup to stack Claude & OpenAI subscriptions in CLIProxyAPI with fill-first routing.

How to install Cpa Subrouter

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

What Cpa Subrouter does

Interactive one-command setup to stack Claude & OpenAI subscriptions in CLIProxyAPI with fill-first routing.

Alternatives in Development

  • Setup Video Vision — Interactive setup wizard for claude-video-vision — configure backend, whisper, frames, and verify dependencies 1.3k ★
  • React Native Restate — Build a full-stack Real Estate app from scratch with Google Authentication, dynamic routing, and more 678 ★
  • Dario — A local OpenAI- and Anthropic-compatible proxy that brings your Claude Pro/Max subscription to Cursor, Cline 485 ★

README

CPA Sub Router

Stack multiple Claude and OpenAI (ChatGPT/Codex) subscriptions behind [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) with **fill-first** routing: the first account is used until it hits its usage limit, then the next one takes over.

One command, nothing to install:

bash <(curl -fsSL https://raw.githubusercontent.com/azain47/cpa-subrouter/main/setup.sh)

`curl -fsSL https://raw.githubusercontent.com/azain47/cpa-subrouter/main/setup.sh | bash` works too.

![Main menu](assets/menu.png)

Features

**Add accounts.** Runs CLIProxyAPI's own OAuth login for Claude or OpenAI and notices when the browser signed in to an account you already added. Ctrl-C cancels a login without leaving the tool.

![Adding a Claude account](assets/add-account.png)

**Reorder.** Highlight an account with ↑/↓ and press a number to move it to that position — the others shift around it. Enter saves, Esc cancels. Number keys reach positions 1–9.

![Reordering accounts](assets/reorder.png)

**Routing settings.** Fill-first or round-robin, session affinity on/off, and when accounts switch (only on usage limits, or on any error). The current settings are pre-selected; Esc cancels without changing anything.

![Routing settings](assets/routing.png)

**Remove accounts.** The credential file is moved to `~/.cli-proxy-api-removed`, not deleted — move it back to restore the account. An earlier removed copy with the same name is never overwritten.

On first run, if routing isn't fill-first yet, it offers to switch. If it already is but accounts still switch on any error, it offers to make them switch only on usage limits:

![First run](assets/first-run.png)

How it works

  • Claude and OpenAI are separate pools. CLIProxyAPI routes by model name (claude-* → Claude accounts, gpt-*/Codex → OpenAI accounts); fill-first applies within each pool.
  • Fill-first is CLIProxyAPI's routing.strategy: fill-first. It always picks the highest-priority av