litellm-rs: Skill for Claude Code

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

provider-development is a skill for Claude Code from majiayu000/litellm-rs. It costs 48 tokens per session (3,443 once invoked), scanned A, original, MIT.

A development guide for adding language-model providers to LiteLLM-RS, a gateway that connects applications to multiple AI services. It explains provider registration, provider-specific code, and the shared error handling used by the gateway.

In plain words
What is it for?
Use it when adding a new provider, registering a provider in the catalogue, implementing provider requests, standardizing provider errors, or moving older error types to the shared ProviderError system.
Why use it?
It prevents each provider from inventing its own incompatible error and dispatch behavior. It also separates providers that only need a catalogue entry from those that need a full implementation.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is majiayu000/litellm-rs's own configuration. It tells Claude Code how to work on litellm-rs 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 litellm-rs configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/majiayu000/litellm-rs/main/.claude/skills/provider-development/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/majiayu000/litellm-rs

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 provider-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/litellm-rs/provider-development/github.svg)](https://agentmods.dev/skills/majiayu000/litellm-rs/provider-development)
Your own site
<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.

agentmods 80×15 button for provider-development

Your own site · 80×15
<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>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,443 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 warn 7 Sept 2026
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.
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.00048 $0.03443
Opus 5 $0.00024 $0.01722
Sonnet 5 $0.00010 $0.00689
Haiku 4.5 $0.00005 $0.00344

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

Security

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.

.claude/skills/provider-development/SKILL.md · 351 lines

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! 宏把 方法转发给具体实现。宏分别维护 syncasync_errvalueasync_direct 四类展开臂;Router 的 deployment 持有这个枚举,因此 Tier 2 provider 仅实现 LLMProvider 还不够;还必须添加枚举变体、dispatch/factory 分支及模块 注册。Tier 1 catalog provider 复用现有的 Provider::OpenAILike 变体,所以无需 为每个兼容端点增加枚举成员。

Read the full file on GitHub · 351 lines

Files

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.

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 First seen · 351 lines · 48 tokens per session scan A dbc80ac47419

Subscribe to this mod's changes

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.

Related

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.

diegosouzapw/OmniRoute · 47 tokens

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.

xberg-io/liter-llm · 49 tokens

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.

xberg-io/liter-llm · 50 tokens

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.

xberg-io/liter-llm · 39 tokens

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…

mydisha/keirouter · 82 tokens

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.

MacPaw/ai-sdk-typescript · 71 tokens