Imported from wiremock-inc/skills (
common/skills/author-response-templates/SKILL.md). Install upstream withnpx skills add wiremock-inc/skills --skill author-response-templates. Copyright stays with the author.
Prerequisites
This skill requires the WireMock Cloud MCP server to be configured and running. If it is unavailable, stop and inform the user before proceeding.
Reference Documentation
Read these references before authoring templates:
- Response Template Authoring - guidelines for Handlebars response templates, formatting, brace collision avoidance, and pagination metadata
- Stateful Stubbing - state helpers (
{{state}},{{listState}},{{jsonMerge}}) and SET value templates - Data-Driven Stubbing - data source iteration with
data.items,{{arrayJoin}}, and SQL WHERE clauses
Instructions
The target mock API is: $ARGUMENTS
If $ARGUMENTS is empty, ask the user which mock API to work with.
- Identify the target mock API using
search_my_mock_apis. - Read the Response Template Authoring reference.
- Understand the user's goal — are they writing a new template, debugging an existing one, or adding features like pagination?
- If debugging, fetch the relevant stubs with
search_stub_mappingsand test them to reproduce the issue.
@variant:remote
Use curl via Bash — there is no MCP tool for making arbitrary HTTP requests.
@variant:local
Use the make_http_request tool.
@endvariant
- Author or fix the template following the guidelines:
- Use
{{#formatJson}}to wrap JSON output - Use
{{~#arrayJoin}}with tilde whitespace trimming for arrays - Pretty-print JSON in templates to avoid triple-brace collisions
- Avoid
{{replace}}for generating structural JSON characters - For pagination, use LIMIT/OFFSET in data queries and compute metadata with
{{val}}and{{math}}
- Use
- Update the stub using
update_stub_mapping. - Test the updated stub and check the request journal for errors.
@variant:remote
Use curl via Bash.
@variant:local
Use the make_http_request tool.
@endvariant
- Report the results to the user.
