$npx -y skills add softspark/ai-toolkit --skill deployDeploys with pre-flight checks and health verification. Triggers: deploy, deployment, ship, release, push to prod.
| 1 | # Deploy Application |
| 2 | |
| 3 | $ARGUMENTS |
| 4 | |
| 5 | Deploy application to target environment. |
| 6 | |
| 7 | ## Project context |
| 8 | |
| 9 | - Docker config: !`cat docker-compose.yml 2>/dev/null || cat Dockerfile 2>/dev/null || echo "no-docker"` |
| 10 | |
| 11 | ## Usage |
| 12 | |
| 13 | ``` |
| 14 | /deploy [environment] |
| 15 | ``` |
| 16 | |
| 17 | ## What This Command Does |
| 18 | |
| 19 | 1. **Validates** deployment prerequisites |
| 20 | 2. **Runs** pre-deployment checks |
| 21 | 3. **Executes** deployment |
| 22 | 4. **Verifies** deployment success |
| 23 | |
| 24 | ## Environments |
| 25 | |
| 26 | | Environment | Description | |
| 27 | |-------------|-------------| |
| 28 | | `dev` | Development environment | |
| 29 | | `staging` | Staging/QA environment | |
| 30 | | `prod` | Production environment | |
| 31 | |
| 32 | ## Pre-Deployment Checklist |
| 33 | |
| 34 | Run automated pre-deployment checks: |
| 35 | ```bash |
| 36 | python3 scripts/pre_deploy_check.py [environment] |
| 37 | ``` |
| 38 | |
| 39 | Returns JSON with pass/fail for each check: |
| 40 | - `git_clean` - no uncommitted changes |
| 41 | - `branch` - on main/master for production |
| 42 | - `docker` - services running (if applicable) |
| 43 | - `env_file` - .env or .env.$ENV exists |
| 44 | - `build_artifacts` - dist/build present |
| 45 | - `tests_ran` - test result artifacts found |
| 46 | |
| 47 | Manual verification: |
| 48 | - [ ] Tests passing |
| 49 | - [ ] Build successful |
| 50 | - [ ] Environment variables set |
| 51 | - [ ] Secrets configured |
| 52 | - [ ] Database migrations ready |
| 53 | - [ ] Rollback plan documented |
| 54 | |
| 55 | ## Deployment Strategies |
| 56 | |
| 57 | | Strategy | Use Case | |
| 58 | |----------|----------| |
| 59 | | Rolling | Zero-downtime, gradual | |
| 60 | | Blue-Green | Instant switch, easy rollback | |
| 61 | | Canary | Risk mitigation, gradual traffic | |
| 62 | | Recreate | Simple, allows downtime | |
| 63 | |
| 64 | ## Output Format |
| 65 | |
| 66 | ```markdown |
| 67 | ## Deployment Report |
| 68 | |
| 69 | ### Status: Success / Failed |
| 70 | |
| 71 | ### Details |
| 72 | - **Environment**: [env] |
| 73 | - **Version**: [version] |
| 74 | - **Started**: [timestamp] |
| 75 | - **Completed**: [timestamp] |
| 76 | |
| 77 | ### Steps |
| 78 | 1. [Step 1] - Done |
| 79 | 2. [Step 2] - Done |
| 80 | 3. [Step 3] - Failed (if failed) |
| 81 | |
| 82 | ### Health Check |
| 83 | - [endpoint]: [status] |
| 84 | |
| 85 | ### Rollback |
| 86 | If needed: `[rollback command]` |
| 87 | ``` |
| 88 | |
| 89 | ## PRODUCTION SAFETY |
| 90 | |
| 91 | - Always deploy to staging first |
| 92 | - Verify health checks pass |
| 93 | - Have rollback plan ready |
| 94 | - Monitor after deployment |
| 95 | |
| 96 | ## MANDATORY: Documentation Update |
| 97 | |
| 98 | After deployment, update documentation: |
| 99 | |
| 100 | ### Required Updates |
| 101 | | Change Type | Update | |
| 102 | |-------------|--------| |
| 103 | | New release | CHANGELOG, release notes | |
| 104 | | Config changes | Deployment docs, procedures | |
| 105 | | New features | User documentation | |
| 106 | | Infrastructure | `kb/procedures/deployment-*.md` | |
| 107 | |
| 108 | ### Post-Deployment Checklist |
| 109 | - [ ] Deployment successful |
| 110 | - [ ] Health checks passing |
| 111 | - [ ] **CHANGELOG updated** |
| 112 | - [ ] **Deployment docs updated** |
| 113 | - [ ] Release notes created (if applicable) |