Restarts WitchCityRope Docker TEST containers using the CORRECT procedure. Handles shutdown, rebuild with test compose overlay (--no-cache by default), health checks, and verification. Ensures environment is ready for testing. SINGLE SOURCE OF TRUTH for test container restart process. Uses -p witchcityrope-test for isolation from dev containers.
Restarts WitchCityRope Docker TEST containers using the correct procedure with project isolation (`-p witchcityrope-test`). Handles shutdown, rebuild with test overlay, health checks, and verification. Use before E2E tests, when containers are unhealthy, or after code changes needing fresh test builds.
/plugin marketplace add DarkMonkDev/WitchCityRope/plugin install darkmonkdev-witchcityrope-agents@DarkMonkDev/WitchCityRopeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Purpose: Restart Docker TEST containers the RIGHT way - this is the ONLY correct procedure.
CRITICAL: This skill is for TEST containers only. For DEVELOPMENT containers, use restart-dev-containers skill.
When to Use:
When NOT to Use:
restart-dev-containers instead--skip-rebuild flagCRITICAL: Dev and test containers are isolated using different project names:
-p witchcityrope-dev-p witchcityrope-testThis prevents operations on one environment from affecting the other.
This skill is the ONLY place where test container restart procedure is documented.
If you find container restart instructions elsewhere:
DO NOT duplicate this procedure in:
# WRONG - Missing test overlay
docker-compose up -d
# WRONG - Missing project name (will interfere with dev containers)
docker-compose -f docker-compose.yml -f docker-compose.test.yml up -d
# WRONG - Not using --no-cache for clean test builds
docker-compose -p witchcityrope-test -f docker-compose.yml -f docker-compose.test.yml up -d --build
Use this skill - it handles everything correctly including project isolation and --no-cache.
Executable Script: execute.sh
# From project root - clean rebuild with --no-cache (default, ensures fresh test files)
bash .claude/skills/restart-test-containers/execute.sh
# Skip confirmation prompt (for automation)
SKIP_CONFIRMATION=true bash .claude/skills/restart-test-containers/execute.sh
# Skip rebuild - just restart existing containers (fastest, when code hasn't changed)
bash .claude/skills/restart-test-containers/execute.sh --skip-rebuild
# Use Docker cache for faster rebuilds (when only non-test code changed)
bash .claude/skills/restart-test-containers/execute.sh --use-cache
# Combine flags for automation without rebuild
SKIP_CONFIRMATION=true bash .claude/skills/restart-test-containers/execute.sh --skip-rebuild
What the script does:
-p witchcityrope-test)docker-compose.yml + docker-compose.test.yml)
--no-cache for clean test images--use-cache: Uses Docker cache for faster builds--skip-rebuild: Skips build entirely, just starts containersScript includes safety checks - it will not run blindly without showing you what it's about to do.
# From project root - clean rebuild with --no-cache (default)
bash .claude/skills/restart-test-containers/execute.sh
# For quick restart without rebuild (code hasn't changed)
bash .claude/skills/restart-test-containers/execute.sh --skip-rebuild
# For faster rebuild using Docker cache (when only non-test files changed)
bash .claude/skills/restart-test-containers/execute.sh --use-cache
# For automation - skip confirmation
SKIP_CONFIRMATION=true bash .claude/skills/restart-test-containers/execute.sh
# CRITICAL: Always use -p witchcityrope-test to avoid affecting dev containers!
# Stop containers
docker-compose -p witchcityrope-test -f docker-compose.yml -f docker-compose.test.yml down -v
# Start with test overlay and --no-cache
docker-compose -p witchcityrope-test -f docker-compose.yml -f docker-compose.test.yml up -d --build --no-cache
# Wait and check health
sleep 20
docker exec witchcity-api-test curl -f http://localhost:8080/health
docker exec witchcity-web-test curl -f http://localhost:5173
Cause: Compilation errors in container or health not ready
Solution: Skill automatically checks container health. If issues persist, check container logs for errors in witchcity-web-test and witchcity-api-test.
Cause: Old networks from previous runs or different subnets conflicting
Solution:
# Remove old test networks
docker network ls | grep witchcity | awk '{print $1}' | xargs docker network rm 2>/dev/null
# Try again
bash .claude/skills/restart-test-containers/execute.sh
Cause: Dev containers or other process using same ports
Note: Test containers do NOT expose ports externally (internal communication only). This error usually means dev containers are on conflicting networks.
Solution: Check if dev containers are running (they should be fine to run alongside). If network conflicts occur, prune unused Docker networks.
Cause: Missing -p witchcityrope-test flag
Solution: Always use this skill or ensure the project flag is included
The test-environment skill calls restart-test-containers with --skip-rebuild when containers are already healthy, or without the flag when a fresh build is needed.
# test-environment internally calls:
bash .claude/skills/restart-test-containers/execute.sh --skip-rebuild
For development work, use the dev container skill which uses -p witchcityrope-dev project isolation.
When run via Claude Code, skill returns:
{
"skill": "restart-test-containers",
"status": "success",
"timestamp": "2025-12-01T15:30:00Z",
"containers": {
"running": 5,
"expected": 5,
"healthy": true
},
"build": {
"mode": "full",
"no_cache": true
},
"healthChecks": {
"web": "healthy",
"api": "healthy",
"database": "healthy",
"test_runner": "healthy"
},
"readyForTesting": true,
"message": "Test environment ready"
}
On failure:
{
"skill": "restart-test-containers",
"status": "failure",
"error": "Container health check failed",
"details": "API service did not respond within timeout",
"action": "Check API container logs for errors"
}
-p witchcityrope-dev)This skill is the single source of truth for TEST container restart.
To update the restart procedure:
-p witchcityrope-test project isolation--no-cache for clean test images--skip-rebuild flag for faster restartsRemember: This skill is executable automation. Run it, don't copy it.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.