Evaluating Bitrouter Routes
bitrouter/bitrouter
A skill your agent uses when evaluating BitRouter route decisions or Eval Exchange subjects with task-native verifiers, human reviewers, private enterprise evaluators, agentic judges, or genuinely…
LiteLLM-RS Error Handling Architecture. An agent skill from majiayu000/litellm-rs.
$ npx skills add majiayu000/litellm-rs --skill error-handling -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install majiayu000/litellm-rs error-handling --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/majiayu000/litellm-rs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/error-handling .claude/skills/error-handling && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "error-handling" agent skill from https://github.com/majiayu000/litellm-rs/tree/main/.claude/skills/error-handling into .claude/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/majiayu000/litellm-rs/tree/main/.claude/skills/error-handlingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add majiayu000/litellm-rs --skill error-handling -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install majiayu000/litellm-rs error-handling --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/litellm-rs.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/error-handling .agents/skills/error-handling && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "error-handling" agent skill from https://github.com/majiayu000/litellm-rs/tree/main/.claude/skills/error-handling into .agents/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add majiayu000/litellm-rs --skill error-handling -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install majiayu000/litellm-rs error-handling --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/litellm-rs.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/error-handling .cursor/skills/error-handling && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "error-handling" agent skill from https://github.com/majiayu000/litellm-rs/tree/main/.claude/skills/error-handling into .cursor/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/majiayu000/litellm-rs.git --path .claude/skills/error-handling--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add majiayu000/litellm-rs --skill error-handling -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install majiayu000/litellm-rs error-handling --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/litellm-rs.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/error-handling .gemini/skills/error-handling && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "error-handling" agent skill from https://github.com/majiayu000/litellm-rs/tree/main/.claude/skills/error-handling into .gemini/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install majiayu000/litellm-rs error-handlingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add majiayu000/litellm-rs --skill error-handling -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/majiayu000/litellm-rs.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/error-handling .github/skills/error-handling && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "error-handling" agent skill from https://github.com/majiayu000/litellm-rs/tree/main/.claude/skills/error-handling into .github/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add majiayu000/litellm-rs --skill error-handling -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install majiayu000/litellm-rs error-handling --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/majiayu000/litellm-rs.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/error-handling .opencode/skills/error-handling && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "error-handling" agent skill from https://github.com/majiayu000/litellm-rs/tree/main/.claude/skills/error-handling into .opencode/skills/error-handling/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "error-handling", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
error-handlingLiteLLM-RS Error Handling Architecture. An agent skill from majiayu000/litellm-rs.
Error Handling is an agent skill from majiayu000/litellm-rs. LiteLLM-RS Error Handling Architecture. Covers two-tier error hierarchy, ProviderError factory methods, HTTP status mapping, retry logic, and error context preservation. Use when designing error types or enums, creating ProviderError instances via factory methods, mapping HTTP statuses to typed errors, deciding retryability and backoff, or preserving error context.
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files (for example `reference/error-context-preservation.md`, `reference/factory-methods.md` and `reference/litellm-error-gateway.md`).
It sits in Development, covering Error handling and Model routing and gateways. It works with OpenAI and Rust. The repository describes itself as: Self-hosted Rust LLM gateway with OpenAI-compatible APIs, load balancing, failover, and a reusable Rust kernel. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit fb065f0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are rust).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Error Handling loads about 2k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 205 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from majiayu000/litellm-rs at commit fb065f0, republished under its MIT licence (© majiayu000). 205 words, ~2,044 tokens.
.claude/skills/error-handling/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.LiteLLM-RS uses a two-tier error architecture spanning its provider catalog:
┌────────────────────────────────────────────────────────┐
│ Gateway Layer │
│ LiteLLMError (core/types/errors/litellm.rs) │
│ - Type alias for GatewayError │
│ (src/utils/error/gateway_error/types.rs) │
│ - 18 variants for gateway-level errors │
└────────────────────────────────────────────────────────┘
↓
┌────────────────────────────────────────────────────────┐
│ Provider Layer │
│ ProviderError │
│ (src/core/providers/unified_provider_error.rs; │
│ exported as core::providers::ProviderError) │
│ - 24 variants for provider-specific errors │
│ - Each variant includes provider: &'static str │
│ - Rich factory methods for error creation │
└────────────────────────────────────────────────────────┘Most providers share one canonical status-to-error mapping,
default_http_error_mapper in src/core/providers/unified_provider_http_mapping.rs:
pub fn default_http_error_mapper(
provider: &'static str,
status_code: u16,
response_body: &str,
) -> ProviderError {
match status_code {
400 => {
let message = parse_error_message_from_body(response_body)
.unwrap_or_else(|| response_body.to_string());
ProviderError::invalid_request(provider, message)
}
401 => ProviderError::authentication(provider, "Invalid API key"),
403 => ProviderError::authentication(provider, "Permission denied"),
404 => ProviderError::model_not_found(provider, "Model not found"),
429 => {
let retry_after =
crate::core::providers::shared::parse_retry_after_from_body(response_body);
ProviderError::rate_limit(provider, retry_after)
}
500..=599 => ProviderError::api_error(provider, status_code, response_body),
_ => ProviderError::api_error(provider, status_code, response_body),
}
}Providers needing extra special cases call extended_http_error_mapper
(same file), which additionally maps 402 to quota_exceeded, 408/504 to
timeout, 413 to context_length_exceeded, and 502/503 to
provider_unavailable.
// src/core/traits/error_mapper/trait_def.rs
pub trait ErrorMapper<E>: Send + Sync + 'static
where
E: ProviderErrorTrait,
{
// Required: map HTTP status + body to the provider's error type
fn map_http_error(&self, status_code: u16, response_body: &str) -> E;
// Default implementations
fn map_json_error(&self, error_response: &serde_json::Value) -> E;
fn map_network_error(&self, error: &dyn std::error::Error) -> E;
fn map_parsing_error(&self, error: &dyn std::error::Error) -> E;
fn map_timeout_error(&self, timeout_duration: std::time::Duration) -> E;
}GenericErrorMapper (src/core/traits/error_mapper/types.rs, re-exported as
DefaultErrorMapper) implements ErrorMapper<E> for any E: ProviderErrorTrait:
impl<E> ErrorMapper<E> for GenericErrorMapper
where
E: ProviderErrorTrait,
{
fn map_http_error(&self, status_code: u16, response_body: &str) -> E {
match status_code {
400 => E::network_error("Bad Request: Invalid parameters"),
401 => E::authentication_failed("Authentication failed: Invalid credentials"),
403 => E::authentication_failed("Permission denied: Insufficient permissions"),
404 => E::not_supported("Resource not found"),
408 => E::network_error("Request timeout"),
429 => E::rate_limited(None),
500 => E::network_error("Internal server error"),
502 => E::network_error("Bad gateway: Upstream server error"),
503 => E::network_error("Service unavailable: Server overloaded"),
504 => E::network_error("Gateway timeout: Upstream timeout"),
_ => E::network_error(/* "HTTP Error {status}: {body or default}" */),
}
}
}// Good
ProviderError::authentication(PROVIDER_NAME, "Invalid API key")
// Bad - verbose and error-prone
ProviderError::Authentication {
provider: PROVIDER_NAME,
message: "Invalid API key".to_string(),
}// Good - error clearly identifies source
ProviderError::network("openai", "Connection refused")
// Bad - unclear which provider failed
ProviderError::network("unknown", "Connection refused")// Good - execute_request already returns a classified ProviderError
let response = self.pool_manager
.execute_request(&url, method, headers, body)
.await?;
// Bad - erases an existing typed error by reclassifying it as Network
self.pool_manager.execute_request(&url, method, headers, body)
.await
.map_err(|e| ProviderError::network(PROVIDER_NAME, e.to_string()))?// Good - specific error type
if response.status() == 429 {
return Err(ProviderError::rate_limit(PROVIDER_NAME, retry_after));
}
// Bad - generic error loses information
if !response.status().is_success() {
return Err(ProviderError::api_error(PROVIDER_NAME, status, "Failed"));
}// Good - exhaustive handling
match error {
ProviderError::RateLimit { retry_after, .. } => {
if let Some(delay) = retry_after {
tokio::time::sleep(Duration::from_secs(delay)).await;
}
// Retry...
}
ProviderError::Authentication { .. } => {
// Don't retry, return immediately
return Err(error);
}
e if RetryPolicy
.decide(&router_config, e, retry_context)
.should_retry =>
{
// Retry per decision.delay (see reference/retry-logic.md).
// Note: error.is_retryable() is deprecated since 0.6.0.
}
_ => return Err(error),
}Canonical behavior of default_http_error_mapper:
| HTTP Status | Result | Legacy-retryable |
|---|---|---|
| 400 | invalid_request (message parsed from body) | No |
| 401 | authentication ("Invalid API key") | No |
| 403 | authentication ("Permission denied") | No |
| 404 | model_not_found | No |
| 429 | rate_limit (retry-after parsed from body when present) | Yes |
| 500-599 | api_error(status) | Yes |
| other | api_error(status) | No |
extended_http_error_mapper adds: 402→quota_exceeded, 408/504→timeout,
413→context_length_exceeded, 502/503→provider_unavailable.
© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files in .claude/skills/error-handling of majiayu000/litellm-rs.
Open the folder on GitHubat commit fb065f0
Error Handling next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Error Handling this skillmajiayu000/litellm-rs | 117 | — | ~2k | Automated safety check: Pass | MIT | |
| Evaluating Bitrouter Routesbitrouter/bitrouter | 235 | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Run Bitrouter Benchmarkbitrouter/bitrouter | 235 | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| Run Shuntpleaseai/shunt | 281 | — | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| Cross Evalalirezarezvani/claude-skills | 28k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Rust Best Practicesfarm-fe/farm | 5.6k | 3 repos | ~1.1k | Automated safety check: Pass | MIT |
bitrouter/bitrouter
A skill your agent uses when evaluating BitRouter route decisions or Eval Exchange subjects with task-native verifiers, human reviewers, private enterprise evaluators, agentic judges, or genuinely…
bitrouter/bitrouter
A skill your agent uses when a user wants to run, compare, resume, audit, share, or submit a Harbor benchmark through BitRouter, including choosing a Harbor dataset and agent, confirming routed…
pleaseai/shunt
Build, launch, and drive shunt — the Claude Code LLM gateway (a Rust/axum Anthropic-Messages proxy).
alirezarezvani/claude-skills
/cs:cross-eval <memo — Multi-model consensus on a board memo or strategy brief.
farm-fe/farm
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.
diodeme/Gold-Band
Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns.
majiayu000/litellm-rs
LiteLLM-RS Authentication Architecture. An agent skill from majiayu000/litellm-rs.
majiayu000/litellm-rs
LiteLLM-RS response caching architecture. An agent skill from majiayu000/litellm-rs.
majiayu000/litellm-rs
LiteLLM-RS Configuration Architecture. An agent skill from majiayu000/litellm-rs.
majiayu000/litellm-rs
LiteLLM-RS Observability Architecture. An agent skill from majiayu000/litellm-rs.
majiayu000/litellm-rs
LiteLLM-RS provider system in two tiers - data-driven OpenAI-compatible catalog entries auto-routed through OpenAILikeProvider, plus code-based provider modules implementing the LLMProvider trait…
majiayu000/litellm-rs
LiteLLM-RS Routing Architecture. An agent skill from majiayu000/litellm-rs.
Categories
LiteLLM-RS Error Handling Architecture. An agent skill from majiayu000/litellm-rs. Error Handling is an agent skill from majiayu000/litellm-rs. LiteLLM-RS Error Handling Architecture.
Error Handling fits situations like: designing error types; creating ProviderError instances via factory methods; mapping HTTP statuses to typed errors; deciding retryability and backoff.
Run `npx skills add majiayu000/litellm-rs --skill error-handling -a claude-code`. Or copy the skill folder (.claude/skills/error-handling in majiayu000/litellm-rs) into .claude/skills/error-handling in your project. Claude Code loads it when a task matches its description.
Run `npx skills add majiayu000/litellm-rs --skill error-handling -a codex`. Or copy the skill folder (.claude/skills/error-handling in majiayu000/litellm-rs) into .agents/skills/error-handling in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/litellm-rs --skill error-handling -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/error-handling, .gemini/skills/error-handling, .github/skills/error-handling and .opencode/skills/error-handling in your project.
SKILL.md names no scripts, command-line tools or credentials: Error Handling is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Error Handling is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Error Handling: Evaluating Bitrouter Routes (bitrouter/bitrouter, 235 stars), Run Bitrouter Benchmark (bitrouter/bitrouter, 235 stars), Run Shunt (pleaseai/shunt, 281 stars) and Cross Eval (alirezarezvani/claude-skills, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
majiayu000 (a GitHub user) maintains it in majiayu000/litellm-rs, which has 117 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 8, 2026.
Source: majiayu000/litellm-rs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.