nousresearch/hermes-agent/rest-graphql-debug
Claude Code and agent skill by nousresearch/hermes-agent
- community
Checking that the SKILL.md file is still in the repository.
Debug REST/GraphQL APIs: status codes, auth, schemas, repro.
Install
npx vskill@latest install nousresearch/hermes-agent/rest-graphql-debugSKILL.md
The same SKILL.md was published earlier as nousresearch/hermes-agent/rest-graphql-debug.
API Testing & Debugging
Drive REST and GraphQL diagnosis through Hermes tools — terminal for curl, execute_code for Python requests, web_extract for vendor docs. Isolate the failing layer before guessing at the fix.
When to Use
- API returns unexpected status or body
- Auth fails (401/403 after token refresh, OAuth, API key)
- Works in Postman but fails in code
- Webhook / callback integration debugging
- Building or reviewing API integration tests
- Rate limiting or pagination issues
Skip for UI rendering, DB query tuning, or DNS/firewall infra (escalate).
Core Principle
Isolate the layer, then fix. A 200 OK can hide broken data. A 500 can mask a one-character auth typo. Walk the chain in order; never skip a step.
5-Minute Quickstart
REST via terminal
GraphQL via terminal
GraphQL gotcha: servers often return HTTP 200 even when the query failed. Always inspect the errors field regardless of status code:
Python (requests) via execute_code
Layered Debug Flow
Step 1 — Connectivity
Failures: DNS not resolving, firewall, VPN required, proxy missing.
Step 1.5 — Timeouts
Distinguish can't reach from reaches but slow:
In Python, always pass a tuple timeout — requests has no default and will hang forever:
Diagnosis: high time_connect is network/firewall; high time_starttransfer with low time_connect is a slow server.
Step 2 — TLS/SSL
Failures: expired cert, self-signed, hostname mismatch, missing CA bundle. Use -k only for ad-hoc debug, never in code.
Step 3 — Authentication
Checklist:
- Token expired? (
expclaim in JWT) - Right scheme? Bearer vs Basic vs Token vs
X-Api-Key - Right environment? Staging key on prod is a classic
- API key in header vs query param (
?api_key=…)?
Step 4 — Request Format
Content-Type / body mismatch — the silent 415/400:
Common: form-encoded vs JSON, missing required fields, wrong HTTP method, unencoded query params.
Step 5 — Response Parsing
Always inspect content-type before calling .json():
Failures: HTML error page where JSON expected, empty body, wrong charset.
Step 6 — Semantic Validation
Parsed cleanly — but is the data correct?
- Does
"status": "active"mean what your code thinks? - ID in response matches the one requested?
- Timestamps in expected timezone?
- Pagination returning all results, or just page 1?
HTTP Status Playbook
401 Unauthorized — credentials missing or invalid
Authorizationheader actually present? (curl -vto confirm)- Token correct and unexpired?
- Right auth scheme? (
BearervsBasicvsToken) - Some APIs use query param (
?api_key=…) instead of header.
403 Forbidden — authenticated but not authorized
- Token has the required scopes/permissions?
- Resource owned by a different account?
- IP allowlist blocking you?
- CORS in browser? (check
Access-Control-Allow-Origin)
404 Not Found — resource doesn't exist or URL is wrong
- Path correct? (trailing slash, typo, version prefix)
- Resource ID exists?
- Right API version (
/v1/vs/v2/)? - Right base URL (staging vs prod)?
409 Conflict — state collision
- Resource already exists (duplicate create)?
- Stale
ETag/If-Match? - Concurrent modification by another process?
422 Unprocessable Entity — valid JSON, invalid data
The error body usually names the bad fields. Check:
- Field types (string vs int, date format)
- Required vs optional
- Enum values inside the allowed set
429 Too Many Requests — rate limited
Check Retry-After and X-RateLimit-* headers. Exponential backoff:
5xx — server-side, usually not your fault
- 500 — server bug. Capture correlation ID, file with provider.
- 502 — upstream down. Backoff + retry.
- 503 — overloaded / maintenance. Check status page.
- 504 — upstream timeout. Reduce payload or raise timeout.
For all 5xx: backoff with jitter, alert on persistence.
Pagination & Idempotency
Pagination. Verify you're getting all results. Look for next_cursor, next_page, total_count. Two patterns:
- Offset (
?limit=100&offset=200) — simple, can skip items if data shifts. - Cursor (
?cursor=abc123) — preferred for live or large datasets.
Idempotency. For non-idempotent operations (POST), send Idempotency-Key: <uuid> so retries don't double-charge / double-create. Mandatory for payments and orders.
Contract Validation
Catch schema drift before it hits production:
Run after API upgrades, when integrating new third parties, or in CI smoke tests.
Correlation IDs
Always capture the provider's request ID — fastest path to vendor support:
Vendor bug-report template:
Regression Test Template
Drop this into tests/ and run via terminal('pytest tests/test_api_smoke.py -v'):
Security
Token handling
- Never log full tokens. Redact:
Bearer <REDACTED>. - Never hardcode tokens in scripts. Read from env (
os.environ["API_TOKEN"]) or${HERMES_HOME:-~/.hermes}/.env. - Rotate immediately if a token surfaces in logs, error messages, or git history.
Safe logging
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingoptional-skills/software-development/rest-graphql-debug/SKILL.md
Popularity
- Repository stars
- 195,697
- Repository forks
- 34,381
- 7-day trend score
- 61
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nousresearch/hermes-agent/rest-graphql-debug)