Skip to content

cf-only

Studio decision 2026-10-07: wrangler is retired. Never run it, never tell a human or a CI job to run it.

  • Every Cloudflare operation uses cf (Workers, D1, R2, KV, DNS, zones, secrets, deploy). Unsure of the command: cf cli search "<anonymous task>", then <match> --help. Skill: t1k-cloudflare.
  • NEVER invoke wrangler: bare, bunx/bunx/bun x/bun install/bun x, bash -c, or install it (bun install -D wrangler). CI and deploy workflows install cf (pinned devDependency), never wrangler.
  • cf lacks the command, or fails? That is a GAP, not a license to fall back. Report it with /t1k:issue on the owning repo, tell the user, stop. The migration table (wrangler to cf) is historical.
  • Real secrets never go on argv (ps shows it): use cf workers secrets bulk --worker <name> --body @<0600 temp JSON file> (wrapped merge-patch body, see t1k-cloudflare), delete the file, confirm with secrets list.
  • Enforced by cf-only-guard.cjs (PreToolUse Bash): parses the command line (quotes, $( ), backticks, groups, then/do, eval, bash -c, a shell fed by heredoc or pipe, wrappers with value flags, package runners, interpreters) and denies an INVOCATION; text that only mentions the word and command -v wrangler pass. The shell shapes are data in cfOnly (t1k-config-core.json).
  • A blind guard is loud. A missing, empty or invalid cfOnly block makes the hook tell the model it is INACTIVE and deny any command naming a retired bin; doctor check #97 FAILs on it. Disable on purpose with features.cfOnly: false, never an empty block.
  • Escape T1K_ALLOW_WRANGLER=1 is for the USER’s explicit instruction only; an agent setting it itself has bypassed the studio decision. It covers its own command segment, and each use is persisted to <.claude>/telemetry/cf-only-audit-YYYYMMDD.jsonl.

The hook reads the command LINE, not what a program does. These reach wrangler unseen and are pinned by id in __tests__/cf-only-guard-matrix.test.cjs (the pin fails when a gap closes; then this list shrinks). Fix the script instead: kit scripts call cf.

  • npm-run-indirection: a package script calling wrangler.
  • make-indirection: a Makefile target calling wrangler.
  • script-file: a script file whose body calls wrangler.
  • node-spawned: a node process spawning wrangler.
  • python-spawned: a python process spawning wrangler.
  • remote-or-container: wrangler over ssh or in a container.
  • unlisted-launcher: a launcher missing from the config wrappers list (add it).
  • computed-command: a command word built at run time.

skills/t1k-cloudflare/SKILL.md and skills/t1k-cloudflare/references/gaps-and-no-fallback.md.