Deploys WitchCityRope to production environment on DigitalOcean. Automates build, registry push, server deployment, database migrations (if needed), health verification, and rollback capability. SINGLE SOURCE OF TRUTH for production deployment automation.
Automates production deployment of WitchCityRope to DigitalOcean. Executes complete pipeline: build, registry push, server deployment, health checks, and smoke tests with rollback capability.
/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: Deploy to production environment safely and correctly - this is the automation wrapper.
When to Use:
Background Documentation: See /docs/functional-areas/deployment/production-deployment-guide.md for context and manual procedures.
This skill is the ONLY automated deployment procedure.
Division of responsibility:
/docs/functional-areas/deployment/production-deployment-guide.md): Context, manual procedures, troubleshootingDO NOT duplicate deployment automation in:
Executable Script: execute.sh
# From project root - with confirmation prompt
bash .claude/skills/production-deploy/execute.sh
# Skip confirmation prompt (for automation)
SKIP_CONFIRMATION=true bash .claude/skills/production-deploy/execute.sh
What the script does:
Script includes comprehensive safety checks - it will not run blindly and verifies prerequisites before deployment.
Separate skill: production-rollback.md
Quick rollback:
ssh -i /home/chad/.ssh/id_ed25519_witchcityrope witchcity@104.131.165.14
cd /opt/witchcityrope/production
# Pull and restart previous :latest images
docker-compose -f docker-compose.production.yml pull
docker-compose -f docker-compose.production.yml up -d
# Or specify previous SHA
# docker-compose -f docker-compose.production.yml pull witchcityrope-api:<previous-sha>
# docker-compose -f docker-compose.production.yml up -d
IMPORTANT: Server hosts multiple applications.
NEVER DO:
# ❌ WRONG - Stops ALL containers on server
docker stop $(docker ps -q)
docker-compose down
ALWAYS DO:
# ✅ RIGHT - Only affects WitchCityRope containers
docker-compose -f docker-compose.production.yml down
docker-compose -f docker-compose.production.yml up -d
Image Tagging: The skill automatically tags images as :latest for production deployment.
Why: docker-compose.production.yml uses image: ${REGISTRY}/witchcityrope-api:${IMAGE_TAG:-latest} which defaults to latest.
Note: Use the production-deploy skill for all builds - it handles correct tagging automatically.
Cause: Missing dependencies, compilation errors
Solution:
docker build -f apps/api/Dockerfile .Cause: Docker not logged into DigitalOcean registry
Solution:
# Login to DO registry (one-time)
doctl registry login
Cause: Services need more time, or deployment has errors
Solution:
Cause: Specific endpoints broken
Solution:
After Phase 5 validation:
I'll deploy to production for testing.
Skill is invoked automatically
Result: Code deployed to production safely
After successful test run:
All tests passed. Production deployment can proceed.
Deployment guide should reference this skill:
# Production Deployment Process
After Phase 5 validation passes:
1. Use `production-deploy` skill (automated)
2. Skill handles:
- Build verification
- Image push
- Server deployment
- Health checks
- Smoke tests
3. Manual testing of critical flows
4. If issues: Use `production-rollback` skill
**Automation**: `/.claude/skills/production-deploy.md`
**Manual procedures**: This guide (for troubleshooting)
{
"productionDeploy": {
"status": "success",
"timestamp": "2025-11-04T15:30:00Z",
"gitSha": "abc123f",
"build": {
"api": "success",
"web": "success"
},
"registry": {
"api": "pushed",
"web": "pushed",
"tags": ["latest", "abc123f"]
},
"deployment": {
"server": "104.131.165.14",
"containersRestarted": true,
"startTime": "2025-11-04T15:28:00Z",
"endTime": "2025-11-04T15:30:00Z",
"duration": "2m"
},
"healthChecks": {
"web": "healthy",
"api": "healthy",
"database": "healthy"
},
"smokeTests": {
"homepage": "pass",
"eventsApi": "pass",
"passed": 2,
"failed": 0
},
"url": "https://production.notfai.com, https://prod.witchcityrope.com",
"rollbackAvailable": true,
"previousSha": "def456g"
}
}
On failure:
{
"productionDeploy": {
"status": "failure",
"phase": "health_checks",
"error": "API health check failed",
"action": "Review logs and consider rollback",
"rollbackCommand": "bash .claude/skills/production-rollback.md"
}
}
This skill is the automation wrapper.
Division of labor:
To update deployment procedure:
To verify no duplication:
single-source-validator skill to check for duplicated commandsRemember: This skill automates deployment. The deployment guide provides context and manual procedures for troubleshooting.
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.