litellm-rs: Skill for Claude Code

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

provider-architecture is a skill for Claude Code from majiayu000/litellm-rs. It costs 85 tokens per session (4,569 once invoked), scanned A, original, MIT.

A guide to the provider system in LiteLLM-RS, a Rust service that connects applications to language-model providers. It explains how simple OpenAI-compatible services and providers needing custom code are registered and routed.

In plain words
What is it for?
Use it when adding a provider, choosing between a catalogue entry and custom code, or updating provider routing, capabilities, and model metadata.
Why use it?
It prevents new providers from being wired into only part of the system or placed in the wrong integration layer.

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-architecture/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-architecture

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/litellm-rs/provider-architecture"><img src="https://agentmods.dev/badge/skills/majiayu000/litellm-rs/provider-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,569 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 56
    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.00085 $0.04569
Opus 5 $0.00043 $0.02285
Sonnet 5 $0.00017 $0.00914
Haiku 4.5 $0.00009 $0.00457

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

Security

Grade A, and why

provider-architecture 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-architecture/SKILL.md · 488 lines

How it starts

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

Provider Architecture Guide

Architecture Overview

Providers come in two tiers behind one implementation trait:

Tier 1 — Catalog-only (zero code). An OpenAI-compatible endpoint that differs only in base URL, auth env var, and advertised capabilities/models. It has no Rust module: one static entry in src/core/providers/registry/catalog.rs fully describes it, and the factory builds an OpenAILikeProvider from that data at runtime. This is the primary path for new integrations.

Tier 2 — Code-based. A provider needing custom request/response transformation, custom auth signing, non-standard streaming, or rich model metadata lives in src/core/providers/<name>/, implements LLMProvider, and is wired into routing.

Routing does not use trait objects. Router deployments store the closed Provider enum (src/core/providers/mod.rs), which dispatches to concrete provider structs. LLMProvider (src/core/traits/provider/llm_provider/trait_definition.rs) is the interface every variant implements — implementing the trait alone does not make a provider routeable; enum variant, dispatch arm, and factory wiring are crate-level changes. Trait objects appear only at the edges: the error mapper (Box<dyn ErrorMapper<ProviderError>>) and the streaming return type (Pin<Box<dyn Stream<Item = Result<ChatChunk, ProviderError>> + Send>>).

Enumerating Current Providers

Do not rely on memorized counts — they change often. Count from source:

# Tier 1: one def_chat()/def_local_chat() call per entry
# (each count includes the helper fn definition itself, so subtract 1)
grep -c 'def_chat(' src/core/providers/registry/catalog.rs
grep -c 'def_local_chat(' src/core/providers/registry/catalog.rs

# Tier 2: code-based provider modules (base/factory/macros/registry are infrastructure)
ls -d src/core/providers/*/ | grep -vE '/(base|factory|macros|registry)/'

Adding a Tier 1 Provider (Primary Path)

Two edits, nothing else:

// src/core/providers/registry/catalog.rs
def_chat(
    "myprovider",
    "My Provider",
    "https://api.myprovider.com/v1",
    "MYPROVIDER_API_KEY",
),

Read the full file on GitHub · 488 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 · 488 lines · 85 tokens per session scan A 225a792fabb0

Subscribe to this mod's changes

provider-architecture is a skill published in the GitHub repository majiayu000/litellm-rs (112 stars, last pushed 3d ago), licensed MIT. It adds 85 tokens to every session and 4,569 once invoked, about $0.0004 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

warp

Warp Rust web framework using filters. Covers routing, filters, rejection, WebSocket, and TLS. Use for composable, type-safe Rust APIs. USE WHEN: user mentions "warp", "rust filters", "composable rust api", asks about "warp filters", "warp rejection", "filter composition rust", "rust hyper warp", "warp websocket" DO…

claude-dev-suite/claude-dev-suite · 118 tokens

actix-web

Actix-web Rust web framework. Covers routing, extractors, middleware, state management, and WebSocket. Use for high-performance Rust APIs. USE WHEN: user mentions "actix-web", "actix", "rust web framework", "rust api", asks about "rust async web", "actix middleware", "actix extractors", "rust websocket", "high…

claude-dev-suite/claude-dev-suite · 124 tokens

axum

Axum Rust web framework by Tokio. Covers routing, handlers, extractors, middleware, and state. Use for ergonomic async Rust APIs. USE WHEN: user mentions "axum", "tokio web", "rust async api", "tower middleware", asks about "axum extractors", "axum state", "axum router", "rust websocket axum", "hyper server"…

claude-dev-suite/claude-dev-suite · 130 tokens

rocket

Rocket Rust web framework. Covers routing, fairings, guards, state, and testing. Use for type-safe, boilerplate-free Rust APIs. USE WHEN: user mentions "rocket", "rust type-safe api", "rocket guards", asks about "rocket fairings", "rocket state", "compile-time route checking", "rust web macros", "rocket testing" DO…

claude-dev-suite/claude-dev-suite · 119 tokens

rust-ops

Rust development patterns, ownership, async, error handling, and ecosystem. Use for: rust, cargo, ownership, borrow checker, lifetime, tokio, serde, trait, Result, Option, async rust, crate, derive, impl, enum, pattern matching, Arc, Mutex, Send, Sync, thiserror, anyhow, clap, axum, sqlx, reqwest, rayon, tracing.

0xDarkMatter/claude-mods · 85 tokens

rust-network-module

Add Rust async networking modules with project-adapted listener lifecycle, protocol parsing, and meaningful tests. Includes Tokio TCP and example wire-protocol templates for nat464-sidecar or compatible Rust projects.

fakoli/fakoli-plugins · 43 tokens