Cloudflare App Bootstrap

cloudflare/skills/skills/cloudflare-app-bootstrap

作者 cloudflare6eb6c781aa9b6438e0c7307bd102788a75fe1a6d無授權條款3.2K 個星標收錄於 2026年11月7日更新於 2026年11月7日儲存庫今天更新

Get a Cloudflare Workers app to a working local request by connecting its bindings, secrets, and initial data, then verifying real application behavior. Use for app setup or onboarding after the project exists; use frameworks-on-cloudflare or cf-cli to create or configure the project, and wrangler or cf-cli for isolated commands.

AI 產生的概覽

讓既有的 Cloudflare Workers 應用程式在本機跑通:接上繫結、密鑰與初始資料,並驗證真實請求。

功能
把現有的 Cloudflare Workers 專案推進到能發出一次可用的本機請求,並涵蓋所要求的應用程式行為。它會檢視應用程式目錄、鎖定檔、指令碼與設定,只連接程式碼實際需要的繫結,依使用端區分建置、瀏覽器與執行階段設定和密鑰,初始化最小必要的本機資料(例如 D1 遷移),重新產生繫結型別,並執行真正的開發流程來檢查回應與狀態變化。最後把可重現的安裝、初始化與開發指令寫進專案的建置說明文件。
適用情境
適用於專案已存在、需要接上繫結、密鑰和初始資料才能進行本機開發時的應用程式建置或上手情境。不適用於建立或設定新專案,這類工作由本技能指向其他技能完成。
執行需求
僅為說明文件,不含指令碼。需要既有的 Cloudflare Workers 專案及其鎖定檔和設定、套件管理工具,以及專案所用的 CLI(Wrangler 或 cf)。查閱文件與設定遠端資源需要網路存取;僅在所選流程需要帳戶存取時才需登入。

Cloudflare App Bootstrap

Take the project from its current state to a working local request that exercises the requested application behavior. Preserve the user's framework, package manager, CLI, and existing services. Read the relevant current documentation before choosing configuration or commands, and check support against installed versions with local CLI help and schemas.

Start from the project

Inspect the app directory, lockfile, scripts, framework and adapter versions, Cloudflare configuration (cloudflare.config.ts, or a Wrangler configuration file), and existing setup instructions. In a monorepo, identify the application root before installing or generating files. Install from the existing lockfile and reuse the project's dependency and configuration conventions.

If the project has no Cloudflare configuration yet, set it up first with the frameworks-on-cloudflare skill for a framework app, or the cf-cli skill otherwise. Identify the source of any framework-generated configuration and edit that source. Do not replace a working app with a starter to resolve a configuration problem.

Connect only the resources the app needs

Identify each binding used by application code and map it to an existing resource or a new local resource. Keep names consistent across code and configuration. Keep existing resource identifiers: a binding without one is treated as a new resource to provision on the next deploy.

Read automatic provisioning before manually creating supported resources, and check which resource types it covers. Provisioning differs by CLI:

  • Wrangler: wrangler dev creates local resources that persist between runs, and wrangler deploy creates remote resources and writes their identifiers back to the configuration file.
  • cf: cf deploy provisions missing resources but does not write identifiers back to cloudflare.config.ts (Develop, build, and deploy). Record the identifiers it reports in the configuration.

Establish the account, environment, and resource before any required remote creation.

Choose the dev command from the app's scripts and the local development guide. A local Worker can use remote bindings: identify which resources are simulated and which calls reach real services before exercising writes. Use the framework's supported Workers dev integration; a frontend-only dev server does not establish that server bindings work.

For data-backed features, initialize only the state needed for the first meaningful request. Preserve existing migration tooling. For D1, follow migrations and pass --local or --remote to d1 migrations apply explicitly. --local initializes only the simulated database; apply remote migrations only when the requested setup includes that database change. For Durable Objects, check the current class migration configuration rather than treating it as a D1 SQL migration.

Resolve configuration and secrets

Classify required values by consumer: build process, browser bundle, or Worker runtime. Keep private runtime credentials out of public client configuration. Use Workers secrets for runtime secrets, and configure values the build needs in its build environment.

In Wrangler and Vite projects, follow local secret loading for file names, environment precedence, and required-secret declarations. In a cf project, find the equivalent with cf cli search rather than assuming the Wrangler behavior. Reuse the project's chosen local secret file, make sure files with real values are ignored by Git, and provide names and safe placeholders for missing values. Local secrets are not installed on a deployed Worker. Authenticate only when the selected workflow needs account access; do not make login or deployment a blanket prerequisite for local setup.

Verify the first application request

After changing configuration, regenerate binding and runtime types with the project's script: wrangler types in a Wrangler project, or cf workers types in a cf project. Do not hand-edit generated declarations. Run the relevant existing build and type checks.

Start the actual development workflow and exercise a representative route or UI action, including its binding access when applicable. Check the response and the intended state change, not just that a server started. For missing credentials or unsupported local services, report exactly what remains unverified instead of claiming the app works.

Leave reproducible install, initialization, and dev commands in the project's setup documentation. Report the tested URL or action, which resources are local or remote, required values still missing, and any remaining remote setup. Continue to deployment only when it is part of the user's task.

Skill feedback

If the user reports that this skill gave incorrect or outdated guidance, or is missing information, read references/skill-feedback.md [blocked].

來源與署名

來源:cloudflare/skills位於skills/cloudflare-app-bootstrap提交6eb6c78

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

在 README 中新增徽章

向讀者展示該技能已收錄於 SourceWeft,徽章連結到本頁。

「Listed on SourceWeft」徽章預覽
[![Listed on SourceWeft](https://sourceweft.com/badge/skills/gh-cloudflare-skills-cloudflare-app-bootstrap-skills-cloudflare-app-bootstrap-859e88b685d27e8f.svg)](https://sourceweft.com/skills/gh-cloudflare-skills-cloudflare-app-bootstrap-skills-cloudflare-app-bootstrap-859e88b685d27e8f?utm_source=readme&utm_medium=badge)

檢舉或申請下架