Skip to main content
commandsSource-backedReview first Safety Privacy

/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.

by jony376·added 2026-06-04·
Claude Code
HarnessClaude Code
Invocation:/deploy-readiness [environment]
Review first review before installing

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
Source repository stats
Scope
Source repo
Runtime and command metadata
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:

  1. 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.
  2. 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 --env argument, not by interpolating a shell string.
  3. Confirm auth. Run wrangler whoami. If it fails, stop and report that the user must run wrangler login (or set CLOUDFLARE_API_TOKEN).
  4. Validate config. Read wrangler.toml / wrangler.jsonc / wrangler.json and confirm name, main, and compatibility_date are present. Flag a missing compatibility_date as a reproducibility risk.
  5. 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 --env and 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.
  6. Check secrets. List configured secrets with wrangler secret list (and the validated --env arguments when given), grep the source for env.<NAME> references, and report any referenced secret that is not configured.
  7. Check bindings. Confirm every KV namespace, R2 bucket, D1 database, queue, and service binding referenced in code is declared in the config.
  8. 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 wrangler or npx wrangler).
  • An authenticated Wrangler session (wrangler login) or CLOUDFLARE_API_TOKEN set.
  • 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

#cloudflare#workers#wrangler#deployment#devops

Source citations

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.