Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

openrouter-common-errors

Skill by jeremylongshore

Diagnoses and fixes common OpenRouter API errors. Built for developers who hit codes such as 401, 402 or 429 and need the cause and exact fix. Designed for Claude Code.

  • Score 75
  • 3k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install openrouter-common-errors

Built from the published package, never by AI.

git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/openrouter-common-errors ~/.claude/skills/openrouter-common-errors

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install openrouter-common-errors in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The openrouter-common-errors skill helps diagnose failures from the OpenRouter API. It covers HTTP codes including 400, 401, 402, 403, 408, 429, 502 and 503, and gives a cause and fix for each error code. It also explains the error response format, where the error code, message and provider name appear.

The skill includes a bash diagnostic script that checks authentication, credit balance, model availability and a minimal test request. It also provides a Python error handler with retries for 429 and 5xx errors, and a pre-flight validation function that checks model IDs, message format and context length before a call is sent. It is aimed at developers using OpenRouter who need to debug API responses. The skill is MIT licensed and at version 1.20.0.

Written from the project's SKILL.md and checked against it.

What it can do

  • Complete error referenceTable mapping HTTP status and error codes to causes and fixes.
  • Diagnostic scriptChecks auth, credits, model availability and a minimal test request.
  • safe_completionPython wrapper with categorized exceptions and retries for 429 and 5xx.
  • validate_before_sendPre-flight checks for model IDs, message format and context length.
  • Error response formatExplains the error.code, error.message and provider name fields.

What you need

  • OpenRouter API key starting with sk-or-v1-
  • OPENROUTER_API_KEY environment variable
  • curl and jq
  • Python 3.8+ with the OpenAI SDK
  • Node.js 18+ for the TypeScript classifier in references

Try asking

  • Why is my OpenRouter request returning a 401 error?
  • Run the OpenRouter diagnostic script on my setup
  • Add safe error handling to my OpenRouter Python calls

Good to know

  • Designed for Claude Code.
  • The diagnostic script tests openai/gpt-4o-mini by default.
  • Some worked examples are in a separate references file.

Security check

B
  • Allowed to use Write, Edit without limitsIn SKILL.md

Checked automatically: skills/.curated/openrouter-common-errors/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadWriteEditGrepBash(python3:*)Bash(node:*)Bash(curl:*)Bash(jq:*)

Alternatives to openrouter-common-errors

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

openrouter-common-errors: common questions

Does this skill handle OpenRouter 429 rate limit errors?

Yes. The reference maps 429 rate_limit_exceeded to SDK auto-retries, and safe_completion retries 429 and 5xx errors up to three times.

How do I fix a 402 insufficient credits error on OpenRouter?

Top up at openrouter.ai/credits. A per-key limit returns credit_limit_reached, which is fixed by raising the key limit or creating a new key.

Does the diagnostic script make a real API call?

Yes. It sends a minimal one-token completion request to test the connection.

How do I install openrouter-common-errors?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is openrouter-common-errors free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is openrouter-common-errors safe to use?

It scores 75 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use write, edit without limits). Review the code before you install. How grades work.

What are alternatives to openrouter-common-errors?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

openrouter-common-errors Install

Add to stack

Loading.