2.6k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill api-dev- _meta.json286 B
- SKILL.md13.5 KB
Overview
This skill scaffolds, tests, documents, and debugs REST and GraphQL APIs from the command line and lightweight code templates. It speeds up endpoint creation, automated integration tests, OpenAPI spec generation, mocking, and common HTTP troubleshooting tasks. Use it to get a production-like API development workflow without heavy tooling.
How this skill works
The skill provides ready-to-run scaffolds (Node/Express and Python mock server), curated curl examples for GET/POST/PUT/PATCH/DELETE and debugging, and simple test runners in Bash and Python. It also includes an OpenAPI starter template, validation commands, and diagnostics for CORS, ports, timing, and JWT inspection. Combine the pieces to scaffold endpoints, run tests, generate docs, mock dependencies, or collect timing and header data for debugging.
When to use it
- Scaffold new REST or GraphQL endpoints quickly during project bootstrap
- Run integration tests or lightweight API health checks in CI or locally
- Generate or validate OpenAPI/Swagger specs for documentation or client generation
- Mock external services during frontend or integration development
- Troubleshoot HTTP issues: CORS, timing regressions, ports in use, and JWT payloads
Best practices
- Always set Content-Type for requests with a body to avoid silent 400 errors
- Keep simple, reproducible curl commands for debugging and CI sanity checks
- Version and lint OpenAPI specs before generating clients or docs
- Mock external APIs with predictable responses to isolate service tests
- Include health and auth tests in your test runners to catch regressions early
Example use cases
- Scaffold a minimal Express CRUD API to prototype a new service and iterate on endpoints
- Run the Bash or Python test runner in CI to validate endpoints and response shapes
- Generate an OpenAPI YAML file from observed endpoints, then lint with Redocly
- Spin up the Python mock server to develop a frontend against stable sample responses
- Use curl verbose and timing flags to diagnose slow DNS, TLS, or server transfer times
FAQ
Yes. The Bash and Python runners are designed to exit nonzero on failures and can be executed in CI pipelines to validate endpoints.
How do I mock endpoints with custom behavior?
Edit the ROUTES mapping in the Python mock server to return different statuses, bodies, or patterns. For more advanced behavior add request body parsing and conditional logic.