cli-anything-wiremock
できること
このスキルは、テスト中に本物のサービスの代わりを務めるツールWireMockを、AIエージェントが操作できるようにします。本物のバックエンドを使わずにテスト用の偽のレスポンスが必要な開発者向けです。
使う場面
- ✓テスト環境用に、偽のAPIレスポンスを設定したいとき。
- ✓モックサーバーが実際に受け取ったリクエストを確認したいとき。
- ✓実際のバックエンドのトラフィックを記録し、モックのレスポンスとして再利用したいとき。
スキルのリンク
https://github.com/HKUDS/CLI-Anything/blob/main/skills/cli-anything-wiremock/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“テストサーバーで、/ordersページに対してステータス200を返す偽のレスポンスを設定してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、WireMockの管理インターフェースにコマンドを送り、スタブのマッピングを作成、一覧表示、削除します。また、受け取ったリクエストを確認できます。変更は、実行中のモックサーバーに適用されます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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
よくある質問
WireMockは動いている必要がありますか?
はい。スキルはWireMockの管理APIと通信するため、モックサーバーが動いている必要があります。
スタブをディスクに保存できますか?
はい。saveコマンドでメモリ上のスタブをディスクに書き込み、importコマンドでファイルから読み込めます。
時間とともに変わるレスポンスに対応していますか?
はい。ステートフルなシナリオのコマンドがあり、一連のリクエストに応じてレスポンスを変えられます。
詳細
人気
- GitHubのスター
- 58k
- ランキング
- #3255
- ライセンス
- Apache-2.0
- 更新日
- 2026/9/21
コメント
- …
このリポジトリの他のスキル
cli-anything-3mf
58kエージェントが3Dプリントのファイルを調べて直せるようにします。丸い穴を見つける、そのサイズを変える、メッシュを修復する、2つのファイルを比べることができます。
cli-anything-qgis
58kエージェントがターミナルからQGISのマッププロジェクトを開き、編集し、書き出せるようにします。レイヤー、フィーチャー、印刷レイアウト、処理ツールを含みます。
cli-anything-adguardhome
58kエージェントがAdGuard Homeを管理できるようにします。AdGuard Homeはネットワーク全体で広告を遮断するツールで、フィルター、DNSの書き換え、クライアント、クエリのログを扱います。
cli-anything-anygen
58kエージェントが、AnyGenのサービスを使って、書かれたプロンプトからスライド、文書、ウェブサイト、図を生成できるようにします。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。