9routerx-chat — Claude Code skill: what it does, how to install
The 9routerx-chat Claude Code skill sends language-model requests through 9RouterX. It activates for code generation, text summaries, and other prompts to a model.
MIT ★ 259 updated 2026-11-16
npx skills add yanstd888/9routerx --skill 9routerx-chat -a claude-codeWhat 9routerx-chat does
The skill routes prompts to language models through the 9RouterX API. It accepts the OpenAI /v1/chat/completions and Anthropic /v1/messages formats, with streaming output. Model combos such as vip and mycodex can fall back to another provider when a request fails.
A running 9RouterX server and the 9ROUTERX_URL variable are required. Set 9ROUTERX_KEY too if server authentication is enabled. Available models and their parameters can be fetched through /v1/models and /v1/models/info. Requests cannot be sent without a reachable server address.
What it helps with
- send a model prompt through 9RouterX
- generate code from a written task
- summarize supplied text
- retry a model combo through another provider after a failure
Example prompts for the agent
- Generate a function that validates an email address through 9RouterX.
- Summarize this text by sending the prompt through 9RouterX.
- Ask a model through 9RouterX and stream its response.
How to install 9routerx-chat
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-chat -a claude-code2Manually: put the files in place
~/.claude/skills/9routerx-chat/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/9routerx-chat/
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-chat -a codex2Manually: put the files in place
.agents/skills/9routerx-chat/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-chat -a cursor2Manually: put the files in place
.cursor/skills/9routerx-chat/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install yanstd888/9routerx skills/9routerx-chat2Manually: put the files in place
.github/skills/9routerx-chat/SKILL.md1Skills CLI (Vercel)
npx skills add yanstd888/9routerx --skill 9routerx-chat -a gemini-cli2Platform CLI
gemini skills install https://github.com/yanstd888/9routerx --path skills/9routerx-chatManually: put the files in place
.devin/skills/9routerx-chat/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 9routerx-chat
How do I install 9routerx-chat in Claude Code?
Run npx skills add yanstd888/9routerx --skill 9routerx-chat -a claude-code. The skill file is installed at ~/.claude/skills/9routerx-chat/SKILL.md.
What does 9routerx-chat do?
It sends prompts to models through 9RouterX for code generation, answers, or text summaries. The skill supports OpenAI and Anthropic formats, streamed output, and provider fallback for model combos.
What does 9routerx-chat need to run?
It needs a running 9RouterX server and the 9ROUTERX_URL variable. Set 9ROUTERX_KEY as well when server authentication is enabled.
Source text
SKILL.md · MIT
---
name: 9routerx-chat
description: Chat / code generation via 9RouterX 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 9RouterX.
---
# 9RouterX — Chat
Requires `9ROUTERX_URL` (and `9ROUTERX_KEY` if auth enabled). See https://raw.githubusercontent.com/yanstd888/9routerx/refs/heads/main/skills/9routerx/SKILL.md for setup.
## Endpoints
- `POST $9ROUTERX_URL/v1/chat/completions` — OpenAI format
- `POST $9ROUTERX_URL/v1/messages` — Anthropic format
## Discover
```bash
curl $9ROUTERX_URL/v1/models | jq '.data[].id'
# Per-model metadata (contextWindow, params)
curl "$9ROUTERX_URL/v1/models/info?id=openai/gpt-4o"
```
Combos (e.g. `vip`, `mycodex`) auto-fallback through multiple providers.
## OpenAI format
```bash
curl -X POST $9ROUTERX_URL/v1/chat/completions \
-H "Authorization: Bearer $9ROUTERX_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.9ROUTERX_URL}/v1`, apiKey: process.env.9ROUTERX_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 $9ROUTERX_URL/v1/messages \
-H "Authorization: Bearer $9ROUTERX_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 } }
```
© yanstd888 · MIT · yanstd888/9routerx