Api Test Generator
Helps with API, testing as part of agent workflows workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add api-test-generator npx -- -y @trustedskills/api-test-generator
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"api-test-generator": {
"command": "npx",
"args": [
"-y",
"@trustedskills/api-test-generator"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill generates comprehensive integration tests for API endpoints, ensuring thorough testing of various aspects like HTTP methods, status codes, authentication, authorization, request/response validation, and error handling. It supports both REST APIs and GraphQL queries and mutations. The generated tests cover a wide range of scenarios to ensure robust API functionality.
When to use it
- Generate tests for existing REST API endpoints.
- Test GraphQL API queries and mutations.
- Validate the contracts between your application and its APIs.
- Verify authentication and authorization mechanisms within an API.
- Ensure proper handling of errors and expected status codes by the API.
Key capabilities
- Generates tests for REST API endpoints, covering all HTTP methods.
- Supports testing GraphQL queries and mutations.
- Tests success cases (200, 201, 204), validation errors (400, 422), authentication errors (401), authorization errors (403), not found errors (404), conflict errors (409), and server errors (500).
- Validates request bodies, query parameters, and response schemas.
Example prompts
- "Generate tests for the
/api/usersendpoint." - "Create a test suite for all API endpoints defined in
src/routes/users.py." - "Test authentication requirements for the
/api/users/:idendpoint."
Tips & gotchas
- The skill requires access to route definitions (e.g.,
src/routes/users.py,src/controllers/user_controller.py) to identify endpoints and their associated parameters. - It's designed for integration testing, focusing on API functionality rather than unit-level code coverage.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.