Agent skill

Keirouter Chat

by mydisha in mydisha/keirouter

Chat / code generation via KeiRouter using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos.

MITAuto-check passedAI & LLM Engineering

Install Keirouter Chat

skills CLI
$ npx skills add mydisha/keirouter --skill keirouter-chat -a claude-code

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

GitHub CLI
$ gh skill install mydisha/keirouter keirouter-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/mydisha/keirouter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/keirouter-chat .claude/skills/keirouter-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
keirouter-chat
GitHub stars
147
Token cost
~859 tokens
SKILL.md length
109 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Chat / code generation via KeiRouter using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos.

  • The user wants to ask an LLM
  • SKILL.md covers Endpoints, Discover, OpenAI format and Anthropic format, plus 2 more sections
  • Calls curl and jq; needs KEIROUTER_KEY
  • Run prompts through KeiRouter

What it does

Keirouter Chat is an agent skill from mydisha/keirouter. Chat / code generation via KeiRouter 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 KeiRouter.

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering LLM API integration. It works with OpenAI, DeepSeek, Mistral AI and Ollama. The repository describes itself as: Your friendly, blazing-fast, self-hostable AI gateway. The licence is MIT.

When your agent uses it

  • The user wants to ask an LLM
  • Run prompts through KeiRouter

Example prompts

  • “/keirouter-chat”

Requirements

  • A credential in KEIROUTER_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 3d8b702. 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:

    • KEIROUTER_KEY

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

Context cost

Keirouter Chat loads about 859 tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 109 words of instructions outside code blocks.

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

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 mydisha/keirouter at commit 3d8b702, republished under its MIT licence (© mydisha). 109 words, ~859 tokens.

Download SKILL.mdSave it as .claude/skills/keirouter-chat/SKILL.md (or your agent's skills folder).
name
keirouter-chat
description
Chat / code generation via KeiRouter 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 KeiRouter.

KeiRouter — Chat

Requires KEIROUTER_URL (and KEIROUTER_KEY if auth enabled). See https://raw.githubusercontent.com/mydisha/keirouter/main/skills/keirouter/SKILL.md for setup.

Endpoints

  • POST $KEIROUTER_URL/v1/chat/completions — OpenAI format
  • POST $KEIROUTER_URL/v1/messages — Anthropic format
  • POST $KEIROUTER_URL/v1/responses — OpenAI Responses format

Discover

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

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

OpenAI format

bash
curl -X POST $KEIROUTER_URL/v1/chat/completions \
  -H "Authorization: Bearer $KEIROUTER_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.KEIROUTER_URL}/v1`, apiKey: process.env.KEIROUTER_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 $KEIROUTER_URL/v1/messages \
  -H "Authorization: Bearer $KEIROUTER_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/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": "anthropic/claude-opus-4-7",
  "content": [{ "type": "text", "text": "Hello!" }],
  "stop_reason": "end_turn", "usage": { "input_tokens": 8, "output_tokens": 2 } }

Provider quick reference

Providermodel formatExamples
OpenAIopenai/<model>openai/gpt-5, openai/gpt-4o
Anthropicanthropic/<model>anthropic/claude-opus-4-7, anthropic/claude-sonnet-4-6
Claude Codecc/<model>cc/claude-opus-4-7
Geminigemini/<model>gemini/gemini-2.5-pro, gemini/gemini-2.5-flash
Groqgroq/<model>groq/llama-3.3-70b
DeepSeekds/<model>ds/deepseek-chat, ds/deepseek-coder
OpenRouteropenrouter/<model>openrouter/anthropic/claude-opus-4-7
Mistralmistral/<model>mistral/mistral-large-latest
xAIxai/<model>xai/grok-3
Ollama Localollama-local/<model>ollama-local/llama3.2
Custom OpenAIcustom-openai/<model>Any model on your custom endpoint

© mydisha, 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/keirouter-chat of mydisha/keirouter.

Open the folder on GitHubat commit 3d8b702

Compare with similar skills

Keirouter Chat 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.

Keirouter Chat compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Keirouter Chat this skillmydisha/keirouter147—~859Automated safety check: PassMIT
Configuring Visionoxbshw/watch-skill469—~509Automated safety check: NotesMIT
PiDeck Usage Probe Helperayuayue/PiDeck1k—~1.4kAutomated safety check: PassMIT
OpenCode Agent Provider for NanoClawnanocoai/nanoclaw31k—~5kAutomated safety check: NotesMIT
Awesome Free LLM APIsLeoYeAI/openclaw-master-skills2.2k—~4.1kAutomated safety check: PassMIT
ModLens Image Vision Bridgeliustack/modlens4.2k—~1.3kAutomated safety check: NotesMIT

Similar skills

  • Configuring Vision

    oxbshw/watch-skill

    The user wants to connect an LLM or vision provider, already has an API key, asks "can I use OpenAI/Anthropic/Gemini/OpenRouter", wants local Ollama, or needs different cheap and strong models.

    469 GitHub stars~509 tokensUpdated 24 days ago
    AI & LLM EngineeringAuto-check: notes
  • Helps show a model provider's usage, balance or quota in PiDeck: checks built-in support, points to the dialog templates, or writes a custom probe entry.

    1k GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Installs OpenCode as an optional NanoClaw agent runtime, reaching OpenRouter, OpenAI, Google, DeepSeek and others through OpenCode's own configuration.

    31k GitHub stars~5k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check: notes
  • Awesome Free LLM APIs

    LeoYeAI/openclaw-master-skills

    Reference guide for permanent free-tier LLM APIs with rate limits, model lists, and OpenAI-compatible integration patterns.

    2.2k GitHub stars~4.1k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Gives text-only models sight by running the modlens CLI on an image path or URL and returning structured JSON evidence with transcribed text, layout and semantics.

    4.2k GitHub stars~1.3k tokensUpdated 5 days ago
    AI & LLM EngineeringAuto-check: notes
  • 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 today
    AI & LLM EngineeringAuto-check passed

More from mydisha/keirouter

All 8 skills in this repo
  • Keirouter

    mydisha/keirouter

    Entry point for KeiRouter — local/remote AI gateway with OpenAI-compatible REST for chat, image, TTS, embeddings, web search, web fetch.

    147 GitHub stars~995 tokensUpdated 28 days ago
    Auto-check passed
  • Keirouter Embeddings

    mydisha/keirouter

    Generate vector embeddings via KeiRouter /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia embedding models for RAG, semantic search, similarity.

    147 GitHub stars~577 tokensUpdated 28 days ago
    Auto-check passed
  • Keirouter Image

    mydisha/keirouter

    Generate images via KeiRouter /v1/images/generations using OpenAI DALL-E / Gemini Imagen / FLUX / MiniMax / Stability AI / Fal.ai models.

    147 GitHub stars~691 tokensUpdated 28 days ago
    Auto-check passed
  • Keirouter Stt

    mydisha/keirouter

    Speech-to-text via KeiRouter /v1/audio/transcriptions using OpenAI Whisper / Groq / Gemini / Deepgram / AssemblyAI models.

    147 GitHub stars~680 tokensUpdated 28 days ago
    Auto-check passed
  • Keirouter Tts

    mydisha/keirouter

    Text-to-speech via KeiRouter /v1/audio/speech using OpenAI / ElevenLabs / Deepgram / Edge TTS / Google TTS / Inworld voices.

    147 GitHub stars~599 tokensUpdated 28 days ago
    Auto-check passed
  • Keirouter Web Fetch

    mydisha/keirouter

    Fetch URL → markdown / text / HTML via KeiRouter /v1/web/fetch using Firecrawl / Jina Reader / Tavily Extract / Exa Contents.

    147 GitHub stars~741 tokensUpdated 28 days ago
    Auto-check passed

Questions about Keirouter Chat

What does Keirouter Chat do?

Chat / code generation via KeiRouter using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos. Keirouter Chat is an agent skill from mydisha/keirouter. Chat / code generation via KeiRouter using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos.

When should I use Keirouter Chat?

Keirouter Chat fits situations like: the user wants to ask an LLM; run prompts through KeiRouter.

How do I install Keirouter Chat in Claude Code?

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

How do I install Keirouter Chat in Codex?

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

Can I use Keirouter Chat 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 mydisha/keirouter --skill keirouter-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/keirouter-chat, .gemini/skills/keirouter-chat, .github/skills/keirouter-chat and .opencode/skills/keirouter-chat in your project.

What does Keirouter Chat need to run?

Going by SKILL.md and its folder, Keirouter Chat needs the command-line tools its instructions call (curl and jq) and credentials named KEIROUTER_KEY. Our summary lists: A credential in KEIROUTER_KEY.

Does Keirouter Chat 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 Keirouter Chat 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 Keirouter Chat use?

Keirouter Chat 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 Keirouter Chat use?

About 859 tokens (SKILL.md is roughly 3.4k 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 Keirouter Chat?

Skills that share tags, products or a category with Keirouter Chat: Configuring Vision (oxbshw/watch-skill, 469 stars), PiDeck Usage Probe Helper (ayuayue/PiDeck, 1k stars), OpenCode Agent Provider for NanoClaw (nanocoai/nanoclaw, 31k stars) and Awesome Free LLM APIs (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Keirouter Chat?

mydisha (a GitHub user) maintains it in mydisha/keirouter, which has 147 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 11, 2026.

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