rest-graphql-debug

Diagnose REST and GraphQL API failures through layered connectivity, auth, and schema checks.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill rest-graphql-debug-chensihakniroth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rest-graphql-debug
Source: https://github.com/Chensihakniroth/ANAKOT-AGENT/tree/main/optional-skills/software-development/rest-graphql-debug
Command: npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill rest-graphql-debug-chensihakniroth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, pytest.

What problem does it solve? API integrations fail in opaque ways — a 401 after token refresh, a 200 hiding GraphQL errors, or code that works in Postman but breaks in production. This Skill provides a systematic, layer-by-layer debugging methodology that isolates the exact failure point before attempting fixes. ## Core Features & Use Cases - Layered Diagnostic Flow: Walks connectivity, timeouts, TLS, authentication, request format, response parsing, and semantic validation in strict order using curl and Python requests. - HTTP Status Playbook: Provides targeted checklists for 401, 403, 404, 409, 422, 429, and 5xx errors, including exponential backoff for rate limits. - Contract & Regression Testing: Includes schema validation snippets and a pytest smoke-test template to catch API drift before production. - Use Case: Your payment API suddenly returns 422 errors after a provider update. Use this Skill to capture the correlation ID, reproduce with curl, identify the changed required field, and generate a vendor bug report. ## Quick Start Ask the agent to debug why your API request to a specific endpoint is failing, providing the endpoint URL and the error you are seeing.

Frequently Asked Questions about rest-graphql-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a REST API that returns unexpected status codes?▼

Debug REST API errors by walking layers in order: connectivity, TLS, authentication, request format, response parsing, then semantics. Use curl -v to inspect the raw exchange and match the status code to a targeted checklist for 401, 403, 404, 422, or 5xx.

Why does my GraphQL query return HTTP 200 but no data?▼

GraphQL servers often return HTTP 200 even when the query fails, placing failure details in the errors field of the response body. Always inspect the errors array regardless of status code and check each error's message and path.

How do I handle 429 rate limit errors in Python requests?▼

Handle 429 responses with exponential backoff: read the Retry-After header, wait the specified seconds or 2^attempt as fallback, and retry up to five times. Also check X-RateLimit-* headers to understand your remaining quota.

Why does my POST request work in Postman but fail in Python code?▼

The usual cause is a Content-Type and body mismatch: passing data= with a JSON header sends form-encoded data while claiming JSON. Use requests.post(url, json=payload) so the library serializes the body and sets the header correctly.

How do I check if a JWT token is expired?▼

Decode the JWT's middle payload segment using base64url decoding with padding correction, then inspect the exp claim. The skill provides a Python snippet using base64.urlsafe_b64decode that prints the full claims JSON.

When should I not use this API debugging approach?▼

Skip this layered API flow for UI rendering bugs, database query tuning, or DNS and firewall infrastructure problems, which should be escalated to the appropriate owners. It targets application-layer HTTP and GraphQL diagnosis only.