- Home
- Skills
- DevOps & Cloud
- Cloudflare Wrangler Check
More screenshots
Works with the AI Agents you already use
Cloudflare Wrangler Check
Check Cloudflare Workers and Pages config before you deploy: secrets in vars and define, preview IDs that point at production data, staging that shares production KV, D1 and R2, workers.dev left on, and removed settings.
$5
Cloudflare Wrangler Check
Example session with this skill installed
Check this project with cloudflare-wrangler-check.
- Read your context and instructions
- Compiled the cloudflare wrangler check
$ python3 scripts/check_wrangler.py examples/risky
BLOCK api/wrangler.toml:14 W01 SECRET_IN_VARS
STRIPE_SECRET_KEY = "<redacted>"
Why: A password, token or key is written in vars (at the top level, in an [env.NAME] section or in the previews block). vars are plain-text environment variables: the value sits in the repository for everyone who can read it, is uploaded with every deploy and shows in plain text in the Cloudflare dashboard. Cloudflare's docs say not to store sensitive information in vars.
Safer: Delete it from the file and store it with npx wrangler secret put NAME (add --env NAME for an environment). For local development put it in .dev.vars or .env and keep those files out of git. Rotate the value that was committed: it stays in git history.
BLOCK api/wrangler.toml:18 W03 SECRET_ELSEWHERE_IN_CONFIG
BLOCK api/wrangler.toml:23 W02 PREVIEW_IS_PRODUCTION
BLOCK api/wrangler.toml:33 W03 SECRET_ELSEWHERE_IN_CONFIG
REVIEW api/.dev.vars:2 W17 LOCAL_SECRETS_FILE_NOT_IGNORED
REVIEW api/wrangler.toml:4 W11 OLD_COMPATIBILITY_DATE
REVIEW api/wrangler.toml:5 W15 LEGACY_SETTING
REVIEW api/wrangler.toml:6 W12 WORKERS_DEV_WITH_ROUTES
REVIEW api/wrangler.toml:42 W14 ENV_USES_PRODUCTION_DATA
REVIEW site/wrangler.jsonc:5 W16 ASSETS_FOLDER_IS_PROJECT_ROOT
REVIEW site/wrangler.jsonc:6 W11 OLD_COMPATIBILITY_DATE
REVIEW site/wrangler.jsonc:8 W13 NO_SEPARATE_ENVIRONMENT
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 2 files, 2 with Wrangler config content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
STRIPE_SECRET_KEY = "..." under [vars] ships your key in plain text with every deploy and shows it in the dashboard, and a KV preview_id that equals its id means every wrangler dev --remote session writes to your production data. This skill finds those and eight other Wrangler config mistakes before you deploy, and tells you how to fix each one.
Your agent runs a scanner on your project: wrangler.toml, wrangler.json and wrangler.jsonc (also named variants such as wrangler.staging.toml, in every subfolder of a monorepo), for Workers and Pages, plus the .dev.vars and .env files next to them. It parses TOML and JSON with comments and trailing commas with a line number for every key, and follows Wrangler's own rules: [env.NAME] sections, inherited keys such as routes and workers_dev, bindings that are not inherited, the Pages production and preview environments and the previews block. It reads .gitignore to tell whether local secret files are left out of git. It never runs Wrangler, deploys or calls the Cloudflare API. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK
- W01: passwords, tokens, keys and database URLs with passwords in vars (top level, environments and previews)
- W02: a KV preview_id, D1 preview_database_id or R2 preview_bucket_name equal to the production one
- W03: secrets in define, a Hyperdrive localConnectionString for a remote database, URLs with user:password@, and known token formats anywhere in the file
REVIEW
- W11: a compatibility_date more than a year old
- W12: workers_dev = true or preview_urls = true on a Worker that serves your own routes
- W13: a Worker with routes, or a Pages project, that binds KV, D1, R2 or Hyperdrive with no staging or preview environment
- W14: staging, preview and development environments bound to the same KV namespace, D1 database, R2 bucket, Hyperdrive config, queue or service as production
- W15: removed or unused settings: node_compat, legacy_assets, site, usage_model, type, webpack_config, build.upload
- W16: assets.directory, site.bucket or pages_build_output_dir set to the project folder itself
- W17: .dev.vars and .env files with values that no .gitignore rule covers
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason and safer approach for each rule
- A risky and a safe example project (a Worker API and a Pages site), and the real report the scanner produces on the risky one
Limits It reads the config files as written. Secrets and settings made in the Cloudflare dashboard or with wrangler secret put, command-line flags such as --var and --env, config generated by build tools, your Worker's code, and the contents of your KV, D1 and R2 resources are not checked. NOT FLAGGED is not a guarantee.
Static check of Wrangler config text. Dashboard settings, secrets already stored in Cloudflare, command-line overrides, generated config and Worker source code are not checked. W11 compares against the current date of the machine that runs it. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Requires
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example project includes clearly fake, inert keys and passwords (not-a-real-..., EXAMPLE) for the scanner to find. It is never built, run or deployed.