Deploy to local, staging, preview, and mobile testing environments. Reads deployment knowledge from /calibrate. Refuses production — those go through your team’s review process.
/deploy [<local|staging|preview|testflight-internal|google-play-internal>] [<service>] [--dry-run]
Production is refused — always. /deploy production (or any environment marked production) stops hard, explains why, and offers the safe path instead: PR → CI → review → your pipeline deploys on merge. There is no override.
/deploy local)/deploy local starts the full stack and runs migrationsChoosing an environment: use local for your own development, staging to share work with your team, preview for a temporary URL tied to a branch, and testflight-internal/google-play-internal to push a build to mobile internal testers.
/deploy staging
What you’ll see: pre-deploy checks (clean tree, right branch, CI green, platform CLI authenticated), then the platform-appropriate deploy, a health check, and a plain-English summary with the staging URL.
/deploy staging # deploy current branch to staging
/deploy local # start/restart the local stack, run migrations, verify health
/deploy preview # temporary preview URL (Vercel/Netlify/Cloudflare style)
/deploy testflight-internal # iOS build to TestFlight internal testers only
/deploy staging backend --dry-run # show what would happen for one service, deploy nothing
Service names are project-specific (e.g. backend, frontend, api) — use the names from your CLAUDE.md ## Local Dev Services table.
| Flag | Values | Default | What it does |
|---|---|---|---|
| environment | local, staging, preview, testflight-internal, google-play-internal |
menu shown | Target environment; omit it to pick from a menu of your calibrated environments |
| service | a service name | all/default | Narrows the deploy for multi-service projects |
--dry-run |
— | off | Shows what would happen without deploying |
/calibrate populated (environments, platforms, CI pipeline). If the project isn’t calibrated, it stops and tells you to run /calibrate first./pr, or /sre ci instead.local starts services, runs migrations, and verifies health.| Agent | Model tier | Role |
|---|---|---|
| sre | sonnet | Runs the platform-specific deploy sequence and health verification (one per deploy) |
.claude/knowledge/shared/deployment.md after every deploy| Problem | Fix |
|---|---|
Run /calibrate first |
/deploy won’t guess your infrastructure — run /calibrate once (2–3 min), then retry |
I won't deploy to production |
Working as designed — use /deploy staging to test, then /pr for the production path |
You have uncommitted changes |
Commit or stash, then retry — deploys only run from a clean tree |
CI is failing on this commit |
Run /ci-fix, then retry the deploy |
| Platform CLI not authenticated | Follow the printed auth one-liner (e.g. railway login), then retry |
| Deploy succeeded but health check failed | /deploy escalates to /sre debug automatically; three consecutive failures route to /incident |
/deploy readsdeploy-check verifies deployments; ci watches the pipeline