Debug Api
Debug API failures using OpenAPI specs and HTTP logs
- Type
- Slash Command
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
What Debug Api is
Debug Api is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”
A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.
Debug Api gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.
How to install Debug Api
Claude Code
- Download debug-api.md from the repository.
- Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
- Run it by typing / followed by its name.
Claude Cowork
- Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
- In Customize → Skills, click +, then upload the ZIP.
- Run it from any task with / and the skill name.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/mcp/conversational-api-debugger/commands/debug-api.md, shared under the repository's MIT license. Read the full file on GitHub.
Systematically debug REST API failures by analyzing OpenAPI specifications and HTTP request/response logs.
Workflow
When the user requests API debugging, follow this comprehensive approach:
Step 1: Load API Documentation
Use load_openapi to parse the OpenAPI spec:
- Accepts JSON or YAML format
- Extracts all endpoints, parameters, and expected responses
- Identifies authentication requirements
- Captures base URLs and server information
Example:
load_openapi({
filePath: "/path/to/openapi.yaml",
name: "my-api"
})Step 2: Ingest HTTP Logs
Use ingest_logs to import request/response data:
- Supports HAR (HTTP Archive) format from browser DevTools
- Accepts direct log arrays
- Automatically categorizes successful vs failed requests
- Calculates status code and method distributions
Example (HAR file):
ingest_logs({
filePath: "/path/to/requests.har",
format: "har"
})
Example (direct logs):
ingest_logs({
logs: [
{
timestamp: "2025-10-10T12:00:00Z",
method: "POST",
…Step 3: Analyze Failures
Use explain_failure to understand why requests failed:
- Identifies root causes based on HTTP status codes
- Compares actual behavior with OpenAPI spec expectations
- Suggests specific fixes
- Assesses severity (critical, high, medium, low)
Example:
explain_failure({
logIndex: 0, // Index from ingest_logs
specName: "my-api" // Compare against loaded spec
})Step 4: Generate Reproducible Tests
Use make_repro to create cURL commands:
- Generates executable cURL command
- Includes alternative formats (HTTPie, JavaScript fetch)
- Useful for documentation, bug reports, and testing
Example:
make_repro({
logIndex: 0,
includeHeaders: true,
pretty: true // Format for readability
})Common Debugging Scenarios
Scenario 1: 400 Bad Request
- Load spec to see expected request format
- Ingest logs containing the failure
- Explain failure to identify validation errors
- Make repro to generate test command
- Fix request based on schema requirements
- Test using generated cURL command
Scenario 2: 401 Unauthorized
- Load spec to check authentication requirements
- Explain failure on 401 response
- Verify authentication headers in request
- Check token expiration or permissions
- Make repro with corrected auth headers
Scenario 3: 500 Internal Server Error
- Ingest logs to find pattern of 500 errors
- Explain failure to assess criticality
- Make repro for server team to reproduce
- Check request payload for edge cases
- Monitor server logs (not in scope of this tool)
Scenario 4: Performance Issues
- Ingest logs with duration data
- Analyze distribution of response times
- Identify slow endpoints
- Make repro for performance testing
Analysis Output
The debugging workflow produces:
From explain_failure:
- Severity: critical | high | medium | low
- Possible Causes: List of likely root causes
- Suggested Fixes: Actionable remediation steps
- Matching Endpoint: Comparison with OpenAPI spec
- Details: Request/response bodies for inspection
From make_repro:
- cURL Command: Copy-paste ready command
- HTTPie Alternative: Shorter syntax for quick tests
- JavaScript fetch: For integration into automated tests
- Metadata: Method, URL, headers, body presence
Best Practices
- Always load the OpenAPI spec first - Provides context for failure analysis
- Use HAR files when possible - Most complete log format
- Include request/response bodies - Critical for validation errors
- Compare with spec - Catches mismatches between docs and implementation
- Generate repro commands - Makes bug reports actionable
- Test fixes immediately - Use generated cURL to verify
Tips
- Export HAR from browser DevTools (Network tab → Right-click → Save as HAR)
- Use pretty: true for readable cURL commands (good for docs)
- Use pretty: false for one-liner cURL (good for scripts)
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Debug Api?
Debug Api is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Debug API failures using OpenAPI specs and HTTP logs
How do I install Debug Api in Claude Code?
Download debug-api.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.
Can I use Debug Api in Claude Cowork?
Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.
Is Debug Api safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Write Brief Guide the user through creating a clear, actionable product brief Slash Command · jeremylongshore/tons-of-skills-marketplace
- X Bug Triage Plugin Closed-loop bug triage: X complaints → clusters → repo evidence → owner routing → terminal review → filed issues Plugin · jeremylongshore/tons-of-skills-marketplace
- Youtube Strategy Complete YouTube content production workflow: research competitors, generate video ideas, build briefs, craft titles and thumbnails, and create detailed video outlines with demo prep checklists. Plugin · jeremylongshore/tons-of-skills-marketplace
- Xstatus Show X account status, credit balance, and active monitors Slash Command · jeremylongshore/tons-of-skills-marketplace
- Deployment Strategy Recommend deployment strategy for your application Slash Command · jeremylongshore/tons-of-skills-marketplace
- Deadlock Detect and resolve database deadlocks with automated monitoring Slash Command · jeremylongshore/tons-of-skills-marketplace
- Design Schema Design database schemas with best practices Slash Command · jeremylongshore/tons-of-skills-marketplace
- Db Test Database testing with test data setup, transaction rollback, and schema Slash Command · jeremylongshore/tons-of-skills-marketplace