From cloudflare-workers
Deploys Cloudflare Workers with environment selection, pre-deploy validation (tests, types, build), and safety checks. Supports --env flag for direct environment targeting.
How this command is triggered — by the user, by Claude, or both
Slash command
/cloudflare-workers:workers-deploy --env <environment> (optional: prod, staging, dev)This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Workers Deploy Command Safe, guided deployment workflow for Cloudflare Workers with environment management and pre-deploy validation. ## Execution Workflow ### Phase 1: Environment Detection Read and analyze the project configuration: 1. **Check for wrangler config**: - Look for `wrangler.jsonc` or `wrangler.toml` - If neither exists, abort: "No wrangler configuration found. Run `bunx wrangler init` first." 2. **Parse environments**: - Extract environment configurations from wrangler config - Identify: name, routes, vars, bindings for each environment - Common environ...
Safe, guided deployment workflow for Cloudflare Workers with environment management and pre-deploy validation.
Read and analyze the project configuration:
Check for wrangler config:
wrangler.jsonc or wrangler.tomlbunx wrangler init first."Parse environments:
Check current git status:
git status --porcelain
Check if wrangler is installed:
bunx wrangler --version
If --env argument provided:
If no --env argument: Use AskUserQuestion to select environment:
Question: "Which environment do you want to deploy to?"
production - Live environment (requires extra confirmation)staging - Pre-production testingdev - Development environmentAsk user about pre-deploy checks:
Question: "Run pre-deploy validations?"
Based on selection, run:
Tests (if package.json has test script):
npm run test || bun test
Type checking (if TypeScript project):
bunx tsc --noEmit
Build (if build script exists):
npm run build || bun run build
Error Handling: Abort on first failure. Provide clear error messages.
For production environment: Show detailed confirmation with risk warning:
⚠️ PRODUCTION DEPLOYMENT
Target: production
Worker: [worker-name]
Routes: [route1, route2]
Bindings: [D1, KV, R2, etc.]
Changes will be LIVE immediately after deployment.
Pre-deploy checks:
✅ Tests passed
✅ Types valid
✅ Build successful
Continue with production deployment?
Ask for explicit confirmation: "Type 'yes' to confirm production deployment"
For non-production: Simpler confirmation:
Deploying to: [environment]
Worker: [worker-name]
Continue?
Execute wrangler deploy command:
bunx wrangler deploy --env [environment]
Capture output:
Monitor deployment:
After successful deployment:
Extract deployment URL from wrangler output
Verify worker is responding:
curl -I [deployment-url]
bunx wrangler tail --env [environment] --once
Generate deployment summary:
✅ Deployment Successful!
**Environment**: [environment]
**Worker**: [worker-name]
**URL**: [deployment-url]
**Version**: [git-commit-hash or timestamp]
**Deployment Details**:
- Routes: [routes]
- Bindings: [bindings]
- Environment Vars: [count] configured
**Verification**:
✅ Worker responding (HTTP 200)
✅ No immediate errors in logs
**Next Steps**:
1. Monitor logs: `wrangler tail --env [environment]`
2. Test functionality: [deployment-url]
3. Check metrics: Cloudflare Dashboard
**Rollback**:
If issues arise, rollback with:
`wrangler rollback --env [environment]`
**Resources**:
- Cloudflare Dashboard: https://dash.cloudflare.com/
- Deployment Docs: https://developers.cloudflare.com/workers/configuration/versions-and-deployments/
Before allowing production deploy, verify:
If deployment fails:
wrangler loginIf deployment uses secrets:
Warn if secrets not set:
⚠️ This worker uses environment secrets.
Ensure secrets are configured:
`wrangler secret put SECRET_NAME --env [environment]`
Known secrets from code:
- API_KEY
- DATABASE_URL
- AUTH_SECRET
Continue anyway?
Abort deployment if:
Provide recovery steps:
Deployment is successful when:
npx claudepluginhub midego1/claude-skills --plugin cloudflare-workers2plugins reuse this command
First indexed Jan 1, 2026
/workers-deployDeploys Cloudflare Workers with environment selection, pre-deploy validation (tests, types, build), and safety checks. Supports --env flag for direct environment targeting.
/cloudflare-deployDeploys Cloudflare Worker project to production, staging, or preview environments with wrangler, including pre-deployment checks, secrets management, and dry-run option.
/workflow-setupInteractive wizard that sets up Cloudflare Workflows from scratch — detects existing project, gathers workflow requirements (name, type, duration), and scaffolds necessary configuration and class files.
/deployDeploys the current project through a multi-gate pipeline: runs tests, validates identity, deploys to staging, verifies, then optionally promotes to production with explicit confirmation.
/cloudflare-worker-builderScaffolds and deploys a Cloudflare Worker with Hono routing, Vite plugin, and optional static assets.
/deployDeploys the current project to Vercel, defaulting to a preview deployment or production when "prod" or "production" is passed. Includes preflight checks for uncommitted changes and observability readiness.