mcpField
A
api-smoke-testing

api-smoke-testing

github.com/spencerpaulyTesting & quality868503 installsUpdated 13w ago
Repository

About api-smoke-testing

api-smoke-testing is a developer skill that checks API endpoints by analyzing the codebase and sending HTTP requests. It covers route discovery, response classification, reporting, and error diagnosis.

Key features

  1. 01Discover API routes in the codebase
  2. 02Check whether the dev server is running
  3. 03Send HTTP requests to endpoints
  4. 04Classify responses by status code
  5. 05Summarize test results
  6. 06Investigate server and routing errors

Use cases

  1. 01Verify API endpoints in a development environment
  2. 02Find routes that are missing or not served
  3. 03Distinguish authentication requirements from server errors

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill api-smoke-testing

After installing, type/api-smoke-testingin Claude Code to confirm it loaded.

Details

From the project README

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:

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:

curl -s -o /dev/null -w "%{http_code}" -X POST http://localhost:<PORT><PATH> \
  -H "Content-Type: application/json" \
  -d '{}'
4. Classify Results
StatusMeaning
200-299OK
301/302Redirect (OK)
400Bad request (expected for empty POST bodies)
401/403Auth required (expected for protected routes)
404Route not found (BUG — route exists in code but not served)
500Server error (BUG)
000/timeoutServer 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.

Comments

Markdown supported