9Router Chat Skill
Call any LLM through the 9Router gateway using OpenAI or Anthropic API formats, with streaming and combo auto-fallback, so chat and code generation never stall on a single provider's quota.
The skill only documents HTTP calls to a locally running 9Router service: no file writes, no destructive operations; credentials flow through environment variables and are never hardcoded, and the data flow (to the local router, then upstream LLM providers) is largely transparent. Deducted for: no explicit disclosure that upstream providers see full prompt content, no rollback/invalidation guidance, and insufficient warning about the secret-leakage surface of shell env vars.
Internally self-consistent: endpoints, request/response examples and SSE streaming format agree across OpenAI and Anthropic sections; the happy path is plausible. Deducted for: no tests, no edge/error handling (401, provider timeouts, fallback failure behavior), the jq dependency of the discover command is unexplained, and failure feedback is left entirely to user debugging.
Trigger conditions in the description are reasonably clear (ask an LLM, generate code, summarize), and dual OpenAI/Anthropic format support broadens fit. Deducted for: no declared non-fit boundaries (requires 9Router running and prior base-skill setup), Chinese support exists only at repo README level while the skill is English-only, and reachability of upstream free providers from mainland-China networks is not disclosed.
Clean structure, progressive disclosure via a setup reference, ample examples. Deducted for: the critical setup prerequisite is externalized to another SKILL.md via a master-branch raw URL not pinned to this revision; the skill itself has no version number, changelog, FAQ or known-limitations section, and maintenance responsibility is only inferable at repo level.
The core task (chat/code generation via 9Router) has a complete documented path with directly reusable curl/SDK snippets. Deducted for: the 'free unlimited' marketing value claim is unverifiable in static review; actual benefit depends on the 9Router service and the reality of upstream free quotas; static cap is 7 and no representative-output evidence exists, so 5.
Response-shape examples align with public OpenAI/Anthropic API specs, providing cross-corroboration; the repo contains real CI (Docker publish) and source code. Deducted for: no test coverage on the skill's key paths, no third-party execution evidence, and claims like RTK -40% token savings have only marketing sources; static cap 5, scored 4.
- This skill is API documentation only; the 9Router local service must be installed and running first (see the 9router base skill) or the skill is inoperable standalone.
- Upstream LLM providers see all prompts and code you send; evaluate sensitivity before use with proprietary code.
- API keys are passed via environment variables (NINEROUTER_KEY); beware shell history and process-environment leakage.
- 'Free/unlimited' is marketing language; real availability depends on each upstream provider's free-tier policy and may change at any time.
- The setup prerequisite links to the master branch rather than a pinned revision; mainland-China reachability of some upstream providers is not disclosed.
What does this skill do, and when should you use it?
9router-chat is an Agent Skill that teaches a model how to issue chat and code-generation requests through a locally running 9Router gateway. It covers both OpenAI's /v1/chat/completions and Anthropic's /v1/messages endpoints, including SSE streaming, model discovery via /v1/models, and response-shape parsing. 9Router itself is a local AI router connecting 40+ free and paid providers, with tiered auto-fallback (subscription → cheap → free) and an RTK token saver that cuts 20-40% of input tokens. The skill is one of 9 bundled in the 9router repository; a running 9Router instance is a prerequisite.
The skill instructs the model to: read the NINEROUTER_URL environment variable (plus NINEROUTER_KEY if auth is enabled); discover models with GET /v1/models and fetch per-model metadata (contextWindow, params) via /v1/models/info; send chat or code-generation requests via POST /v1/chat/completions (OpenAI format) or POST /v1/messages (Anthropic format); read SSE streams when stream:true (data: {delta} chunks until [DONE]); and correctly parse both response shapes (choices/message/content plus usage fields). Named combos (e.g. vip, mycodex) automatically fall back across multiple providers.
- A developer already running 9Router with free providers like Kiro or OpenCode Free connected, who wants the model to query and use those free models for code generation on demand
- Users of Claude Code, Cursor, or Cline who regularly exhaust subscription quotas and need combo-based fallback to cheap (GLM, MiniMax) or free tiers to avoid interruptions
- Integrators who want a single OpenAI-format endpoint to reach Claude, GPT, and Gemini models from different vendors inside scripts or agents
- JavaScript developers who want to point the OpenAI SDK's baseURL at 9Router and reuse existing code built on the openai npm package
- Anyone building an interactive UI that needs token-by-token SSE streaming output
- Users asking in prompt to summarize long text or run a one-off question, with 9Router picking an available provider automatically
What are this skill's strengths and limitations?
- One skill covers both OpenAI and Anthropic API formats, with ready-to-use curl and JS SDK examples
- Leverages 9Router's combo mechanism so quota exhaustion triggers automatic fallback to cheap/free providers without interruption
- Documents complete response shapes (usage fields, SSE stream format), easing parsing and debugging
- Dynamic model discovery via /v1/models and /v1/models/info means no hardcoded model list
- MIT-licensed open-source project with Docker images and multilingual docs
- Hard dependency on a running, provider-configured 9Router instance; the skill itself contains no steps to install or start 9Router
- Completely non-functional without NINEROUTER_URL set; NINEROUTER_KEY is also required if REQUIRE_API_KEY is on
- No test suite is declared in SKILL.md, and there is no evidence it works against vendor APIs directly without 9Router
- Example model IDs (openai/gpt-5, cc/claude-opus-4-7, etc.) depend on which providers your 9Router instance actually has connected and are not guaranteed
- The "free unlimited" path relies on third-party free tiers (Kiro, OpenCode Free) remaining available — the README itself records iFlow and Qwen free tiers being discontinued in 2026
How do you install this skill?
- Install 9Router itself: npm install -g 9router, then run 9router — the dashboard opens at http://localhost:20128. 2. In Dashboard → Providers, connect at least one provider (e.g. free Kiro AI or OpenCode Free). 3. Get the skill from https://github.com/decolua/9router (it lives at skills/9router-chat/SKILL.md) and place it in your Agent Skills client's skill directory per that client's conventions. 4. Set NINEROUTER_URL (default http://localhost:20128); if auth is enforced (REQUIRE_API_KEY=true), also copy an API key from the dashboard into NINEROUTER_KEY. SKILL.md provides no dedicated install script; exact folder placement depends on your client.
How do you use this skill?
Once the environment is ready, trigger it in conversation, e.g.: "Use 9Router to ask gpt-5: write a Python quicksort" or "Summarize this text via 9Router". The model will follow SKILL.md: first curl $NINEROUTER_URL/v1/models to list models; then POST to /v1/chat/completions (OpenAI format, example model openai/gpt-5) or /v1/messages (Anthropic format, example model cc/claude-opus-4-7, with the anthropic-version: 2023-06-01 header); set stream:true for SSE streaming. In JS, create new OpenAI({ baseURL: ${NINEROUTER_URL}/v1, apiKey: NINEROUTER_KEY }) and call client.chat.completions.create.
How does this skill compare with similar options?
OmniRoute, a fork linked from the same README, extends 9Router with 36+ providers, 4-tier fallback, multi-modal APIs, and semantic caching — consider it if you need more. Calling OpenAI or Anthropic's official APIs directly needs no local router but forgoes auto-fallback, quota tracking, and RTK token savings.