api-smoke-testing — Claude Code skill: what it does, how to install
Finds API endpoints across your codebase, spins up the local dev server, and tests every route with curl. Spots unmounted 404 routes and 500 server crashes before release.
npx skills add spencerpauly/awesome-cursor-skills --skill api-smoke-testing -a claude-codeWhat api-smoke-testing does
Route discovery starts with codebase analysis. The skill scans for route definitions in Next.js App Router and Pages Router, Express router calls, Django urlpatterns, FastAPI route decorators, and Rails routes.rb. Once the endpoint list is ready, the agent inspects active terminal sessions. If no dev server is running, it starts one automatically.
Testing proceeds by sending HTTP requests via curl to each identified route. Endpoints requiring POST, PUT, or PATCH receive an empty JSON body {}. The skill treats 400 responses as expected for blank payloads, alongside 401 and 403 auth requirements. Real defects are limited to 404 missing routes, 500 server errors, and connection timeouts. Sending an empty {} body to POST or PUT endpoints will trigger a 400 error on strict validation schemas, which the skill treats as expected behavior rather than a failure.
The final report breaks down passing endpoints, protected routes, and explicit failures. The agent reads server logs in the terminal directly to trace unhandled exceptions behind 500 responses. For 404 errors, it verifies route export statements and directory locations.
What it helps with
- Discover API routes in Next.js, Express, Django, FastAPI, or Rails projects
- Ping every local endpoint using
curlto check HTTP response codes - Catch defined but unmounted routes returning 404 errors
- Identify unhandled server exceptions returning 500 status codes
Example prompts for the agent
- Run smoke tests on all API routes in this project and report any failures
- Check every Express endpoint with curl and investigate 500 errors
How to install api-smoke-testing
1Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill api-smoke-testing -a claude-code2Manually: put the files in place
~/.claude/skills/api-smoke-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/api-smoke-testing/
1Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill api-smoke-testing -a codex2Manually: put the files in place
.agents/skills/api-smoke-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill api-smoke-testing -a cursor2Manually: put the files in place
.cursor/skills/api-smoke-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install spencerpauly/awesome-cursor-skills api-smoke-testing2Manually: put the files in place
.github/skills/api-smoke-testing/SKILL.md1Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill api-smoke-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/spencerpauly/awesome-cursor-skills --path resources/api-smoke-testingManually: put the files in place
.devin/skills/api-smoke-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill api-smoke-testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about api-smoke-testing
How do I install api-smoke-testing in Claude Code?
Run npx skills add spencerpauly/awesome-cursor-skills --skill api-smoke-testing -a claude-code in your terminal.
What does the api-smoke-testing skill do?
It scans your code for API route declarations, ensures the local dev server is running, and queries each endpoint via curl. Responses are classified by HTTP status codes to separate expected auth or validation responses from 404 and 500 bugs.
Which web frameworks does the skill support out of the box?
It recognizes route patterns for Next.js (App Router and Pages Router), Express, Django, FastAPI, and Ruby on Rails.
Source text
SKILL.md · CC0-1.0
---
name: api-smoke-testing
description: Start the dev server, discover API routes from the codebase, hit every endpoint, and report which ones return errors.
user-invocable: true
---
# API Smoke Testing
Verify all API endpoints return healthy responses by combining codebase analysis with HTTP requests.
## Workflow
### 1. Discover Routes
Search the codebase for API route definitions:
**Next.js (App Router):** `app/api/**/route.ts`
**Next.js (Pages Router):** `pages/api/**/*.ts`
**Express:** Look for `app.get(`, `app.post(`, `router.get(`, etc.
**Django:** Look for `urlpatterns` in `urls.py`
**FastAPI:** Look for `@app.get(`, `@app.post(`, decorators
**Rails:** Look for `routes.rb`
Build a list of endpoints with their HTTP methods.
### 2. Ensure Server is Running
Check terminal files for a running dev server. If none found, start one.
### 3. Hit Every Endpoint
For each route:
```bash
curl -s -o /dev/null -w "%{http_code}" -X <METHOD> http://localhost:<PORT><PATH>
```
For endpoints that require a body (POST/PUT/PATCH), send a minimal valid JSON:
```bash
curl -s -o /dev/null -w "%{http_code}" -X POST http://localhost:<PORT><PATH> \
-H "Content-Type: application/json" \
-d '{}'
```
### 4. Classify Results
| Status | Meaning |
|--------|---------|
| 200-299 | OK |
| 301/302 | Redirect (OK) |
| 400 | Bad request (expected for empty POST bodies) |
| 401/403 | Auth required (expected for protected routes) |
| 404 | Route not found (BUG — route exists in code but not served) |
| 500 | Server error (BUG) |
| 000/timeout | Server not responding (BUG) |
### 5. Report
```
API Smoke Test Results:
Tested: 15 endpoints
Passed: 12
Auth required: 2 (GET /api/user, POST /api/settings)
Errors:
500 — POST /api/webhooks/stripe (TypeError: Cannot read property 'id' of undefined)
404 — GET /api/v2/health (route defined but not mounted)
```
### 6. Fix Errors
For 500 errors, read the terminal output for the stack trace and fix the root cause. For 404s, check that the route file is in the correct location and properly exported.
© spencerpauly · CC0-1.0 · spencerpauly/awesome-cursor-skills