| name | deploy |
| description | Deploy the application to target platform. |
/deploy
Deploy the application to target platform.
Usage
/deploy [environment] [--platform <platform>] [--dry-run]
Arguments
environment: staging, production (default: staging)
--platform: Override auto-detected platform
--dry-run: Preview deployment without executing
Instructions
When this skill is invoked:
Agent Behavior
Autonomy:
- Detect deployment platform from project configuration
- Run pre-deploy checks automatically
- Execute deployment end-to-end
Safety:
- Always deploy to staging first
- Require explicit confirmation for production
- Run all quality checks before deploying
- Never deploy from a dirty worktree
Deploy Process
Phase 1: Pre-Deploy Checks
Required before any deployment:
-
Clean worktree:
git status --porcelain
-
On correct branch:
- Staging:
main or feature branch
- Production:
main only
-
All quality checks pass:
make quality
-
Up to date with remote:
git fetch origin
git diff HEAD origin/main --stat
-
Environment variables configured for target environment
Phase 2: Detect Platform
Auto-detect from project files:
| File | Platform |
|---|
vercel.json or .vercel/ | Vercel |
fly.toml | Fly.io |
Dockerfile + docker-compose.yml | Docker / container registry |
render.yaml | Render |
railway.json | Railway |
Procfile | Heroku |
apprunner.yaml | AWS App Runner |
Fastfile (iOS) | TestFlight via Fastlane |
Fastfile (Android) | Play Console via Fastlane |
app.json (Expo) | EAS Build / Submit |
Phase 3: Deploy
Web — Vercel
vercel --yes
vercel --prod --yes
Web — Docker
docker build -t {registry}/{app}:{version} .
docker push {registry}/{app}:{version}
fly deploy --image {registry}/{app}:{version}
docker compose -f docker-compose.prod.yml up -d
Web — Fly.io
fly deploy --config fly.staging.toml
fly deploy
iOS — TestFlight
bundle exec fastlane beta
Android — Play Console
bundle exec fastlane beta
Mobile — Expo / EAS
eas build --platform all --profile {environment}
eas submit --platform ios --profile {environment}
eas submit --platform android --profile {environment}
Phase 4: Post-Deploy Verification
-
Health check:
curl -f https://{deploy_url}/health || echo "Health check failed"
-
Smoke test key endpoints or screens
-
Monitor logs for errors:
vercel logs --follow
fly logs
docker compose logs -f
-
Tag deployment (if not already tagged):
git tag -a deploy/{environment}/$(date +%Y%m%d-%H%M) -m "Deployed to {environment}"
Rollback
If issues are detected after deployment:
vercel rollback
fly releases
fly deploy --image {previous_image}
docker compose -f docker-compose.prod.yml up -d --force-recreate
Deploy Checklist
Example Output
$ /deploy staging
Pre-deploy checks...
Branch: main
Worktree: clean
Tests: passing (142/142)
Lint: clean
Detected platform: Vercel
Deploying to staging...
Building: 12s
Deploying: 8s
URL: https://my-app-staging-abc123.vercel.app
Post-deploy verification...
Health check: 200 OK (45ms)
API /users: 200 OK
API /health: 200 OK
Staging deployment successful!
Preview: https://my-app-staging-abc123.vercel.app
To deploy to production:
/deploy production