做什么
为作为独立多克容器运行的WireMock提供模式和配置. 生成模拟 HTTP 端点, 创建用于测试的 stub 映射, 验证集成方案, 并模拟出错条件
技能库 智客分类:运维与云 wiremock-standalone-docker
为作为独立多克容器运行的WireMock提供模式和配置. 生成会模拟 HTTP 端点,创建用于测试的 stub 映射,验证集成情景,并模拟出错条件. 需要模拟API时使用,创建模拟服务器,站点外部服务,模拟第三方API,或假冒API响应进行集成测试.
官方网址:skills.sh
先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。
为作为独立多克容器运行的WireMock提供模式和配置. 生成模拟 HTTP 端点, 创建用于测试的 stub 映射, 验证集成方案, 并模拟出错条件
需要时使用 :
按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:WireMock Standalone Docker Skill、Overview、When to Use、Instructions、Step 1: Set Up Docker Compose、Step 2: Create Directory Structure。 其中含规范建议的小节:分步指令、输入输出示例。
文件分析:除 SKILL.md 外,正文还引用了 references/,属于带资源的技能包,代理会按需再读这些文件。
Provides patterns and configurations for running WireMock as a standalone Docker container. Generates mock HTTP endpoints, creates stub mappings for testing, validates integration scenarios, and simulates error conditions. Use when you need to mock APIs, create a mock server, stub external services, simulate third-party APIs, or fake API responses for integration testing.
WireMock Standalone Docker SkillOverviewWhen to UseInstructionsStep 1: Set Up Docker ComposeStep 2: Create Directory StructureStep 3: Define API MappingsStep 4: Start WireMockStep 5: Verify WireMock is RunningStep 6: Configure HTTP ClientStep 7: Test Edge CasesExamples
· allowed-tools:Read, Write, Edit, Bash, Glob, Grep
来源分类:skills.sh agent-skill
namewiremock-standalone-dockerdescriptionallowed-tools具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗
先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。
该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。
复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。
把 Agent Skill「wiremock-standalone-docker」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-91c3e9fbdcda943b-Wiremock-Standalone-Docker.html 请存为 .cursor/skills/wiremock-standalone-docker/SKILL.md 或 .claude/skills/wiremock-standalone-docker/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。 该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/giuseppe-trisciuoglio/developer-kit 取完整目录,不要只建一个 SKILL.md。
需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。
npx skills add 'https://github.com/giuseppe-trisciuoglio/developer-kit' --list
npx skills add 'https://github.com/giuseppe-trisciuoglio/developer-kit' --skill 'wiremock-standalone-docker'
CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。
Provides patterns for running WireMock as a standalone Docker container to mock external APIs during integration and end-to-end testing. Runs WireMock as a separate service that simulates real API behavior for testing HTTP clients, retry logic, and error handling.
Use when you need to:
Create a docker-compose.yml with WireMock 3.5.2, port mapping, and volume mounts for mappings and files:
version: "3.8"
services:
wiremock:
image: wiremock/wiremock:3.5.2
ports:
- "8080:8080"
volumes:
- ./wiremock:/home/wiremock
command: ["--global-response-templating"]
Create the WireMock configuration directories:
wiremock/
├── mappings/ # JSON stub definitions
└── __files/ # Response body files
Create JSON stub files in wiremock/mappings/ for each scenario:
fixedDelayMillisecondsdocker compose up -d
curl http://localhost:8080/__admin/mappings
Expected: Returns empty array {"mappings":[]} if no stubs loaded, or your stub definitions. If you get connection refused, check that the container is running: docker compose ps
Point your application to http://localhost:8080 (or http://wiremock:8080 in Docker network) instead of the real API.
Always test: 200, 400, 401, 403, 404, 429, 500, timeouts, malformed responses.
{
"request": { "method": "GET", "url": "/api/users/123" },
"response": {
"status": 200,
"jsonBody": { "id": 123, "name": "Mario Rossi" }
}
}
{
"request": { "method": "GET", "url": "/api/error" },
"response": { "status": 500, "body": "Internal Server Error" }
}
{
"request": { "method": "GET", "url": "/api/slow" },
"response": {
"status": 200,
"fixedDelayMilliseconds": 5000,
"jsonBody": { "message": "delayed" }
}
}
services:
wiremock:
image: wiremock/wiremock:3.5.2
ports:
- "8080:8080"
volumes:
- ./wiremock:/home/wiremock
app:
build: .
environment:
- API_BASE_URL=http://wiremock:8080
depends_on:
- wiremock
users/, products/curl -X POST http://localhost:8080/__admin/resetget-user-success.json, post-user-error.json--global-response-templating for dynamic responsesRequests don't match stubs?
Check what WireMock received: curl http://localhost:8080/__admin/requests — shows unmatched requests with details about what was actually sent.
Stub file not loading?
Verify file location: place JSON stubs in wiremock/mappings/ and response files in wiremock/__files/. Check file permissions.
Connection refused errors?
Run docker compose ps to verify the container is running. Check port conflicts with lsof -i :8080.
See references/ for complete examples:
docker-compose.yml - Full Docker Compose configurationwiremock/mappings/ - Complete stub examples for all scenarios运维与云
用于容器管理,图像操作,调试的基本道克命令和工作流程.
运维与云
从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…
运维与云
构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…
运维与云
执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…