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/error-handling/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/error-handling)<a href="https://agentmods.dev/skills/majiayu000/litellm-rs/error-handling"><img src="https://agentmods.dev/badge/skills/majiayu000/litellm-rs/error-handling/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/error-handling"><img src="https://agentmods.dev/badge/skills/majiayu000/litellm-rs/error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00071 | $0.01865 |
| Opus 5.5 | $0.00028 | $0.00746 |
| Sonnet 5.5 | $0.00014 | $0.00373 |
| Haiku 4.5 | $0.00007 | $0.00186 |
Grade A, and why
error-handling 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 2mo 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 — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error Handling Architecture Guide
Two-Tier Error Hierarchy
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 │
└────────────────────────────────────────────────────────┘
HTTP Status Mapping
Standard Mapping Pattern
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),
}
}
What ships with it
5 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.
- 2mo ago First seen · 225 lines · 71 tokens per session scan A 7898c099be2b
error-handling is a skill published in the GitHub repository majiayu000/litellm-rs (123 stars, last pushed 2d ago), licensed MIT. It adds 71 tokens to every session and 1,865 once invoked, about $0.0003 per session on Opus 5.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.
error-handling compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| error-handlingmajiayu000/litellm-rs | Skill | 123 | 2d ago | MIT | A | 71 | Claude Code |
| rust-errorBerriAI/litellm | Skill | 63k | yesterday | none | A | 72 | Claude Code, Codex |
| rust-tracingBerriAI/litellm | Skill | 63k | yesterday | none | A | 28 | Claude Code, Codex |
| lsp-guideworkweave/router | Skill | 5.6k | 6d ago | Apache-2.0 | A | 84 | Claude Code, Codex |
| goclawnextlevelbuilder/goclaw | Skill | 3.7k | yesterday | none | A | 88 | Claude Code, Codex |
| bifrost-debugneXenio/bifrost-plugin | Skill | 5 | 11d ago | MIT | A | 103 | Claude Code |
| systematic-debuggingNousResearch/hermes-agent | Skill | 261k | yesterday | MIT | A | 16 | Claude Code, Codex |