Skip to content
Skillpedia
Testing58k Β· #3255

cli-anything-wiremock

What it does

This skill lets an AI agent control WireMock, a tool that stands in for a web service during testing. It is for developers who need fake responses for tests without using the real backend.

When to use it

  • βœ“When you want a fake API response set up for a test environment.
  • βœ“When you need to check which requests a mock server actually received.
  • βœ“When you want to record real backend traffic and reuse it as mock responses.

Skill link

https://github.com/HKUDS/CLI-Anything/blob/main/skills/cli-anything-wiremock/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/HKUDS/CLI-Anything/blob/main/skills/cli-anything-wiremock/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œI want to set up a fake response on my test server that returns status 200 for the /orders page.”

5 new skills a week. 1 minute to read.

How it works

The agent sends commands to WireMock's admin interface to create, list, or delete stub mappings and to inspect requests. The changes apply to the running mock server.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Overview

cli-anything-wiremock is a command-line interface that wraps the WireMock Admin REST API (/__admin/). It allows agents and developers to manage HTTP stub mappings, inspect served requests, control stateful scenarios, and record real backend traffic β€” all from the terminal or from agent tool calls.

WireMock is commonly used in integration testing environments to replace real HTTP backends with controllable mock responses.

Command Groups

stub β€” Manage HTTP stub mappings

Command Description
stub list List all registered stubs
stub get <id> Get details of a specific stub by UUID
stub create <json> Create a stub from a JSON string
stub quick M URL S Quickly create a stub: METHOD URL STATUS_CODE
stub delete <id> Delete a stub by UUID
stub reset Reset all stubs to the defaults on disk
stub save Persist in-memory stubs to disk
stub import <file> Import stubs from a JSON file

request β€” Inspect served requests

Command Description
request list List recent served requests
request find <pattern> Find requests matching a JSON pattern
request count <pattern> Count requests matching a JSON pattern
request unmatched List requests that matched no stub (404s)
request reset Clear the request journal

scenario β€” Stateful scenario management

Command Description
scenario list List all scenarios and current states
scenario set N S Set scenario NAME to STATE
scenario reset Reset all scenarios to their initial state

record β€” Record traffic from a real backend

Command Description
record start <url> Start proxying + recording to TARGET_URL
record stop Stop recording, return captured stubs
record status Check if currently recording
record snapshot Snapshot in-memory requests as stubs

settings β€” Global server settings

Command Description
settings get Get current global WireMock settings
settings version Show WireMock server version

Top-level commands

Command Description
status Check if WireMock is running
reset Full reset: stubs + requests + scenarios
shutdown Gracefully shut down the WireMock server

Key Examples

# Check connectivity
cli-anything-wiremock status

# Create a stub using quick form
cli-anything-wiremock stub quick GET /api/users 200 --body '[{"id":1}]'

# Create a stub using full JSON
cli-anything-wiremock stub create '{
  "request": {"method": "POST", "url": "/api/orders"},
  "response": {"status": 201, "body": "{\"id\":99}"}
}'

# Verify a POST was made exactly once
cli-anything-wiremock --json request count '{"method":"POST","url":"/api/orders"}'
# β†’ {"count": 1}

# Scenario: advance state
cli-anything-wiremock scenario set "cart-flow" "item-added"

# Record a real backend
cli-anything-wiremock record start https://api.example.com
# ... make requests ...
cli-anything-wiremock record stop

Agent Guidance

Always use --json in agent contexts

Use --json for all invocations in scripts or agent tool calls. JSON output varies by command type (these are distinct response types, no

FAQ

Does WireMock need to be running?

Yes. The skill talks to the WireMock admin API, so the mock server must be running.

Can it save stubs to disk?

Yes. A save command writes the in-memory stubs to disk, and an import command loads them from a file.

Can it handle responses that change over time?

Yes. The skill includes commands for stateful scenarios, which change the responses over a sequence of requests.

Details

Original description by the author

Python CLI harness for WireMock HTTP mock server administration

repo: HKUDS/CLI-Anything

Popularity

GitHub stars
58k
Ranking position
#3255
License
Apache-2.0
Updated
9/21/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills