Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yanstd888/9routerx --skill 9routerx-chat -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/9routerx-chat/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/9routerx-chat/

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

Similar skills

All skills for AI and ML →

From the same set9

9routerx-embeddings The 9routerx-embeddings Claude Code skill creates text embeddings through the 9RouterX API. The agent uses it for RAG, semantic search, and text similarity tasks. CX Codex +1 ★ 259repo stars 9routerx Claude Code skill connects your agent to the 9RouterX gateway. It routes OpenAI-compatible REST calls for chat, speech, embeddings, and web fetch to multiple AI models. CX Codex +1 ★ 259repo stars 9routerx-tts The 9routerx-tts Claude Code skill turns text into speech through the 9RouterX API. It runs for voiceovers, generated audio, or reading text aloud. CX Codex +1 ★ 259repo stars 9routerx-image The 9routerx-image Claude Code skill creates images through the 9RouterX API. It activates when a request asks for a picture or text-to-image generation. CX Codex +1 ★ 259repo stars 9routerx-stt 9routerx-stt — a skill for Claude Code and Codex that routes audio transcription requests through 9RouterX. Transcribes voice recordings and generates subtitle files across multiple model backends. CX Codex +1 ★ 259repo stars 9routerx-web-fetch The 9routerx-web-fetch Claude Code skill retrieves webpage content as Markdown, plain text, or HTML. The agent uses it to read an article or extract material from a URL. CX Codex +1 ★ 259repo stars 9routerx-video The 9routerx-video Claude Code skill creates videos through xAI Grok Imagine. It runs when asked to generate a clip from text or an image. CX Codex +1 ★ 259repo stars 9routerx-web-search The 9routerx-web-search Claude Code skill searches the web and public X posts through 9RouterX. It runs when an agent is asked to find articles, information, or posts on X. CX Codex +1 ★ 259repo stars

Project sponsors

Companies that keep this analytics open