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-architecture/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-architecture)<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.
<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>- 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 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.
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.00085 | $0.04569 |
| Opus 5 | $0.00043 | $0.02285 |
| Sonnet 5 | $0.00017 | $0.00914 |
| Haiku 4.5 | $0.00009 | $0.00457 |
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.
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",
),
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 · 488 lines · 85 tokens per session scan A 225a792fabb0
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.
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…
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…
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"…
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…
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.
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.