api-debugger
Skill0 starsChanged 3 months agoMITView on GitHub
Systematic API debugging workflow — reproduce with curl, isolate the failing layer, classify the error, and find the root cause with evidence
In this repository2 other files it gives its agents.
- git-surgerySkill
- test-doctorSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
If auth is sensitive, substitute a test token or read it from an env var — never echo secrets.
- Distinctive: line 25
Test in this order, stopping when the layer works:
- Distinctive: line 37
Never change code before reproducing with curl — the bug often lives outside the app.
- Distinctive: line 38
Never assume a 500 is the app's fault: check reverse proxy, load balancer, and upstream APIs first.
- Distinctive: line 39
If two calls differ only in payload, diff the payloads — the answer is usually in a renamed or missing field.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Debugger
Debug failing API calls methodically. Never guess — reproduce first, isolate the layer, then fix with evidence.
Step 1 — Reproduce with a minimal curl
- Replay the exact failing request with curl:
curl -i -X <METHOD> '<url>' -H 'Content-Type: application/json' -H 'Authorization: ...' -d '<body>' - Capture: status code, response headers, response body, timing (
-w '\n%{time_total}'). - If auth is sensitive, substitute a test token or read it from an env var — never echo secrets.
Step 2 — Classify the error (use the taxonomy)
| Class | Status ranges | Typical causes |
| 4xx client | 400, 401, 403, 404, 409, 422 | wrong payload shape, bad/expired auth, wrong path, validation, state conflict |
| 5xx server | 500, 502, 503, 504 | app crash, upstream failure, gateway timeout, rate limit misconfigured |
| Network | no response, TLS, DNS, timeouts | wrong base URL, proxy, cert, firewall, IPv6 vs IPv4 |
Step 3 — Isolate the failing layer
Test in this order, stopping when the layer works:
- Reachability:
curl -i <base_url>/healthor any known-good endpoint. - Auth: replay with a freshly issued token; check expiry/issuer/scope.
- Payload: validate the body against the documented schema (field names, types, required fields, null vs missing).
- Headers: Content-Type, Accept, idempotency keys, required custom headers.
- Server: reproduce twice — if flaky, check for rate limits (Retry-After header), upstream dependencies, logs.
Step 4 — Verify the fix
- Re-run the exact same curl from Step 1 and diff the output.
- Confirm the status code changed and the response is semantically correct, not just non-error.
Anti-guessing rules
- Never change code before reproducing with curl — the bug often lives outside the app.
- Never assume a 500 is the app's fault: check reverse proxy, load balancer, and upstream APIs first.
- If two calls differ only in payload, diff the payloads — the answer is usually in a renamed or missing field.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

