mockstar-mock

Generate a runnable mockstar mock server from API specs and documentation.

1|Updated May 28, 2026
One-click install
npx skills add https://github.com/dhanesh/agent-skills --skill mockstar-mock-dhanesh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mockstar-mock
Source: https://github.com/dhanesh/agent-skills/tree/main/mockstar-mock
Command: npx skills add https://github.com/dhanesh/agent-skills --skill mockstar-mock-dhanesh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dhaneshpurohit/mockstar, pypdf, python-docx, and includes references (resource) and assets (resource) components.

What problem does it solve? Standing up a mock backend from scattered API specs and docs is slow and error-prone. This Skill converts OpenAPI files, Postman collections, HAR captures, curl commands, GraphQL schemas, and prose documentation into a verified, runnable mockstar mock server without fabricating endpoints. ## Core Features & Use Cases - Multi-format intake: Accepts OpenAPI 3.x, Postman v2.1, HAR 1.2, curl files, GraphQL SDL/introspection, and Markdown/PDF/DOCX/URL docs, normalizing everything into one Endpoint Inventory. - Full-fidelity generation: Uses native mockstar import for OpenAPI, hand-authors other formats, and infers scenarios, dynamic TypeScript handlers, and webhooks with provider-fidelity signing (GitHub, Stripe, Slack, Shopify, Razorpay). - Verified output: Boots the generated server and smoke-tests every route, then emits a coverage report tagging each mock with provenance and confidence, flagging speculative inferences and documented-but-unmocked gaps. - Use Case: You captured a third-party API's traffic as a HAR file and have its OpenAPI spec. Run the Skill to produce a mockstar project with realistic responses, boot it locally, and point your app at the mock for offline development. ## Quick Start Ask the agent to generate a mockstar mock server into ./my-mock from your api.yaml spec and any accompanying documentation files.

Frequently Asked Questions about mockstar-mock

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a mock API server from an OpenAPI spec?▼

Pass the OpenAPI 3.x file to the Skill, which hands it to the native `mockstar import` command to generate mock JSON config. It then runs `mockstar enhance` for placeholder tokens, boots the server, and smoke-tests every route.

What input formats can generate a mockstar mock server?▼

The Skill accepts OpenAPI 3.x (JSON/YAML), Postman v2.1 collections, HAR 1.2 captures, curl command files, GraphQL SDL or introspection, and prose docs in Markdown, PDF, DOCX, or a documentation URL. Multiple input types can be combined into one Endpoint Inventory.

Does mockstar-mock support GraphQL APIs?▼

GraphQL is modeled as a single POST /graphql endpoint with operations routed via scenarios matching on operationName. It does not provide native GraphQL server semantics like subscriptions or schema stitching; use a dedicated GraphQL toolchain for those.

Can I use this with WireMock, Prism, or MSW instead?▼

No. This Skill targets only the mockstar CLI (@dhaneshpurohit/mockstar). It does not generate config for MSW, Prism, WireMock, or json-server, and it does not configure mockstar's HTTPS proxy mode.

Why do my mock routes return 404 with a named tenant?▼

mockstar resolves tenants before routing, and only the default tenant is served at the bare path. Named tenants require a selector: prefix paths with /t/<tenant> or send the x-mockstar-tenant header on every request.

What are the prerequisites for running mockstar-mock?▼

You need Bun with bunx @dhaneshpurohit/mockstar >= 0.2.2 (>= 0.3.0 for configurable webhook signing) or the Docker image, plus uv for PDF/DOCX text extraction and curl for smoke testing. The unscoped mockstar npm package is unrelated.