/enterprise-harness-engineering:mock-enginefrom enterprise-harness-engineering
Manages local mock development environment with Docker Compose: start/stop services, load test data, create test scenarios, troubleshoot startup issues.
Ships in enterprise-harness-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Provides unified mock infrastructure (MySQL, Redis, Kafka, MQTT, LocalStack, WireMock) via Docker Compose, supporting local development and integration testing.
Applicable scenarios:
make mock-up one-command launch of all dependency servicesPrerequisites:
docker compose version)mock/ directory exists at the project root (containing docker-compose.yml and Makefile)mock/ directory, initialize from the mock-engine template:
cp -r /path/to/mock-engine/core/templates/mock/ ./mock/
# Modify project configuration in mock/Makefile (database name, password, etc.)
First-time initialization:
cd mock/
make mock-init # Download compose fragments
Start Mock environment:
make mock-up # Start all services + wait for health checks + load data
make mock-status # Verify all services are running normally
Start the application (backend-service example):
# The appName environment variable must be set
appName=your-app mvn spring-boot:run \
-pl your-app \
-Dspring-boot.run.profiles=dev-local,mock
Load a test scenario:
make mock-scenario SCENARIO=user-registration
# View available scenarios:
ls fixtures/scenarios/
Stop/reset:
make mock-down # Stop services (preserve data)
make mock-clean # Stop + delete data volumes
make mock-reset # Full reset (clean + init + up)
| Service | Port | Environment Variable Override |
|---|---|---|
| MySQL | 13306 | MOCK_MYSQL_PORT |
| Redis (business) | 16379 | MOCK_REDIS_BUSINESS_PORT |
| Redis (readonly) | 16380 | MOCK_REDIS_READONLY_PORT |
| Redis (event) | 16381 | MOCK_REDIS_EVENT_PORT |
| Kafka | 19092 | MOCK_KAFKA_PORT |
| MQTT | 11883 | MOCK_MQTT_PORT |
| LocalStack | 14566 | MOCK_LOCALSTACK_PORT |
| WireMock | 19999 | MOCK_WIREMOCK_PORT |
Base Fixtures (auto-loaded): Place in mock/fixtures/base/, executed in filename order:
fixtures/base/
├── 01-seed-users.sql # INSERT test users
├── 02-seed-devices.sql # INSERT test devices
└── 03-seed-data.sql # INSERT test data
Scenario Fixtures (load on demand): One subdirectory per scenario:
fixtures/scenarios/user-registration/
├── data.sql # MySQL data
├── redis-cmds.txt # Redis CLI commands (one per line)
└── stubs-override/ # WireMock stub overrides
redis-cmds.txt format:
# Comment line
SET user:1001:token abc123
HSET device:DEV001 status online
EXPIRE user:1001:token 3600
WireMock Stubs: Place in mock/stubs/<service-name>/:
{
"request": {
"method": "POST",
"urlPath": "/stripe/v1/customers"
},
"response": {
"status": 200,
"jsonBody": { "id": "cus_mock_001" }
}
}
Supports advanced features: conditional routing (queryParameters/bodyPatterns), dynamic templates (response-template), state machines (scenarioName), Webhook callbacks (serveEventListeners).
MySQL connection failed:
docker ps --filter name=mock-mysql
docker logs mock-mysql
docker exec -e MYSQL_PWD=root123456 mock-mysql mysql -uroot -e "SELECT 1"
Bind mount not taking effect (Docker-in-Docker): SQL files not auto-loaded into MySQL:
docker exec -e MYSQL_PWD=root123456 -i mock-mysql mysql -uroot < mock/sql/init-schema.sql
WireMock stubs not loaded:
curl http://localhost:19999/__admin/mappings | python3 -m json.tool
docker cp mock/stubs/. mock-wiremock:/home/wiremock/mappings/
curl -X POST http://localhost:19999/__admin/mappings/reset
Spring Bean missing (CloudBeanCondition): Ensure the appName=your-app environment variable is set.
Java (Testcontainers):
// pom.xml: <dependency>com.example:mock-engine</dependency>
MockInfraManager manager = MockInfraManager.fromProjectMockDir("./mock");
manager.startAll();
Map<String, String> props = manager.getAllProperties();
Go:
// go.mod: require gitlab.example.com/tools/mock-engine/go
infra := mockinfra.New(mockinfra.WithProjectDir("./mock"))
infra.Start(ctx)
defer infra.Stop(ctx)
infra.LoadScenario(ctx, "user-registration")
User: Help me start the mock environment
AI: Let me just docker compose up directly
docker compose up -d
# Then directly start the application
mvn spring-boot:run -pl your-app
Problems:
mock/ directorymake mock-init to initialize fragmentsmake mock-up (skips health checks and data loading)appName environment variable or mock profileUser: Help me start the mock environment
AI: OK, let me check the mock directory and start the environment.
cd mock/
# Check if already initialized
ls .fragments/Makefile.include 2>/dev/null || make mock-init
# Start and wait for all services to be ready
make mock-up
# Verify service status
make mock-status
# Start the application (with correct environment variable and profile)
cd ..
appName=your-app mvn spring-boot:run \
-pl your-app \
-Dspring-boot.run.profiles=dev-local,mock
# Verify health check
curl -s http://localhost:7777/actuator/health
User: I need to test the user registration flow
AI: Let me just call the registration API directly
curl -X POST http://localhost:7777/account/register \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]"}'
Problems:
User: I need to test the user registration flow
AI: OK, let me load the registration test scenario data first, then test step by step.
# 1. Load user registration scenario data
cd mock/
make mock-scenario SCENARIO=user-registration
# 2. Login first to get an admin token
TOKEN=$(curl -s -X POST http://localhost:7777/account/login \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"password","loginType":99}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['data']['token'])")
# 3. Check if the email is available
curl -s -X POST http://localhost:7777/account/check-email \
-H "Content-Type: application/json" \
-H "Authorization: $TOKEN" \
-d '{"email":"[email protected]"}'
# 4. Execute registration
curl -s -X POST http://localhost:7777/account/register \
-H "Content-Type: application/json" \
-H "Authorization: $TOKEN" \
-d '{"email":"[email protected]","password":"Test@1234","nickname":"TestUser"}'
gitlab.example.com/tools/mock-enginemock-engine/docs/specs/2026-03-20-mock-engine-generalization-design.mdWhat SKILL.md sets; muted values are Claude Code's defaults
25 skills in this plugin
/architectUse when designing a new feature or system, making architecture decisions, writing technical design docs, or structuring project documentation. Triggers on "design", "architecture", "technical design", "ADR", "system decomposition", "how should I structure this", "设计方案", "架构设计", "技术方案", "文档体系", "写 User Story", "写文档". Also use when reviewing existing architecture docs or asking "where should I put this doc?"/clean-cacheBatch-scan workspace Flutter/Android/iOS/Node.js projects, report cache usage, and perform tiered cleanup to free disk space. Triggers when the user says "clean cache", "disk space low", "free up space", or similar./code-reviewClaude Code refuses to install this plugin
.claude-plugin/plugin.json: skills.0: Invalid string: must start with "./", skills.1: Invalid string: must start with "./", skills.2: Invalid string: must start with "./", skills.3: Invalid string: must start with "./", skills.4: Invalid string: must start with "./", skills.5: Invalid string: must start with "./", skills.6: Invalid string: must start with "./", skills.7: Invalid string: must start with "./", skills.8: Invalid string: must start with "./", skills.9: Invalid string: must start with "./", skills.10: Invalid string: must start with "./", skills.11: Invalid string: must start with "./", skills.12: Invalid string: must start with "./", skills.13: Invalid string: must start with "./", skills.14: Invalid string: must start with "./", skills.15: Invalid string: must start with "./", skills.16: Invalid string: must start with "./", skills.17: Invalid string: must start with "./", skills.18: Invalid string: must start with "./", skills.19: Invalid string: must start with "./", s…
.claude-plugin/plugin.json: skills.0: Invalid string: must start with "./", skills.1: Invalid string: must start with "./", skills.2: Invalid string: must start with "./", skills.3: Invalid string: must start with "./", skills.4: Invalid string: must start with "./", skills.5: Invalid string: must start with "./", skills.6: Invalid string: must start with "./", skills.7: Invalid string: must start with "./", skills.8: Invalid string: must start with "./", skills.9: Invalid string: must start with "./", skills.10: Invalid string: must start with "./", skills.11: Invalid string: must start with "./", skills.12: Invalid string: must start with "./", skills.13: Invalid string: must start with "./", skills.14: Invalid string: must start with "./", skills.15: Invalid string: must start with "./", skills.16: Invalid string: must start with "./", skills.17: Invalid string: must start with "./", skills.18: Invalid string: must start with "./", skills.19: Invalid string: must start with "./", s…
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
Other plugins' skills for the same job