okayus/okayus-skills/cloudflare-workers-builds-keyless-deploy

Claude Code and agent skill by okayus/okayus-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Deploy Cloudflare Workers from GitHub with no Cloudflare credential stored in GitHub (no CLOUDFLARE_API_TOKEN in Actions secrets) using Workers Builds, Cloudflare's git-connected CI/CD. Use when setting up or migrating a Workers project so an autonomous agent pipeline never holds a Cloudflare secret, when asked "can we deploy without a CF API token in CI", or when driving the dashboard connect ceremony by hand or with a browser agent. Covers the dashboard traps — a My Profile token missing from the build-token picker, the picker defaulting to another project's token, Root directory hidden under Advanced settings as "Path", the Create-an-app wizard refusing an existing Worker's name, the first build posting no check-run, preview builds sharing the production D1, Workers Builds not waiting for GitHub CI (gate with a ruleset), and build watch paths for docs-only commits. Also a static-site variant (assets-only Worker, no package.json) and a missing Connect button (GitHub user authorization).

Install

npx vskill@latest install okayus/okayus-skills/cloudflare-workers-builds-keyless-deploy

SKILL.md

The same SKILL.md was published earlier as okayus/okayus-skills/cloudflare-workers-builds-keyless-deploy.

Cloudflare Workers Builds: Keyless Deploy

Replace "GitHub Actions runs wrangler deploy with a CLOUDFLARE_API_TOKEN secret" with Workers Builds: Cloudflare pulls the repo via its GitHub App and builds/deploys on Cloudflare's side. The deploy credential (a build token) lives inside Cloudflare and never exists in GitHub, the repo, or any dev sandbox. GitHub Actions keeps only test/lint — Actions Secrets become empty.

Why not OIDC? As of 2026-08, the Cloudflare API has no OIDC / workload identity federation (wrangler-action supports only apiToken; the OIDC feature request remains an open GitHub Discussion — workers-sdk#11434). Workers Builds is the only mechanism where GitHub holds zero Cloudflare credentials. Verified against live docs 2026-08-08; the dashboard ceremony below was re-run and corrected on kokemusu 2026-08-23 (see Verified on kokemusu).

When to use this skill

  • New or existing Workers project deployed from a GitHub repo, especially with an autonomous agent in the loop (no long-lived secret should be reachable from CI or a sandbox)
  • Migrating off a deploy.yml + CLOUDFLARE_API_TOKEN setup
  • A static site with no package.json, e.g. one leaving GitHub Pages. The ceremony is the same (usually steps B), but the config, commands, watch paths and gate differ: read references/static-site.md
  • NOT for: Pages projects (different product), pipelines that must deploy from non-GitHub/GitLab CI (fall back to a minimal-permission custom token — see cloudflare-api-token-permissions)

Architecture and the one invariant

Workers Builds triggers on push and does NOT wait for GitHub CI results. So the gate moves to merge time:

Invariant: code on `main` is always CI-green — enforced by a branch ruleset (PR required + required status check + no bypass actors). Workers Builds then only ever builds green code.
PR branch push → GitHub Actions ci (typecheck/test) [GitHub side, no secrets]
merge to main (ruleset: PR + check "ci" required) [human or auto-merge]
└→ Workers Builds: install → build → D1 migrate → wrangler deploy [Cloudflare side]

See references/ruleset.md for the exact gh api ruleset payload (pins the required check to the GitHub Actions app via integration_id: 15368, bypass_actors: [] so even the repo owner cannot push main) and references/ci-yml.md for the secrets-free CI workflow.

One-time human ceremony (secret-zero)

Once per project, by a human or a browser agent under human supervision (it creates a credential). Screen-by-screen labels (Japanese UI, English equivalents), direct URLs and browser-agent tips are in references/dashboard-walkthrough.md — read it before driving the dashboard.

Pre-flight, from the terminal, before opening the dashboard (each of these stopped the kokemusu run):

bash
git fetch origin && git ls-tree --name-only origin/main apps/web/wrangler.jsonc # must print the path: the production branch must ALREADY contain the root directory
gh pr list --state open # the skeleton PR must be merged, not open
grep -n '"name"\|database_id' apps/web/wrangler.jsonc; wrangler d1 list # name = the Worker name you will type; database_id = a real UUID that exists
wrangler whoami # the account the dashboard is logged into (the browser may run on another machine — only the account matters)
wrangler deployments list # DECIDES THE ROUTE: "This Worker does not exist" [10007] → steps A; deployments listed → steps B

Two routes, and that last command decides which. A Worker that does not exist yet is created by the Create an app wizard — steps A. A Worker that already exists — typically one you have been deploying with wrangler deploy from GitHub Actions, i.e. exactly the migration this skill is for — cannot go through that wizard: it validates the project name against existing Workers and refuses with "A project with this name already exists. Choose a different name." (この名前のプロジェクトはすでに存在します。別の名前を選択してください). Connect it from the Worker's own settings instead — steps B. Do not rename the Worker to get past the wizard: the name is its workers.dev hostname, and for a WebAuthn app that invalidates every registered passkey. (The wizard rejects at validation, before anything is created — no orphan token, no orphan Worker.)

Steps A — a Worker that does not exist yet (dashboard as of 2026-08-23):

  1. GitHub App scope. Workers & Pages → Create → Continue with GitHub. If the Cloudflare Workers and Pages GitHub App is already installed on the GitHub account (from an earlier project), no authorization screen appears — the repository list shows straight away with whatever scope that installation has. To keep Only select repositories, manage it on GitHub (Settings → Applications → Cloudflare Workers and Pages → Repository access) before connecting; narrowing an existing All repositories installation touches every project built from that account, so list them first.
  2. Setup dialog. Project name = exactly name from wrangler.jsonc; build + deploy commands from the table below; untick "Builds for non-production branches" (it is in the dialog, ticked by default — no need to wait for Settings). Then open the "Advanced settings" accordion at the bottom: it hides three things — Root directory (labelled Path, default /), the API token picker, and build variables. In the picker choose Create new token and name it <worker> Workers Builds. Do not leave the default: the picker pre-selects the build token of whatever project you connected last (kokemusu's default was nyalog Workers Builds), which silently couples the two projects' deploy credentials.
  3. Deploy. Click Deploy: the Worker is created (two placeholder Upload deployments appear at once) and the first build starts as a manual build of the production branch HEAD — roughly 2 minutes (init ≈ 50 s, clone, install, build, migrate + deploy). A Workers Paid upsell modal appears — dismiss it. The build page's Build settings panel shows exactly what was saved (commands, root directory, token name) — confirm it there.
  4. Settings → Builds afterwards: confirm token and branch control, add build watch paths excludes (docs/*, *.md: type, Enter, then Save on the toast). Nothing else.

Steps B — a Worker that already exists (matatabetai 2026-09-02). Workers & Pages → the Worker → 設定 / Settings → right-hand nav ビルド / Builds → Git リポジトリ card → 接続 / Connect. Same values as the table below, but the dialog differs from the wizard:

  1. No project name field — the Worker is already named, which is the point of this route. Repository and 本番ブランチ / Production branch (main) come pre-filled; the build command loads a beat later (読み込み中... → pnpm run build).
  2. The branch tick-box is labelled プレビュービルドを有効化 / Enable preview builds (not Builds for non-production branches) and is ticked — untick it. Confirm by eye: the 非本番ブランチのデプロイ コマンド field disappears when it is really off.
  3. 詳細設定 / Advanced settings holds the same Path and API-token picker, plus a ビルド キャッシュ / Build cache toggle (off by default — leave it).
  4. In the picker, Create new token sits at the top of the list here (bottom in the wizard), and choosing it pre-fills the token name as Workers Builds - <YYYY-MM-DD HH:MM> — overwrite it with <worker> Workers Builds. The pre-selected default is still another project's token.
  5. Connect starts no build. The page returns with "Git リポジトリにコミットをプッシュして最初のビルドを開始できるようになりました" (push a commit to start the first build). So on this route the first build is push-triggered and does post a Workers Builds: <worker> check-run — the "first build is manual, no check-run" caveat applies to steps A only. Make that first push the commit that deletes `deploy.yml`: the old workflow is gone from the ref being pushed, so Actions does not deploy and the two pipelines never race.
  6. Then the same watch-path excludes as A4, on the page you are already on.

Dropped step — do not pre-create a custom token in My Profile. The 0.2.0 recipe said to create a Workers Scripts + D1 + Account Settings + User Details + Memberships custom token first and "select it from the list". On 2026-08-23 that token did not appear in the picker at all (searched by name → "No labels found"); the picker listed only the dash-generated <project> Workers Builds tokens of other projects plus Create new token — even though the docs say you may "select one that you already own". If you already made one, delete it in My Profile → API Tokens: it is an unused token with Edit rights.

Settings that matter

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/okayus/okayus-skills/cloudflare-workers-builds-keyless-deploy/badge)](https://verified-skill.com/skills/okayus/okayus-skills/cloudflare-workers-builds-keyless-deploy)

Something wrong with this skill or its page? Tell us.