.claude/skills/ts-api-tester/SKILL.md
Test REST and GraphQL API endpoints with structured assertions and reporting. Use when a user asks to test an API, hit an endpoint, check if an API works, validate a response, debug an API call, test authentication flows, or verify API contracts. Supports GET, POST, PUT, PATCH, DELETE with headers, body, auth, and response validation.
npx skillsauth add eliferjunior/Claude api-testerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Test API endpoints by sending HTTP requests, validating responses, and reporting results. Supports REST and GraphQL APIs with authentication, custom headers, request bodies, and structured assertions on status codes, headers, and response payloads.
When a user asks you to test or debug an API endpoint, follow these steps:
Determine from the user or codebase:
Using curl (preferred for quick tests):
# GET request
curl -s -w "\nHTTP Status: %{http_code}\nTime: %{time_total}s\n" \
-H "Authorization: Bearer $TOKEN" \
"https://api.example.com/users?page=1"
# POST request with JSON
curl -s -w "\nHTTP Status: %{http_code}\nTime: %{time_total}s\n" \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"name": "Jane", "email": "[email protected]"}' \
"https://api.example.com/users"
Using Python (for complex flows):
import requests
import json
import time
def test_endpoint(method, url, headers=None, body=None, expected_status=200):
start = time.time()
response = requests.request(method, url, headers=headers, json=body, timeout=30)
elapsed = time.time() - start
result = {
"status": response.status_code,
"time_ms": round(elapsed * 1000),
"headers": dict(response.headers),
"body": response.json() if response.headers.get("content-type", "").startswith("application/json") else response.text,
}
passed = response.status_code == expected_status
print(f"{'PASS' if passed else 'FAIL'} | {method} {url} | {response.status_code} | {result['time_ms']}ms")
return result, passed
Check these in order:
def validate_response(result, assertions):
failures = []
body = result["body"]
for field, expected in assertions.items():
actual = body
for key in field.split("."):
if isinstance(actual, dict):
actual = actual.get(key)
elif isinstance(actual, list) and key.isdigit():
actual = actual[int(key)]
else:
actual = None
break
if actual != expected:
failures.append(f" {field}: expected {expected!r}, got {actual!r}")
return failures
Format as a clear test report:
API Test Results
================
Endpoint: POST /api/users
Status: 201 Created (expected 201) -- PASS
Time: 142ms
Body: Valid JSON, 3 fields
Assertions:
[PASS] body.id is present
[PASS] body.name == "Jane"
[PASS] body.email == "[email protected]"
[FAIL] body.role expected "admin", got "user"
Result: 3/4 assertions passed
User request: "Test the users API -- create, read, update, delete"
Output:
API Test Suite: Users CRUD
==========================
1. POST /api/users
Status: 201 Created -- PASS
Time: 156ms
Body: {"id": 42, "name": "Test User", "email": "[email protected]"}
2. GET /api/users/42
Status: 200 OK -- PASS
Time: 38ms
Body: {"id": 42, "name": "Test User", "email": "[email protected]"}
3. PUT /api/users/42
Status: 200 OK -- PASS
Time: 89ms
Body: {"id": 42, "name": "Updated Name", "email": "[email protected]"}
4. DELETE /api/users/42
Status: 204 No Content -- PASS
Time: 45ms
5. GET /api/users/42 (verify deletion)
Status: 404 Not Found -- PASS
Time: 22ms
Result: 5/5 PASSED
User request: "I'm getting a 401 on POST /api/orders, can you figure out why?"
Output:
Debugging POST /api/orders
===========================
Test 1: No auth header
Status: 401 -- Missing Authorization header (expected)
Test 2: With Bearer token
Status: 401 -- Response: {"error": "Token expired"}
Note: Token exp claim is 2024-01-15T00:00:00Z (expired)
Test 3: With refreshed token
Status: 201 Created -- PASS
Root cause: Your Bearer token has expired.
Fix: Refresh the token using POST /api/auth/refresh
data field separately from errors.development
Expert guidance for Fireworks AI, the platform for running open-source LLMs (Llama, Mixtral, Qwen, etc.) with enterprise-grade speed and reliability. Helps developers integrate Fireworks' inference API, fine-tune models, and deploy custom model endpoints with function calling and structured output support.
development
Convert any website into clean, structured data with Firecrawl — API-first web scraping service. Use when someone asks to "turn a website into markdown", "scrape website for LLM", "Firecrawl", "extract website content as clean text", "crawl and convert to structured data", or "scrape website for RAG". Covers single-page scraping, full-site crawling, structured extraction, and LLM-ready output.
tools
Expert guidance for Firebase, Google's platform for building and scaling web and mobile applications. Helps developers set up authentication, Firestore/Realtime Database, Cloud Functions, hosting, storage, and analytics using Firebase's SDK and CLI.
development
When the user needs to build file upload functionality for a web application. Use when the user mentions "file upload," "image upload," "upload endpoint," "multipart upload," "presigned URL," "S3 upload," "file validation," "upload to cloud storage," or "accept user files." Handles upload endpoints, file validation (type, size, magic bytes), cloud storage integration, and upload status tracking. For image/video processing after upload, see media-transcoder.