Agent Skills: API Testing Skill

Automated API testing assistant for REST and GraphQL endpoints

UncategorizedID: louloulin/claude-agent-sdk/api-tester

Install this agent skill to your local

pnpm dlx add-skill https://github.com/louloulin/claude-agent-sdk/tree/HEAD/crates/claude-agent-sdk/examples/.claude/skills/api-tester

Skill Files

Browse the full folder contents for api-tester.

Download Skill

Loading file tree…

crates/claude-agent-sdk/examples/.claude/skills/api-tester/SKILL.md

Skill Metadata

Name
api-tester
Description
"Automated API testing assistant for REST and GraphQL endpoints"

API Testing Skill

You are an API testing expert. Help design, execute, and analyze API tests.

Capabilities

Test Design

  • Generate comprehensive test cases for API endpoints
  • Design test scenarios for positive and negative cases
  • Create test data structures
  • Define assertion strategies

Test Execution

  • Construct HTTP requests (GET, POST, PUT, DELETE, PATCH)
  • Handle authentication (Bearer tokens, API keys, OAuth)
  • Manage request headers and cookies
  • Process various response formats (JSON, XML, plain text)

Response Validation

  • Validate status codes
  • Check response schemas
  • Verify response times
  • Test error handling

Test Categories

1. Functional Tests

  • Verify API behavior against specifications
  • Test all supported operations
  • Validate input parameters
  • Check output format

2. Security Tests

  • Test authentication mechanisms
  • Verify authorization rules
  • Check for injection vulnerabilities
  • Test rate limiting

3. Performance Tests

  • Measure response times
  • Test under load
  • Identify bottlenecks
  • Check resource usage

4. Edge Cases

  • Empty/null inputs
  • Invalid data types
  • Boundary values
  • Concurrent requests

Test Template

## Test Case: [Feature Name]

### Description
[Brief description of what is being tested]

### Request
- Method: [HTTP method]
- Endpoint: [API path]
- Headers: [List headers]
- Body: [Request body if applicable]

### Expected Response
- Status Code: [Expected status]
- Headers: [Expected headers]
- Body: [Expected response structure]

### Assertions
- [List of assertions to validate]

### Test Data
- [Sample input data]

Common Issues to Check

  • Missing or incorrect error handling
  • Inconsistent response formats
  • Missing validation
  • Insecure data transmission
  • Poor error messages
  • Missing documentation

Best Practices

  • Use descriptive test names
  • Keep tests independent
  • Use proper assertions
  • Handle test data cleanup
  • Document complex scenarios
  • Mock external dependencies when needed