Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add spencerpauly/awesome-cursor-skills --skill api-smoke-testing -a claude-code
Open on GitHub

What 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 curl to 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-code

2Manually: put the files in place

~/.claude/skills/api-smoke-testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/api-smoke-testing/

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

Similar skills

Everything for Backend and APIs →

From the same set59

using-ui-stack Makes the agent build interfaces from fixed rules: an 8px grid, 60-30-10 colors, type scale, dark mode and interaction states. CX Codex +1 539installs parallel-code-review Runs four parallel read-only subagents to inspect a diff across security, speed, correctness, and readability. Built for vetting large or risky pull requests. CX Codex +1 530installs reviewing-code A skill that walks your code through a checklist: correctness, maintainability, performance, types and tests. Useful when a change needs review before merge. CX Codex +1 516installs writing-tests Inspects existing code, detects your test runner, and drafts unit and integration tests with mocks and edge cases. CX Codex +1 499installs saving-workspace-context The skill writes research, decisions and templates into your workspace files, so the next session starts with context instead of a blank slate. CX Codex +1 495installs codebase-onboarding Fires five explore subagents in parallel to cover architecture, data models, APIs, auth and deployment, then merges their findings into one onboarding doc. CX Codex +1 476installs auditing-performance A skill that audits app performance: bundle size, rendering, database queries and Core Web Vitals. Useful when pages load slowly or the UI stutters. CX Codex +1 476installs suggesting-cursor-hooks Watches for repetitive check requests and suggests automating them with Cursor hooks. Useful when you find yourself repeatedly asking the agent to run linters or tests. CX Codex +1 475installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor