Install
openclaw skills install wangjipeng-api-spec-to-mock-serverUse when (1) user provides API spec in OpenAPI or Swagger format and needs a runnable mock server.
openclaw skills install wangjipeng-api-spec-to-mock-serverUse when (1) user provides API spec in OpenAPI or Swagger format and needs a runnable mock server.
This skill solves the specific engineering problem of: user provides API spec in OpenAPI or Swagger format and needs a runnable mock server
This skill is NOT:
This skill IS activated ONLY when the trigger conditions are explicitly met.
/api-spec-to-mock-serverDefault mode. Performs the core task end-to-end.
When to use: User provides input matching the trigger conditions above.
Receive API spec — User provides an API specification document
Parse spec structure — Extract the API contract:
Generate mock server — Create a runnable server with the spec:
Test endpoints — Verify the mock server behaves correctly:
Deliver with run instructions — Provide the server code and usage:
os.getenv("API_KEY") insteadA good output:
A bad output:
| Scenario | Bad Output | Good Output |
|---|---|---|
| Trigger matched | "I can help with that." + no action | Correct transformation delivered in structured format |
| Invalid input | Crash or wrong result | "Missing required field: [X]. Please provide [Y]." |
| Ambiguous input | Guesses and might be wrong | States assumption and asks for confirmation |
| Off-topic request | Attempts to help anyway | "This skill activates when [trigger]. Please restate your request." |
references/ — Detailed templates, schemas, and edge-case rules for this skill