cc-router: Skill for Claude Code

.claude/skills/new-provider/SKILL.md

new-provider is a skill for Claude Code from finch-xu/cc-router. It costs 165 tokens per session (3,199 once invoked), scanned A, original, MIT.

A workflow for adding a new large-language-model provider to the cc-router application using a YAML description and synchronized project changes. A provider is a company or service that supplies AI models through an API.

In plain words
What is it for?
Use it to add support for providers such as OpenRouter, Together, Groq, or Ollama by documenting endpoints, authentication, model discovery, and compatibility.
Why use it?
It identifies the provider details that must be researched and checks that configuration, bundled resources, tests, documentation, and optional icons stay synchronized.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is finch-xu/cc-router's own configuration. It tells Claude Code how to work on cc-router itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-router configures →

Reuse

Borrowing it

Nothing to install: this file belongs to finch-xu/cc-router. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/finch-xu/cc-router/main/.claude/skills/new-provider/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/finch-xu/cc-router

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for new-provider

README.md
[![agentmods](https://agentmods.dev/badge/skills/finch-xu/cc-router/new-provider/github.svg)](https://agentmods.dev/skills/finch-xu/cc-router/new-provider)
Your own site
<a href="https://agentmods.dev/skills/finch-xu/cc-router/new-provider"><img src="https://agentmods.dev/badge/skills/finch-xu/cc-router/new-provider/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for new-provider

Your own site · 80×15
<a href="https://agentmods.dev/skills/finch-xu/cc-router/new-provider"><img src="https://agentmods.dev/badge/skills/finch-xu/cc-router/new-provider.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,199 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00165 $0.03199
Opus 5.5 $0.00066 $0.01280
Sonnet 5.5 $0.00033 $0.00640
Haiku 4.5 $0.00016 $0.00320

Measured 11d ago against content hash f2fad6520293, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

new-provider scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/new-provider/SKILL.md · 203 lines

How it starts

The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.

新增 Provider 工作流

这个 skill 在做什么

cc-router 的 Provider 抽象 = 「YAML 描述符」。把一个新厂商接入路由层不需要写 Rust——只需要一份遵循 providers/_schema.json 的 YAML,放进 providers/ 即自动内嵌进二进制;唯一的同步改动是可选的品牌图标。

这份 skill 的价值在于:

  1. 决策清单:哪些字段是「研究上游文档才能填对」的关键字段(auth、base_url、/models 端点)
  2. 同步检查清单:配套改动一处不漏(漏一处会导致 release 包加载失败 / 测试断言失败 / 文档失同步)
  3. 常见陷阱:哪些上游 API 设计会让默认假设崩塌(无 /models、key 被忽略、messages 与 /models 不同域)

触发条件

走本 skill 当且仅当用户在 cc-router 仓库内做「新增 provider」类工作。如果只是改既有 YAML 字段(如调 endpoint 顺序、改 description)则不必走完整流程,直接编辑即可。

三步工作流(顺序执行)

Step 1:研究上游文档,决定 YAML 字段

先查清楚 6 件事(用 WebFetch 或问用户):

字段 关键问题
endpoints[].base_url + messages_path Anthropic 兼容端点完整 URL?是否多区域/多 endpoint?
auth.header_format x-api-key raw(仅 Anthropic 系)还是 Authorization: Bearer?
auth.header_name 多数家是 Authorization,少数是 x-api-key/自定义
required_headers 是否要 anthropic-version?是否要其他厂商专属 header?
model_discovery 是否有 Anthropic 风格 /v1/models 端点?路径?是否与 messages 同域?需要独立 URL 时用 model_discovery.url 字段(完整 URL 覆盖,不走 base_url 拼接)
是否需 API Key 极少数厂商(如 Ollama 本地)不校验 key——仍要保留字段,文档里说明

判断 compatibility 字段:

  • verified:自己跑通过实际请求 + SSE 流式
  • partial:有限制(如无 /models、流式有兼容 quirks)
  • untested:仅按文档接入未实测

Step 2:写 YAML 文件

位置:src-tauri/providers/<id>.yaml

id 命名:小写英文/数字/下划线(schema 强制 ^[a-z0-9_]+$)。优先用厂商英文短名(anthropic、deepseek、zhipu),不要带版本号或地域后缀。

模板骨架:

id: <provider_id>
display_name: "<厂商展示名>"   # 纯品牌名 (四语相同) 写字符串; 含中文就写成下面 description 的四语形式
icon: ""  # 没有 lucide brand icon 时留空走 Bot 兜底; 有则填 BRAND_MAP key
description:
  zh: "<一句话描述>"
  zh-Hant: "<繁體中文(台灣用語)>"
  en: "<English>"
  ja: "<日本語>"
homepage: "<主页 URL>"
docs_url: "<API 文档 URL>"
api_key_url: "<控制台密钥页面 URL>"

compatibility: untested  # 或 partial/verified
compatibility_notes:
  zh: |
    <需要用户知道的限制:流式 quirks、模型列表问题、特殊计费等>
  zh-Hant: |
    <繁體中文>
  en: |
    <English>
  ja: |
    <日本語>

endpoints:
  - id: <endpoint_id>
    label:
      zh: "<UI 显示的人话名称, 如「国内版 · 按量付费 API」>"
      zh-Hant: "<如 中國版 · 按量計費 API>"
      en: "<如 China · Pay-as-you-go API>"
      ja: "<如 中国版 · 従量課金 API>"
    description:
      zh: "<细节说明>"
      zh-Hant: "<繁體中文>"
      en: "<English>"
      ja: "<日本語>"
    base_url: "<https://...>"
    messages_path: "/v1/messages"
    region: <china|global|eu|local>   # 订阅列表页据此显示「中国 / 全球 / 欧洲」标签, local 不显示
    billing: <subscription|pay_as_you_go|free>

default_endpoint: <endpoint_id>  # 必须是上面 endpoints[].id 之一

auth:
  type: api_key
  header_name: "Authorization"      # 或 "x-api-key"
  header_format: bearer             # 或 raw

required_headers:
  anthropic-version: "2023-06-01"   # 大部分厂商都接受这个 header

forward_headers: []

model_discovery:
  enabled: true                     # 无 /models 接口则填 false
  path: "/v1/models"                # 或 url: "https://..." 完整覆盖
  cache_ttl_hours: 24
  example_models:                   # enabled: false 时作为 UI 输入提示
    - "<示例模型 ID>"

Read the full file on GitHub · 203 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago Changed · +6 lines f2fad6520293
  2. 1mo ago Changed · +22 lines 7476b1a3cab5
  3. 1mo ago Changed · -23 lines 9e1b9cf7fba3
  4. 1mo ago Changed · -4 lines · -1 tokens per session 3f2af6aaa124
  5. 1mo ago First seen · 202 lines · 166 tokens per session scan A 24e660749a0f

Subscribe to this mod's changes

new-provider is a skill published in the GitHub repository finch-xu/cc-router (287 stars, last pushed 3d ago), licensed MIT. It adds 165 tokens to every session and 3,199 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

hybrid-search-implementation

Plan, implement, or review hybrid search implementation work in an existing codebase with compatibility, security, and verification controls. Use when the user explicitly requests hybrid search implementation work.

sandbaseai/sandbase-skills · 41 tokens

gemini-api

Plan, implement, or review gemini api work in an existing codebase with compatibility, security, and verification controls. Use when the user explicitly requests gemini api work.

sandbaseai/sandbase-skills · 39 tokens

gemini-api-agent-platform

Guides the usage of the Gemini API on Agent Platform with the Google Gen AI SDK for enterprise AI applications. Covers SDK usage (Python, JS/TS, Go, Java, C#), capabilities like Live API, tools, multimedia generation, caching, and batch prediction.

davila7/claude-code-templates · 61 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

deepstream-sop

Use this skill when building, deploying, evaluating, debugging, or measuring latency for the DeepStream SOP Inference Microservice — a GPU-accelerated FastAPI service that detects whether operators perform assembly-line steps in order via event boundary detection (GEBD) plus VLM classification. Trigger even if the…

NVIDIA/skills · 219 tokens

clawrouter

Hosted-gateway LLM router — save 84% on inference costs. A local proxy that forwards each request to the blockrun.ai gateway, which routes to the cheapest capable model across 90 models from OpenAI, Anthropic, Google, DeepSeek, xAI, Z.AI, and more. Free open-weight models included. Also exposes realtime market data…

BlockRunAI/ClawRouter · 171 tokens