Borrowing it
Nothing to install: this file belongs to majiayu000/litellm-rs. 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/majiayu000/litellm-rs/main/.claude/skills/provider-development/SKILL.mdgit clone --depth 1 https://github.com/majiayu000/litellm-rsWrote 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/majiayu000/litellm-rs/provider-development)<a href="https://agentmods.dev/skills/majiayu000/litellm-rs/provider-development"><img src="https://agentmods.dev/badge/skills/majiayu000/litellm-rs/provider-development/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/majiayu000/litellm-rs/provider-development"><img src="https://agentmods.dev/badge/skills/majiayu000/litellm-rs/provider-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Data Exfiltration · line 144 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00048 | $0.03443 |
| Opus 5 | $0.00024 | $0.01722 |
| Sonnet 5 | $0.00010 | $0.00689 |
| Haiku 4.5 | $0.00005 | $0.00344 |
Grade A, and why
provider-development 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.
How it starts
The opening of the file, as written. The whole thing — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LiteLLM-RS Provider 开发指南
架构概述
本项目采用统一错误 + 闭集 Provider 枚举派发。LLMProvider
统一各实现的方法签名,但路由部署存放的是具体 Provider 枚举,而不是
dyn LLMProvider trait object。
当前架构层次
┌────────────────────────────────────────────────────────┐
│ 网关层 (Gateway) │
│ LiteLLMError = GatewayError(18 个变体) │
│ - 别名定义: core/types/errors/litellm.rs │
│ - 枚举定义: utils/error/gateway_error/types.rs │
│ - 处理路由、配置、认证等网关级错误 │
└────────────────────────────────────────────────────────┘
↓
┌────────────────────────────────────────────────────────┐
│ Provider 层 │
│ ProviderError(经 unified_provider 模块导出, │
│ 定义于 unified_provider_error.rs) │
│ - 统一 provider 错误,24 个变体 │
│ - 每个变体包含 provider: &'static str 字段 │
│ - 丰富的工厂方法和上下文信息 │
└────────────────────────────────────────────────────────┘
↓
┌────────────────────────────────────────────────────────┐
│ 各 Provider 实现(两层结构) │
│ - Tier 1: registry/catalog.rs 目录条目(def_chat 等),│
│ 经 OpenAILikeProvider 路由,无专属代码 │
│ - Tier 2: 代码型 provider 目录, │
│ 实现 LLMProvider 并注册到闭集 Provider 枚举 │
└────────────────────────────────────────────────────────┘
Provider 数量随版本演进,不在此硬编码。枚举方法:
# 两个计数都会包含各自的 helper 定义,因此分别减 1
grep -c 'def_chat(' src/core/providers/registry/catalog.rs
grep -c 'def_local_chat(' src/core/providers/registry/catalog.rs
# 排除基础设施目录后再人工确认代码型 provider
ls -d src/core/providers/*/ | grep -vE '/(base|factory|macros|registry)/'
当前派发契约
Provider 定义在 src/core/providers/mod.rs,由本地 dispatch_provider! 宏把
方法转发给具体实现。宏分别维护 sync、async_err、value 和
async_direct 四类展开臂;Router 的 deployment 持有这个枚举,因此 Tier 2 provider
仅实现 LLMProvider 还不够;还必须添加枚举变体、dispatch/factory 分支及模块
注册。Tier 1 catalog provider 复用现有的 Provider::OpenAILike 变体,所以无需
为每个兼容端点增加枚举成员。
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 351 lines · 48 tokens per session scan A dbc80ac47419
provider-development is a skill published in the GitHub repository majiayu000/litellm-rs (112 stars, last pushed 2d ago), licensed MIT. It adds 48 tokens to every session and 3,443 once invoked, about $0.0002 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
omni-inference
The core OpenAI-compatible inference endpoints: chat completions, embeddings, images, audio (TTS/STT), moderations, rerank, and the Responses API. The primary integration surface for AI agents.
calling-llms
Use when sending chat completions through liter-llm and routing to a specific provider via the provider/model prefix. Covers the chat call shape, provider routing, modelhint, message roles, and error categories.
running-the-proxy
Use when running the liter-llm api OpenAI-compatible gateway — virtual keys, per-key rate limits, budgets, cost tracking, and model routing. Covers the TOML config and the 22 REST endpoints.
streaming-responses
Use when streaming tokens incrementally from an LLM via liter-llm over SSE or async iterators. Covers chatstream, delta handling, and null-content chunks.
keirouter
Entry point for KeiRouter — local/remote AI gateway with OpenAI-compatible REST for chat, image, TTS, embeddings, web search, web fetch. Use when the user mentions KeiRouter, KEIROUTERURL, or wants AI without writing provider boilerplate. This skill covers setup + indexes capability skills; fetch the relevant…
integrate-ai-gateway
Integrate applications with AI Gateway using @macpaw/ai-sdk. Use for NestJS, Next.js, Vercel AI SDK, raw fetch migrations, video generation, MacPaw AI, Setapp AI, createAIGatewayProvider, createGatewayFetch, createVideoClient, and AI Gateway auth/error wiring.