/deploy-readiness - Cloudflare Deploy Readiness Command for Claude Code
Slash command that runs a pre-deploy readiness check for a Cloudflare Workers project before you ship. It confirms Wrangler auth, validates the worker config, dry-runs the build to catch bundling errors without deploying, cross-checks that secrets and bindings referenced in code actually exist, and returns a clear go or no-go summary.
Open the source and read safety notes before installing.
Safety notes
- Runs Wrangler auth, secret-list, and deploy dry-run checks, but Wrangler deploy --dry-run still executes the project's local build/bundling pipeline and any configured build command or plugins.
- Run this command only in a trusted Workers repository after reviewing wrangler config, package scripts, and bundler plugins; do not use it to evaluate untrusted submissions.
- Never run a real deploy or publish, and validate any environment argument before passing it to Wrangler.
Privacy notes
- Wrangler output entering the model context can include your account id, worker name, environment name, and secret names (never secret values).
- The dry-run build reads source files and may execute project-controlled local code with inherited environment variables, including Cloudflare-related tokens; review the project before running on sensitive accounts.
- The command writes Wrangler dry-run output to disk and project build tooling may write additional local files.
Schema details
- Install type
- cli
- Troubleshooting
- No
- Scope
- Source repo
- Command syntax
- /deploy-readiness [environment]
Full copyable content
/deploy-readiness [environment]About this resource
The /deploy-readiness command runs a pre-flight check for a Cloudflare Workers project using the Wrangler CLI, so build failures, missing secrets, and config gaps surface before a real deploy — not after.
Usage
/deploy-readiness [environment]
- With an
environment(a Wrangler named environment): check that environment's config. - Without an argument: check the top-level config.
What it does
When you invoke this command, follow these steps and never run a real deploy:
- Confirm trust first. Before running Wrangler, confirm the repository is trusted and review
wrangler.toml/wrangler.jsonc/wrangler.json, package scripts, and bundler/plugin config for build hooks. If the project is untrusted or the user only wants a static review, skip the dry-run and report that it can execute local project code. - Validate the environment argument. If an environment is provided, accept only a Wrangler environment name matching
^[A-Za-z0-9_-]+$; otherwise stop and ask for a safe environment name. Pass it as a separate--envargument, not by interpolating a shell string. - Confirm auth. Run
wrangler whoami. If it fails, stop and report that the user must runwrangler login(or setCLOUDFLARE_API_TOKEN). - Validate config. Read
wrangler.toml/wrangler.jsonc/wrangler.jsonand confirmname,main, andcompatibility_dateare present. Flag a missingcompatibility_dateas a reproducibility risk. - Dry-run the build only after the trust review passes. Run
wrangler deploy --dry-run --outdir /tmp/wrangler-dry(add the validated environment as separate--envand value arguments when given). This compiles and bundles the worker locally and surfaces TypeScript/bundler errors without uploading anything, but it can execute project-controlled build commands and plugins with your local privileges and inherited environment variables. - Check secrets. List configured secrets with
wrangler secret list(and the validated--envarguments when given), grep the source forenv.<NAME>references, and report any referenced secret that is not configured. - Check bindings. Confirm every KV namespace, R2 bucket, D1 database, queue, and service binding referenced in code is declared in the config.
- Report go / no-go. Summarize each check as pass or fail and give a single readiness verdict with the exact command to fix any failure.
Output format
- Auth: account + whether authenticated.
- Config: name / main / compatibility_date status.
- Build: dry-run result (and the first error if it failed).
- Secrets: referenced vs configured, with any gaps.
- Bindings: declared vs referenced.
- Verdict: ready to deploy, or blocked with the fixes.
Requirements
- Wrangler CLI installed (
npm i -g wranglerornpx wrangler). - An authenticated Wrangler session (
wrangler login) orCLOUDFLARE_API_TOKENset. - Run from the worker project root so the config and source are discoverable.
Safety notes
The command never runs a real deploy, edits secrets, or changes bindings. However, wrangler deploy --dry-run is not safe for untrusted projects: it still runs the local Workers build and bundling pipeline, including configured build commands, package scripts, and plugins. Run it only in trusted repositories after reviewing local build hooks, and validate the optional environment name before passing it to Wrangler.
Privacy notes
Wrangler output included in the model context can contain your account id, worker name, environment name, and secret names (never values). The dry-run build reads source files and may execute project-controlled local code with inherited environment variables, including Cloudflare-related tokens. Wrangler writes dry-run output to disk, and project build tooling may create or modify additional local files.
Source and references
- Wrangler commands reference: https://developers.cloudflare.com/workers/wrangler/commands/
- Cloudflare Workers configuration: https://developers.cloudflare.com/workers/wrangler/configuration/
- workers-sdk (Wrangler) repository: https://github.com/cloudflare/workers-sdk
Source citations
Signals
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.