Automated deployment workflow with pre-flight checks, validation, testing, and deployment to Cloudflare Workers
Executes comprehensive Cloudflare Workers deployment with validation, testing, and verification.
/plugin marketplace add SteveLeve/claude-marketplace/plugin install cloudflare-expert@steves-claude-marketplace[--env <environment>] [--dry-run]Automated deployment workflow with comprehensive pre-flight checks and validation before deploying to Cloudflare Workers.
npm test if test script existsnpm run build if build script existswrangler deployRead and validate wrangler configuration:
--env flag providedCheck compatibility_date:
For each binding in configuration:
If bindings don't exist, inform user and offer to create them.
If D1 bindings exist:
wrangler d1 migrations list DB [--env ENV] [--remote]wrangler d1 migrations apply DB [--env ENV] --remoteCheck package.json for test script:
"test" script exists and is not placeholder ("echo "Error...")npm testCheck package.json for build script:
"build" script existsnpm run buildIf user provided --dry-run flag:
wrangler deploy --dry-run [--env ENV]
Show results and exit (don't deploy).
Show user what will be deployed:
Ready to deploy:
- Worker: my-worker
- Environment: production (or default if no --env)
- Entry point: src/index.ts
- Bindings: KV (CACHE), D1 (DB), R2 (UPLOADS)
- Compatibility date: 2024-01-15
Ask for confirmation:
Run wrangler deploy:
wrangler deploy [--env ENV]
Show verbose output so user sees progress.
Check if deployment succeeded:
wrangler deployments list [--env ENV]If deployment successful and living memory exists:
.claude/cloudflare-expert.local.md- [YYYY-MM-DD HH:MM] Deployed to [environment]
- Worker: [name]
- Version: [if tracked]
- Bindings: [list]
Prompt user: "Would you like me to remember this deployment configuration?"
Offer user next steps:
wrangler tail [--env ENV]?"If user wants logs, run:
wrangler tail [--env ENV]
Solution: Run wrangler login or set CLOUDFLARE_API_TOKEN
Solution:
wrangler kv:namespace list (for KV)Solution:
wrangler d1 migrations apply DB --env production --remote
Solution: Update wrangler.jsonc:
{
"compatibility_date": "2024-01-15" // Use recent date
}
Solution:
--dry-run to validate config without deployingSolution:
Deploy to production (default):
/cloudflare:deploy
Deploy to staging:
/cloudflare:deploy --env staging
Dry run (validate without deploying):
/cloudflare:deploy --dry-run
Deploy to specific environment with dry run:
/cloudflare:deploy --env production --dry-run
deployment-strategies skill for CI/CD and deployment patternswrangler-workflows skill for wrangler commandscloudflare-platform skill for binding questionsAuto-activate relevant skills as needed during the workflow.