Agent skill · data analytics · jeremylongshore

openrouter-debug-bundle

Create debug bundles for troubleshooting OpenRouter API issues. Use

Why this skill is useful

Provides specific commands and structured workflows for generating debug bundles that are not commonly known or documented.

What it needs

Requires curl, jq, python3 installed locally. Requires openrouter account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

OpenRouter Debug Bundle Current State !node --version 2>/dev/null echo 'N/A' !python3 --version 2>/dev/null echo 'N/A' Overview When an OpenRouter request fails or returns unexpected results, you need a structured debug bundle: the exact request, response, headers, generation metadata, and environment info. The generation ID (gen- prefix in response.id) is the key correlator -- it lets you look up exact cost, provider used, and latency via GET /api/v1/generation?id=. Prerequisites An OpenRouter API key (sk-or-v1-...) exported as OPENROUTERAPIKEY — see the openrouter-install-auth skill for setup curl and jq for the quick-debug flow and the Common Debug Checks Python 3.8+ with the openai and requests packages for the Debug Bundle Generator A failing or suspect request you can reproduce — its gen- generation ID is what everything else correlates on Instructions 1. Rule out environment problems first with the Common Debug Checks: verify the key via /api/v1/auth/key, confirm the model exists in /api/v1/models, and check status.openrouter.ai. 2. Reproduce the failure with the Quick Debug: curl command — curl -v ... tee /tmp/openrouter-debug.txt captures request headers, response headers, and body in one transcript. 3. Extract the generation ID (jq -r '.id') and query GET /api/v1/generation?id=$GENID to get exact cost, token counts, generationtime, and providername. 4. For failures inside an application, call debugrequest() from the Python Debug Bundle Generator to capture the same request/response/error/latency/environment data as a DebugBundle and save it with bundle.save("debugbundle.json"). 5. Match the symptoms against the Error Handling table (missing generation ID, 502/503, modelnotfound, slow TTFT). 6. Before sharing a bundle, redact API keys per Enterprise Considerations (sk-or-v1-... -> sk-or-v1-[REDACTED]) and include the generation ID in any OpenRouter support request. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/openrouter-debug-bundle--c3e54e

View the source on GitHub

Browse the @skills marketplace