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.
curl -O https://raw.githubusercontent.com/finch-xu/cc-router/main/.claude/skills/new-provider/SKILL.mdgit clone --depth 1 https://github.com/finch-xu/cc-routerWrote 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.
[](https://agentmods.dev/skills/finch-xu/cc-router/new-provider)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once 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 |
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.
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 的价值在于:
- 决策清单:哪些字段是「研究上游文档才能填对」的关键字段(auth、base_url、/models 端点)
- 同步检查清单:配套改动一处不漏(漏一处会导致 release 包加载失败 / 测试断言失败 / 文档失同步)
- 常见陷阱:哪些上游 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: "<厂商展示名>"
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>"
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.
- 4d ago Changed · -4 lines · -1 tokens per session 3f2af6aaa124
- 11d ago First seen · 202 lines · 166 tokens per session scan A 24e660749a0f
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.
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.
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…
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…
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…
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"…
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…