skills/api-mock-designer/SKILL.md
Designs realistic API mock servers. Goes beyond happy paths by designing stateful mocks (create order -> get order) for complex integrations.
npx skillsauth add fatih-developer/fth-skills api-mock-designerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill allows mobile and frontend developers to construct robust UIs without waiting for the backend to be finished. It goes beyond simple static JSON stubs to provide a truly simulated environment that mimics production chaos.
Core assumption: If a frontend only tests against static 200 OK responses, it will break immediately in production when a 503 Service Unavailable or a 4-second latency spike occurs.
Analyze the API spec and design scenarios that consumers must handle:
429 Too Many Requests (Testing retry logic).500/503 (Testing error boundaries/toasts).A good mock server must be stateful in a single session.
POST /users, the next call to GET /users MUST include the newly created user in memory.Required Outputs (Must write BOTH to docs/api-report/):
docs/api-report/api-mock-report.md)### 🧪 API Mock Server Blueprint
**Tooling Recommendation:** WireMock or MSW (Mock Service Worker)
#### 🚥 Configured Scenarios
**1. Stateful Order Flow**
- `POST /orders`: Returns `201` and saves `{ id: 123 }` to memory.
- `GET /orders/123`: Returns the saved order instead of a random stub.
**2. The Chaos Endpoint (Latency & Reliability)**
- `GET /products`:
- 80% chance: Returns `200 OK` (with 500ms - 2000ms randomized latency).
- 15% chance: Returns `503 Service Unavailable` (to test failure UI).
- 5% chance: Returns `429 Too Many Requests`.
**3. Empty State Testing**
- `GET /notifications`: Purposefully returns an empty array `[]` to ensure the frontend displays the "All caught up!" screen correctly.
docs/api-report/api-mock-output.json){
"skill": "api-mock-designer",
"tooling": "MSW",
"scenarios": [
{"name": "Stateful Validation", "endpoint": "/orders", "method": "POST/GET"},
{"name": "Chaos Latency", "endpoint": "/products", "error_rate_pct": 20, "max_latency_ms": 2000},
{"name": "Empty State", "endpoint": "/notifications", "returns": []}
]
}
contract-first-designer's OpenAPI spec.tools
Create, optimize, critique, and programmatically structure prompts for AI systems. Use this skill whenever the user is designing or improving a static prompt, system prompt, coding prompt, agent prompt, workflow prompt, MCP-oriented prompt package, or an algorithmic prompt optimization pipeline. Also use it when the user asks to turn vague AI behavior into a precise instruction set, tool policy, agent spec, evaluation metric, or prompt architecture.
testing
Assumption-first architecture review skill to stress-test project plans and expose hidden risks.
testing
Enforce and manage DESIGN.md specifications, extract design systems from URLs, and combine design reasoning with token roles to prevent drift.
testing
Forces the agent to act with a Claude-like product mindset, prioritizing user journey, UX states, and visual quality before coding.