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 (2,522 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 →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is "../LICENSE".

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 2,522 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.02522
Opus 5 $0.00082 $0.01261
Sonnet 5 $0.00033 $0.00504
Haiku 4.5 $0.00016 $0.00252

Measured 4d ago against content hash 3f2af6aaa124, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 4d 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 · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 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,加上 2 处机械同步改动(bundle resources / 可选图标)。

这份 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_]+$)。优先用厂商英文短名(anthropicdeepseekzhipu),不要带版本号或地域后缀。

模板骨架

id: <provider_id>
display_name: "<厂商展示名>"
icon: ""  # 没有 lucide brand icon 时留空走 Bot 兜底; 有则填 BRAND_MAP key
description: "<一句话描述>"
homepage: "<主页 URL>"
docs_url: "<API 文档 URL>"
api_key_url: "<控制台密钥页面 URL>"

compatibility: untested  # 或 partial/verified
compatibility_notes: |
  <需要用户知道的限制:流式 quirks、模型列表问题、特殊计费等>

endpoints:
  - id: <endpoint_id>
    label: "<UI 显示的人话名称, 含「订阅/按量付费/国内版/国际版」等区分>"
    description: "<细节说明>"
    base_url: "<https://...>"
    messages_path: "/v1/messages"
    region: <china|global|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 · 198 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. 4d ago Changed · -4 lines · -1 tokens per session 3f2af6aaa124
  2. 11d 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 (237 stars, last pushed 4d ago), licensed MIT. It adds 165 tokens to every session and 2,522 once invoked, about $0.0008 per session on Opus 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

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

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 78 models from OpenAI, Anthropic, Google, DeepSeek, xAI, Z.AI, and more. 7 free open-weight models included. Also exposes realtime market data…

BlockRunAI/ClawRouter · 222 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

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

varlock

Secure environment variable management with Varlock. Use when handling secrets, API keys, credentials, or any sensitive configuration. Ensures secrets are never exposed in terminal, logs, or LLM context. Provides guidance around integrating varlock into a project, reading/editing .env.schema and other .env files…

dmno-dev/varlock · 109 tokens