Agent skill

9Router Chat Completions

by decolua in decolua/9router

Sends chat and code-generation requests through a 9Router gateway using OpenAI or Anthropic message formats, with streaming and auto-fallback combos.

MITAuto-check passedAI & LLM Engineering

Install 9Router Chat Completions

skills CLI
$ npx skills add decolua/9router --skill 9router-chat -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install decolua/9router 9router-chat --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/decolua/9router.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/9router-chat .claude/skills/9router-chat && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
9router-chat
GitHub stars
30k
Token cost
~635 tokens
SKILL.md length
52 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

Sends chat and code-generation requests through a 9Router gateway using OpenAI or Anthropic message formats, with streaming and auto-fallback combos.

  • Asking another LLM a question through a 9Router gateway
  • SKILL.md covers Endpoints, Discover, OpenAI format and Anthropic format, plus 1 more section
  • Calls curl and jq; needs NINEROUTER_KEY
  • Generating or summarizing text with a specific routed model

What it does

The skill calls a 9Router endpoint set by the NINEROUTER_URL variable, with NINEROUTER_KEY added when authentication is enabled. It shows two request formats: POST to /v1/chat/completions in OpenAI format and POST to /v1/messages in Anthropic format, with curl examples and a JavaScript example that points the OpenAI SDK at the router's base URL.

Available models are listed from /v1/models, with per-model metadata such as context window from /v1/models/info. Combos, named routing groups like vip or mycodex, fall back automatically through several providers. The skill documents the response shapes for both formats, including usage counts, and notes that streaming returns server-sent events ending with a DONE marker. A longer setup guide lives in the main 9Router skill.

When your agent uses it

  • Asking another LLM a question through a 9Router gateway
  • Generating or summarizing text with a specific routed model
  • Listing the models and combos a 9Router instance offers
  • Streaming a completion through the gateway

Example prompts

  • “List the models available on my 9Router and show the context window for openai/gpt-4o.”
  • “Send this prompt through the vip combo and stream the answer.”
  • “Summarize notes.md using the Anthropic messages format on 9Router.”

Requirements

  • A running 9Router instance, with its URL in NINEROUTER_URL
  • NINEROUTER_KEY when authentication is enabled

What it can do on your machine

Read from SKILL.md and the folder at commit ce4460e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • NINEROUTER_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

9Router Chat Completions loads about 635 tokens when it runs. Until then it costs about 64 tokens; SKILL.md has 52 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~64
When it runs · the whole SKILL.md, loaded when a task matches
~635

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from decolua/9router at commit ce4460e, republished under its MIT licence (© decolua). 52 words, ~635 tokens.

Download SKILL.mdSave it as .claude/skills/9router-chat/SKILL.md (or your agent's skills folder).
name
9router-chat
description
Chat / code generation via 9Router using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos. Use when the user wants to ask an LLM, generate code, summarize text, or run prompts through 9Router.

9Router — Chat

Requires NINEROUTER_URL (and NINEROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/decolua/9router/refs/heads/master/skills/9router/SKILL.md for setup.

Endpoints

  • POST $NINEROUTER_URL/v1/chat/completions — OpenAI format
  • POST $NINEROUTER_URL/v1/messages — Anthropic format

Discover

bash
curl $NINEROUTER_URL/v1/models | jq '.data[].id'
# Per-model metadata (contextWindow, params)
curl "$NINEROUTER_URL/v1/models/info?id=openai/gpt-4o"

Combos (e.g. vip, mycodex) auto-fallback through multiple providers.

OpenAI format

bash
curl -X POST $NINEROUTER_URL/v1/chat/completions \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-5","messages":[{"role":"user","content":"Hi"}],"stream":false}'

JS (OpenAI SDK):

js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: `${process.env.NINEROUTER_URL}/v1`, apiKey: process.env.NINEROUTER_KEY });
const res = await client.chat.completions.create({
  model: "openai/gpt-5",
  messages: [{ role: "user", content: "Hi" }],
  stream: true,
});
for await (const chunk of res) process.stdout.write(chunk.choices[0]?.delta?.content || "");

Anthropic format

bash
curl -X POST $NINEROUTER_URL/v1/messages \
  -H "Authorization: Bearer $NINEROUTER_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"cc/claude-opus-4-7","max_tokens":1024,"messages":[{"role":"user","content":"Hi"}]}'

Response shape

OpenAI (/v1/chat/completions):

json
{ "id": "chatcmpl-...", "object": "chat.completion", "model": "openai/gpt-5",
  "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Hello!" }, "finish_reason": "stop" }],
  "usage": { "prompt_tokens": 8, "completion_tokens": 2, "total_tokens": 10 } }

Streaming (stream:true) emits SSE: data: {choices:[{delta:{content:"..."}}]}\n\n ... data: [DONE]\n\n.

Anthropic (/v1/messages):

json
{ "id": "msg_...", "type": "message", "role": "assistant", "model": "cc/claude-opus-4-7",
  "content": [{ "type": "text", "text": "Hello!" }],
  "stop_reason": "end_turn", "usage": { "input_tokens": 8, "output_tokens": 2 } }

© decolua, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/9router-chat of decolua/9router.

Open the folder on GitHubat commit ce4460e

Compare with similar skills

9Router Chat Completions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

9Router Chat Completions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
9Router Chat Completions this skilldecolua/9router30k—~635Automated safety check: PassMIT
Using Ccproxy Inspectorstarbaser/ccproxy350—~2.7kAutomated safety check: PassCustom licence
Using Ccproxy APIstarbaser/ccproxy350—~4kAutomated safety check: PassCustom licence
ClawRouter LLM GatewayBlockRunAI/ClawRouter6.6k—~6.8kAutomated safety check: PassMIT
Caching Architecturemajiayu000/litellm-rs117—~2kAutomated safety check: PassMIT
Neon AI Gatewayneondatabase/agent-skills100—~5.1kAutomated safety check: NotesApache-2.0

Similar skills

  • Using Ccproxy Inspector

    starbaser/ccproxy

    Operates the ccproxy inspector MITM system for intercepting, inspecting, and transforming LLM API traffic.

    350 GitHub stars~2.7k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Using Ccproxy API

    starbaser/ccproxy

    Guides users through ccproxy as an OpenAI-compatible and Anthropic-compatible LLM API server with SDK integration, OAuth authentication, sentinel key substitution, model routing, and troubleshooting.

    350 GitHub stars~4k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • ClawRouter LLM Gateway

    BlockRunAI/ClawRouter

    Describes ClawRouter, a local proxy that forwards each LLM request to the blockrun.ai gateway, which routes to a cheaper capable model, paid by USDC wallet or API key credit.

    6.6k GitHub stars~6.8k tokensUpdated 4 days ago
    AI & LLM EngineeringAuto-check passed
  • Caching Architecture

    majiayu000/litellm-rs

    LiteLLM-RS response caching architecture. An agent skill from majiayu000/litellm-rs.

    117 GitHub stars~2k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Neon AI Gateway

    neondatabase/agent-skills

    Official

    One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks.

    100 GitHub stars~5.1k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • Codex CLI OmniRoute Config

    diegosouzapw/OmniRoute

    A step-by-step workflow for pointing the OpenAI Codex CLI at an OmniRoute gateway on Linux, macOS or Windows, plus settings that keep multi-hour sessions alive.

    74k GitHub stars~686 tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from decolua/9router

All 9 skills in this repo
  • Sets up access to the 9Router AI gateway, an OpenAI-compatible REST endpoint for chat, images, speech, embeddings, web search and web fetch, and indexes its capability skills.

    30k GitHub stars~744 tokensUpdated yesterday
    Auto-check passed
  • Embeddings via 9Router

    decolua/9router

    Generates vector embeddings through the 9Router /v1/embeddings endpoint, using models from providers such as OpenAI, Gemini, Mistral and Voyage for RAG and semantic search.

    30k GitHub stars~604 tokensUpdated yesterday
    Auto-check passed
  • Generates images through a 9Router gateway's image endpoint, with model discovery, the request fields and per-provider quirks for OpenAI, Gemini, MiniMax and others.

    30k GitHub stars~830 tokensUpdated yesterday
    Auto-check passed
  • 9Router Speech-to-Text

    decolua/9router

    Transcribes audio files into text or subtitles through 9Router's Whisper-compatible endpoint, using models from OpenAI, Groq, Gemini, Deepgram and others.

    30k GitHub stars~914 tokensUpdated yesterday
    Auto-check passed
  • 9Router Text to Speech

    decolua/9router

    Turns text into spoken audio through a 9Router server, choosing among voices from OpenAI, ElevenLabs, Deepgram, Edge TTS and other providers.

    30k GitHub stars~765 tokensUpdated yesterday
    Auto-check passed
  • Submits text-to-video or image-to-video jobs to xAI Grok Imagine through 9Router, then polls the job and downloads the finished MP4.

    30k GitHub stars~992 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about 9Router Chat Completions

What does 9Router Chat Completions do?

Sends chat and code-generation requests through a 9Router gateway using OpenAI or Anthropic message formats, with streaming and auto-fallback combos. The skill calls a 9Router endpoint set by the NINEROUTER_URL variable, with NINEROUTER_KEY added when authentication is enabled. It shows two request formats: POST to /v1/chat/completions in OpenAI format and POST to /v1/messages in Anthropic format, with curl examples and a JavaScript example that points the OpenAI SDK at the router's base URL.

When should I use 9Router Chat Completions?

9Router Chat Completions fits situations like: asking another LLM a question through a 9Router gateway; generating or summarizing text with a specific routed model; listing the models and combos a 9Router instance offers; streaming a completion through the gateway.

How do I install 9Router Chat Completions in Claude Code?

Run `npx skills add decolua/9router --skill 9router-chat -a claude-code`. Or copy the skill folder (skills/9router-chat in decolua/9router) into .claude/skills/9router-chat in your project. Claude Code loads it when a task matches its description.

How do I install 9Router Chat Completions in Codex?

Run `npx skills add decolua/9router --skill 9router-chat -a codex`. Or copy the skill folder (skills/9router-chat in decolua/9router) into .agents/skills/9router-chat in your project. Codex loads it when a task matches its description.

Can I use 9Router Chat Completions in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add decolua/9router --skill 9router-chat -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/9router-chat, .gemini/skills/9router-chat, .github/skills/9router-chat and .opencode/skills/9router-chat in your project.

What does 9Router Chat Completions need to run?

Going by SKILL.md and its folder, 9Router Chat Completions needs the command-line tools its instructions call (curl and jq) and credentials named NINEROUTER_KEY. Our summary lists: A running 9Router instance, with its URL in NINEROUTER_URL; NINEROUTER_KEY when authentication is enabled.

Does 9Router Chat Completions access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is 9Router Chat Completions safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does 9Router Chat Completions use?

9Router Chat Completions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does 9Router Chat Completions use?

About 635 tokens (SKILL.md is roughly 2.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to 9Router Chat Completions?

Skills that share tags, products or a category with 9Router Chat Completions: Using Ccproxy Inspector (starbaser/ccproxy, 350 stars), Using Ccproxy API (starbaser/ccproxy, 350 stars), ClawRouter LLM Gateway (BlockRunAI/ClawRouter, 6.6k stars) and Caching Architecture (majiayu000/litellm-rs, 117 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains 9Router Chat Completions?

decolua (a GitHub user) maintains it in decolua/9router, which has 30,491 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.

Source: decolua/9router on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.