api-test-generator
Automates the creation of robust pytest tests for REST APIs by analyzing DataStructure.php definitions.
Install
mkdir -p .claude/skills/api-test-generator && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4940" && unzip -o skill.zip -d .claude/skills/api-test-generator && rm skill.zipInstalls to .claude/skills/api-test-generator
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Генерация полных Python pytest тестов для REST API эндпоинтов с валидацией схемы. Использовать при создании тестов для новых эндпоинтов, добавлении покрытия для CRUD операций или валидации соответствия API с OpenAPI схемами.Key capabilities
- →Locates DataStructure.php files via grep
- →Extracts parameter types, constraints, and enums
- →Generates pytest suites from templates
- →Produces CRUD-specific test logic
- →Validates OpenAPI schema structures
How it works
It parses DataStructure.php files to extract API definitions and injects them into a pre-defined test-template.py file to ensure coverage.
Inputs & outputs
When to use api-test-generator
- →Testing new REST API endpoints
- →Adding test coverage for CRUD operations
- →Validating API against OpenAPI specs
- →Generating negative test cases
About api-test-generator
Analyzes API resource structures to generate test suites covering CRUD operations, parameter validation, and edge cases. Ensures API compliance and high test coverage.
Генерация полных Python pytest тестов для REST API эндпоинтов с валидацией схемы. Использовать при создании тестов для новых эндпоинтов, добавлении покрытия для CRUD операций или валидации соответствия API с OpenAPI схемами.
When not to use it
- →Non-REST API codebases
- →Projects without OpenAPI/DataStructure specifications
- →Manual test suites requiring highly custom logic
Prerequisites
Limitations
- →Requires predictable DataStructure.php format
- →Limited by the completeness of the source schema definitions
How it compares
Unlike a generic code-generating prompt, this tool follows a project-specific architectural pattern for MikoPBX to ensure tests are runnable and standard-compliant.
Compared to similar skills
api-test-generator side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| api-test-generator (this skill) | 1 | 10mo | Review | Intermediate |
| test-api-serializer | 0 | 5mo | No flags | Intermediate |
| fastapi-templates | 520 | 4mo | No flags | Intermediate |
| fastapi-pro | 79 | 5mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mikopbx
View all by mikopbx →You might also like
test-api-serializer
engremran07
Serializer tests: to_representation, to_internal_value, validation. Use when: testing DRF serializer output, input validation, custom field logic.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
fastapi-pro
sickn33
Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.
sexp
atopile
How the Zig S-expression engine and typed KiCad models work, how they are exposed to Python (pyzig_sexp), and the invariants around parsing, formatting, and freeing.
add-vault-protocol
tradingstrategy-ai
Add support for a new ERC-4626 vault protocol. Use when the user wants to integrate a new vault protocol like IPOR, Plutus, Morpho, etc. Requires vault smart contract address, protocol name, and protocol slug as inputs.
property-based-testing
trailofbits
Provides guidance for property-based testing across multiple languages and smart contracts. Use when writing tests, reviewing code with serialization/validation/parsing patterns, designing features, or when property-based testing would provide stronger coverage than example-based tests.