setupkits

Cloudflare Workers Kit

For teams shipping Workers with Terraform and GitHub Actions. It teaches Claude Code your deploy model, and a guard hook physically blocks the mistakes that cost an afternoon, or an outage.

The guard hook blocks

  • wrangler deploy by hand (dry runs allowed)
  • terraform apply, destroy and import outside CI
  • terraform state pull and output -json (state holds live credentials)
  • Secrets passed as arguments, or written into files and [vars]
  • workers_dev and preview_urls turned on
  • Force-pushing main

Four skills

  • cf-deploy: pipelines, name assertions, secrets on deploy, smoke tests, reading failed runs
  • cf-infra: Terraform on an R2 backend, workspaces, Worker plus custom domain, DNS traps
  • cf-secrets: where each credential lives; adding, rotating, auditing
  • cf-debug: outside-in debugging of a live Worker

A working template

  • Terraform: R2 state backend with locking, prod workspace guard, Worker placeholder, apex and www domains
  • ci.yml: tests, bundle dry-run, and a plan that fails on any destroy
  • deploy.yml: apply, assert names, deploy, secrets over stdin, then a live smoke test

Proof it works

This website is built and deployed with exactly this template. Every production deploy must pass thirteen live checks before it counts.

Launching soon

Try the guard free

The guard hook is open source (MIT). Two files and a settings entry, with tests. The kit adds the skills, the template and the CLAUDE.md.

claude-code-cloudflare-guard on GitHub