/hotfix-deploy
Deploy critical hotfixes with emergency procedures, validation, and rollback capabilities
$ npx -y skills add davila7/claude-code-templates --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/hotfix-deploy
Context preview
What this command does when you run it.
Deploy critical hotfixes with emergency procedures, validation, and rollback capabilities
Command definition
hotfix-deploy.mdallowed-tools: Read, Edit, Bash
argument-hint: [hotfix-type] | --security | --critical | --rollback-ready | --emergency
description: Deploy critical hotfixes with emergency procedures, validation, and rollback capabilities
Emergency Hotfix Deployment
Deploy critical hotfix: $ARGUMENTS
Current Production State
- Current version: !`git describe --tags --abbrev=0 2>/dev/null || echo "No tags found"`
- Production branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -5`
- Deployment status: !`curl -s https://api.example.com/health 2>/dev/null | jq -r '.version // "Unknown"' || echo "Health check failed"`
- Staging environment: Check for staging deployment capabilities
Emergency Response Protocol
Execute emergency hotfix deployment: $ARGUMENTS
1. **Emergency Assessment and Triage**
- Assess the severity and impact of the issue
- Determine if a hotfix is necessary or if it can wait
- Identify affected systems and user impact
- Estimate time sensitivity and business impact
- Document the incident and decision rationale
2. **Incident Response Setup**
- Create incident tracking in your incident management system
- Set up war room or communication channel
- Notify stakeholders and on-call team members
- Establish clear communication protocols
- Document initial incident details and timeline
3. **Branch and Environment Setup**
# Create hotfix branch from production tag
git fetch --tags
git checkout tags/v1.2.3 # Latest production version
git checkout -b hotfix/critical-auth-fix
# Alternative: Branch from main if using trunk-based development
git checkout main
git pull origin main
git checkout -b hotfix/critical-auth-fix
4. **Rapid Development Process**
- Keep changes minimal and focused on the critical issue only
- Avoid refactoring, optimization, or unrelated improvements
- Use well-tested patterns and established approaches
- Add minimal logging for troubleshooting purposes
- Follow existing code conventions and patterns
5. **Accelerated Testing**
# Run focused tests related to the fix
npm test -- --testPathPattern=auth
npm run test:security
# Manual testing checklist
# [ ] Core functionality works correctly
# [ ] Hotfix resolves the critical issue
# [ ] No new issues introduced
# [ ] Critical user flows remain functional
6. **Fast-Track Code Review**
- Get expedited review from senior team member
- Focus review on security and correctness
- Use pair programming if available and time permits
- Document review decisions and rationale quickly
- Ensure proper approval process even under time pressure
7. **Version and Tagging**
# Update version for hotfix
# 1.2.3 -> 1.2.4 (patch version)
# or 1.2.3 -> 1.2.3-hotfix.1 (hotfix identifier)
# Commit with detailed message
git add .
git commit -m "hotfix: fix critical authentication vulnerability
- Fix password validation logic
- Resolve security issue allowing bypass
- Minimal change to reduce deployment risk
Fixes: #1234"
# Tag the hotfix version
git tag -a v1.2.4 -m "Hotfix v1.2.4: Critical auth security fix"
git push origin hotfix/critical-auth-fix
git push origin v1.2.4
8. **Staging Deployment and Validation**
# Deploy to staging environment for final validation
./deploy-staging.sh v1.2.4
# Critical path testing
curl -X POST staging.example.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"testpass"}'
# Run smoke tests
npm run test:smoke:staging9. **Production Deployment Strategy**
**Blue-Green Deployment:**
# Deploy to blue environment
./deploy-blue.sh v1.2.4
# Validate blue environment health
./health-check-blue.sh
# Switch traffic to blue environment
./switch-to-blue.sh
# Monitor deployment metrics
./monitor-deployment.sh
**Rolling Deployment:**
# Deploy to subset of servers first
./deploy-rolling.sh v1.2.4 --batch-size 1
# Monitor each batch deployment
./monitor-batch.sh
# Continue with next batch if healthy
./deploy-next-batch.sh
10. **Pre-Deployment Checklist**
# Verify all prerequisites are met
# [ ] Database backup completed successfully
# [ ] Rollback plan documented and ready
# [ ] Monitoring alerts configured and active
# [ ] Team members standing by for support
# [ ] Communication channels established
# Execute production deployment
./deploy-production.sh v1.2.4
# Run immediate post-deployment validation
./validate-hotfix.sh11. **Real-Time Monitoring**
# Monitor key application metrics
watch -n 10 'curl -s https://api.example.com/health | jq .'
# Monitor error rates and logs
tail -f /var/log/app/error.log | grep -i "auth"
# Track critical metrics:
# - Response times and latency
# - Error rates and exception counts
# - User authentication success rates
# - System resource usage (CPU, memory)12. **Post-Deployment Validation**
# Run comprehensive validation tests
./test-critical-paths.sh
# Test user authentication functionality
curl -X POST https://api.example.com/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"testpass"}'
# Validate security fix effectiveness
./security-validation.sh
# Check overall system performance
./performance-check.sh13. **Communication and Status Updates**
- Provide regular status updates to stakeholders
- Use consistent communication channels
- Document deployment progress and results
- Update incident tracking systems
- Notify rel
Read more
allowed-tools: Read, Edit, Bash argument-hint: [hotfix-type] | --security | --critical | --rollback-ready | --emergency description: Deploy critical hotfixes with emergency procedures, validation, and rollback capabilities
Emergency Hotfix Deployment
Deploy critical hotfix: $ARGUMENTS
Current Production State
- Current version: !`git describe --tags --abbrev=0 2>/dev/null || echo "No tags found"`
- Production branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -5`
- Deployment status: !`curl -s https://api.example.com/health 2>/dev/null | jq -r '.version // "Unknown"' || echo "Health check failed"`
- Staging environment: Check for staging deployment capabilities
Emergency Response Protocol
Execute emergency hotfix deployment: $ARGUMENTS
1. **Emergency Assessment and Triage**
- Assess the severity and impact of the issue
- Determine if a hotfix is necessary or if it can wait
- Identify affected systems and user impact
- Estimate time sensitivity and business impact
- Document the incident and decision rationale
2. **Incident Response Setup**
- Create incident tracking in your incident management system
- Set up war room or communication channel
- Notify stakeholders and on-call team members
- Establish clear communication protocols
- Document initial incident details and timeline
3. **Branch and Environment Setup**
# Create hotfix branch from production tag git fetch --tags git checkout tags/v1.2.3 # Latest production version git checkout -b hotfix/critical-auth-fix # Alternative: Branch from main if using trunk-based development git checkout main git pull origin main git checkout -b hotfix/critical-auth-fix
4. **Rapid Development Process**
- Keep changes minimal and focused on the critical issue only
- Avoid refactoring, optimization, or unrelated improvements
- Use well-tested patterns and established approaches
- Add minimal logging for troubleshooting purposes
- Follow existing code conventions and patterns
5. **Accelerated Testing**
# Run focused tests related to the fix npm test -- --testPathPattern=auth npm run test:security # Manual testing checklist # [ ] Core functionality works correctly # [ ] Hotfix resolves the critical issue # [ ] No new issues introduced # [ ] Critical user flows remain functional
6. **Fast-Track Code Review**
- Get expedited review from senior team member
- Focus review on security and correctness
- Use pair programming if available and time permits
- Document review decisions and rationale quickly
- Ensure proper approval process even under time pressure
7. **Version and Tagging**
# Update version for hotfix # 1.2.3 -> 1.2.4 (patch version) # or 1.2.3 -> 1.2.3-hotfix.1 (hotfix identifier) # Commit with detailed message git add . git commit -m "hotfix: fix critical authentication vulnerability - Fix password validation logic - Resolve security issue allowing bypass - Minimal change to reduce deployment risk Fixes: #1234" # Tag the hotfix version git tag -a v1.2.4 -m "Hotfix v1.2.4: Critical auth security fix" git push origin hotfix/critical-auth-fix git push origin v1.2.4
8. **Staging Deployment and Validation**
# Deploy to staging environment for final validation
./deploy-staging.sh v1.2.4
# Critical path testing
curl -X POST staging.example.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"testpass"}'
# Run smoke tests
npm run test:smoke:staging9. **Production Deployment Strategy**
**Blue-Green Deployment:**
# Deploy to blue environment ./deploy-blue.sh v1.2.4 # Validate blue environment health ./health-check-blue.sh # Switch traffic to blue environment ./switch-to-blue.sh # Monitor deployment metrics ./monitor-deployment.sh
**Rolling Deployment:**
# Deploy to subset of servers first ./deploy-rolling.sh v1.2.4 --batch-size 1 # Monitor each batch deployment ./monitor-batch.sh # Continue with next batch if healthy ./deploy-next-batch.sh
10. **Pre-Deployment Checklist**
# Verify all prerequisites are met
# [ ] Database backup completed successfully
# [ ] Rollback plan documented and ready
# [ ] Monitoring alerts configured and active
# [ ] Team members standing by for support
# [ ] Communication channels established
# Execute production deployment
./deploy-production.sh v1.2.4
# Run immediate post-deployment validation
./validate-hotfix.sh11. **Real-Time Monitoring**
# Monitor key application metrics
watch -n 10 'curl -s https://api.example.com/health | jq .'
# Monitor error rates and logs
tail -f /var/log/app/error.log | grep -i "auth"
# Track critical metrics:
# - Response times and latency
# - Error rates and exception counts
# - User authentication success rates
# - System resource usage (CPU, memory)12. **Post-Deployment Validation**
# Run comprehensive validation tests
./test-critical-paths.sh
# Test user authentication functionality
curl -X POST https://api.example.com/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"test@example.com","password":"testpass"}'
# Validate security fix effectiveness
./security-validation.sh
# Check overall system performance
./performance-check.sh13. **Communication and Status Updates**
- Provide regular status updates to stakeholders
- Use consistent communication channels
- Document deployment progress and results
- Update incident tracking systems
- Notify rel
Ready-to-use configurations for Anthropic's Claude Code. A comprehensive collection of AI agents, custom commands, settings, hooks, external integrations (MCPs), and project templates to enhance your development workflow.
Repo: davila7/claude-code-templates
Other commands on claude-code-templates.
- /cleanup-cache
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Open command - /create-blog-article
Create an SEO-optimized blog article for a Claude Code component with AI-generated cover image
Open command - /lint
Run Python code linting and formatting tools.
Open command - /test
Run Python tests with pytest, unittest, or other testing frameworks.
Open command - /worktree-check
Check current worktree status, branch, and assigned task
Open command - /worktree-cleanup
Clean up merged worktrees and their branches
Open command

