Generate Mock Service
Quickly creates realistic, simulated service APIs for testing and development purposes using configurable schemas.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add generate-mock-service npx -- -y @trustedskills/generate-mock-service
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"generate-mock-service": {
"command": "npx",
"args": [
"-y",
"@trustedskills/generate-mock-service"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill generates mock service definitions, enabling you to simulate API endpoints and responses. It's useful for development, testing, and demonstration purposes where a real backend isn’t available or desirable. The generated mocks can include request parameters, response bodies (in JSON format), and status codes.
When to use it
- Local Development: Simulate external APIs when building an application without needing access to the actual service.
- Testing UI Components: Quickly create mock data for testing user interface components that rely on API calls.
- Demonstrations & Prototypes: Showcase functionality or build prototypes without a fully implemented backend.
- Offline Mode Simulation: Test application behavior when internet connectivity is unavailable by mocking network responses.
Key capabilities
- Generates mock service definitions in JSON format.
- Supports defining request parameters for mocked endpoints.
- Allows specifying response bodies (JSON) for mocked endpoints.
- Enables setting HTTP status codes for mocked responses.
Example prompts
- "Generate a mock service with an endpoint
/usersthat returns a list of users in JSON format." - "Create a mock service for
/products/{id}which returns product details and includes a 'name' field." - "Simulate a payment API endpoint
/paymentsthat always returns a 201 Created status code."
Tips & gotchas
The generated mocks are intended to be simple representations. Complex scenarios involving authentication, rate limiting, or error handling may require more sophisticated mocking solutions.
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.