Skip to content
Back to skills

Api Testing 1

ASecurity

Automated API testing, mocking, and documentation

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
developmentjavascriptjavabashexpresstestingapidocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill api-testing-1 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Testing 1?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Testing 1
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-api-testing-1/badge)](https://www.skillsdirectory.com/skills/david-li0406-api-testing-1)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: API Testing
description: Automated API testing, mocking, and documentation
---

# API Testing Skill

## Tools Required
- `httpie` (brew) - HTTP client
- `jq` (brew) - JSON processing
- `curl` - HTTP requests

## Endpoints Testing

### Quick API Test
```bash
# GET request
http GET https://api.example.com/endpoint

# POST with JSON
http POST https://api.example.com/endpoint name="value"

# With auth header
http GET https://api.example.com/endpoint Authorization:"Bearer TOKEN"
```

### Supabase API Testing
```bash
# Test Supabase connection
curl -X GET "https://YOUR_PROJECT.supabase.co/rest/v1/TABLE" \
  -H "apikey: YOUR_ANON_KEY" \
  -H "Authorization: Bearer YOUR_ANON_KEY"
```

## Mock Server
```bash
# Quick mock server with json-server
npx json-server --watch db.json --port 3001
```

## Load Testing
```bash
# Using hey (install: brew install hey)
hey -n 1000 -c 50 https://api.example.com/endpoint

# Apache benchmark
ab -n 1000 -c 50 https://api.example.com/endpoint
```

## API Documentation
```bash
# Generate OpenAPI spec from Express
npx swagger-jsdoc -d swaggerDef.js -o swagger.json

# Serve Swagger UI
npx swagger-ui-express swagger.json
```

## Response Validation
```javascript
// Validate JSON schema
const Ajv = require('ajv');
const ajv = new Ajv();
const validate = ajv.compile(schema);
const valid = validate(data);
```

## Common Patterns

### Health Check Endpoint
```javascript
app.get('/health', (req, res) => {
  res.json({
    status: 'healthy',
    timestamp: new Date().toISOString(),
    version: process.env.npm_package_version
  });
});
```

### Rate Limit Testing
```bash
# Rapid-fire requests to test rate limiting
for i in {1..100}; do
  curl -s -o /dev/null -w "%{http_code}\n" https://api.example.com/endpoint
done
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…