[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CFZN7TGPBS584D36W6W05H":3,"skill-same:01M7CFZN7TGPBS584D36W6W05H":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":29,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7CFZN7TGPBS584D36W6W05H","cloudflare-workers",null,"Build, configure and test a Cloudflare Worker locally with cf (cloudflare.config.ts, typed bindings, static assets, cf dev, vitest). Use when creating or changing Worker code or configuration. Does not deploy; use cloudflare-deploy for that.","codewhale-hq\u002Fcodewhale-plugin-marketplace","codewhale-hq","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F326694313?v=4","01M6CDD9D70AD3631SMRJ7REW4","Codewhale","01M7CFYTPJMP417FBR6K9VE5VN",5,"MIT","https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fcloudflare\u002Fskills\u002Fcloudflare-workers\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cloudflare-workers\ndescription: Build, configure and test a Cloudflare Worker locally with cf (cloudflare.config.ts, typed bindings, static assets, cf dev, vitest). Use when creating or changing Worker code or configuration. Does not deploy; use cloudflare-deploy for that.\n---\n\n# Cloudflare Workers: build and test locally\n\nThis skill covers everything up to, but not including, a deploy. Anything that\nchanges the user's Cloudflare account goes through `cloudflare-deploy`.\n\nCloudflare's platform moves quickly. Before relying on a limit, a flag name or a\nconfig key from memory, check it with the `cloudflare-docs` plugin (its\n`search_cloudflare_documentation` tool) if it is enabled, or the docs at\nhttps:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002F. The examples here were checked\nagainst those docs when this plugin was written.\n\n## Start or inspect a project\n\nUse Cloudflare's `cf` CLI (or its `cloudflare` alias if `cf` names another tool).\nPin it in the project; typed config needs Node22.18+ and is not supported on Bun.\nRead `cloudflare.config.ts`, the Worker entry, framework adapter and package\nscripts before running commands: the config is executable TypeScript.\n\n- Existing legacy config: `cf migrate --dry-run` previews the conversion;\n  `cf migrate` writes local files. Review its diff and unresolved items before\n  running a project command. Preserve account, binding IDs, domains, schedules\n  and existing Durable Object storage. Do not run `cf init .` over it.\n- New project: `cf init \u003Cdirectory>` creates local files and installs packages.\n  Do not accept an offer to deploy.\n- `\u002Fcloudflare-preflight` inspects legacy JSON\u002FTOML only. With typed config it\n  reports that validation is unavailable; continue with reviewed config,\n  project tests, `cf build` and `cf deploy --dry-run`, rather than treating a\n  stale legacy file as the active configuration.\n\n## Typed configuration\n\n```ts\nimport { defineConfig } from \"cf\u002Fconfig\";\nexport default defineConfig({\n  worker: {\n    name: \"my-worker\",\n    entrypoint: \"src\u002Findex.ts\",\n    compatibilityDate: \"2026-10-01\", \u002F\u002F choose deliberately, never a future date\n    compatibilityFlags: [\"nodejs_compat\"],\n    observability: { enabled: true },\n  },\n});\n```\n\nUse `worker.env` with the `bindings` helpers from `cf\u002Fconfig` for KV, R2, D1,\nassets and other Workers. Confirm each helper and option against the current\nconfiguration reference. Keep the project's generated binding types current;\n`cf init` produces `.cloudflare\u002Ftypes\u002Findex.d.ts`. Compatibility dates pin\nruntime behavior; move an existing date forward only with tests. The CLI may\nuse a framework adapter or its official Wrangler compatibility delegate\ninternally; authored development and deployment commands remain `cf`.\n\n## Module Worker shape\n\n```ts\nexport interface Env {\n  \u002F\u002F Use the project's generated binding types; keep them current.\n  MY_KV: KVNamespace;\n  API_TOKEN: string; \u002F\u002F a secret: never in `vars`\n}\n\nexport default {\n  async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise\u003CResponse> {\n    const url = new URL(request.url);\n    if (url.pathname === \"\u002Fhealth\") return new Response(\"ok\");\n    ctx.waitUntil(logHit(env, url.pathname)); \u002F\u002F work after the response\n    return Response.json({ path: url.pathname });\n  },\n} satisfies ExportedHandler\u003CEnv>;\n\nasync function logHit(env: Env, path: string): Promise\u003Cvoid> {\n  await env.MY_KV.put(`hit:${path}`, String(Date.now()), { expirationTtl: 3600 });\n}\n```\n\nRules that prevent most Worker bugs:\n\n- No mutable per-request state in module scope; isolates serve many requests.\n- Do not `await` slow work you can push to `ctx.waitUntil`; stream large bodies\n  instead of buffering them.\n- Secrets stay out of literal config values and chat. Keep local secret files\n  gitignored; approved remote secret updates follow `cloudflare-deploy`.\n- Regenerate the project's binding types after binding changes and run its\n  type check so `Env` stays correct.\n- Handlers beyond `fetch` (`scheduled`, `queue`, `email`) need a matching\n  trigger or binding in the config.\n\n## Bindings and assets\n\nUse KV for read-heavy cache\u002Fconfig, R2 for blobs, D1 for relational records and\nDurable Objects for coordinated state. Their binding declarations belong in\n`worker.env`; the storage and Durable Object skills cover runtime use.\n\nUse the adapter's documented static-asset setup and `bindings.assets()` when\nWorker code needs an ASSETS binding. Check the generated build output: files\nsuch as `_worker.js`, `.git`, local credentials and `node_modules` must never\nbe public assets. A `.assetsignore` file excludes unwanted assets. Check SPA\nfallback, missing-file behavior, and routes that invoke Worker code first.\n\n## Run and test locally\n\n- `cf dev` uses the project adapter. Check its local storage location; Vite\n  development and `cf` API commands with `--local` use different stores. Do\n  not assume a value written by one is visible in the other.\n- A binding configured for remote development talks to real\n  resources, and Workers AI bills even in local mode. Treat those as\n  account-affecting: ask first.\n- Unit and integration tests: `@cloudflare\u002Fvitest-pool-workers` runs Vitest\n  inside the Workers runtime with real bindings simulated. Add a test for each\n  route you change, then run only that test file.\n- `cf deploy --dry-run` bundles and validates without uploading. It is\n  safe to run without approval; report the bundle size and any warnings.\n\n## Done means\n\nYou ran `cf dev` or the tests and report what you observed (status codes,\ntest counts). Say plainly if you could not run them. Do not claim the Worker\nworks in production; that needs a deploy the user approved.\n\nReferences: [cf project commands](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fcf\u002Fprojects\u002F), [typed config](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fcf\u002Fprojects\u002Fcloudflare-config\u002F), [migration](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fcf\u002Fwrangler\u002Fmigrate\u002F).\n","# Cloudflare Workers: build and test locally\n\nThis skill covers everything up to, but not including, a deploy. Anything that\nchanges the user's Cloudflare account goes through `cloudflare-deploy`.\n\nCloudflare's platform moves quickly. Before relying on a limit, a flag name or a\nconfig key from memory, check it with the `cloudflare-docs` plugin (its\n`search_cloudflare_documentation` tool) if it is enabled, or the docs at\nhttps:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002F. The examples here were checked\nagainst those docs when this plugin was written.\n\n## Start or inspect a project\n\nUse Cloudflare's `cf` CLI (or its `cloudflare` alias if `cf` names another tool).\nPin it in the project; typed config needs Node22.18+ and is not supported on Bun.\nRead `cloudflare.config.ts`, the Worker entry, framework adapter and package\nscripts before running commands: the config is executable TypeScript.\n\n- Existing legacy config: `cf migrate --dry-run` previews the conversion;\n  `cf migrate` writes local files. Review its diff and unresolved items before\n  running a project command. Preserve account, binding IDs, domains, schedules\n  and existing Durable Object storage. Do not run `cf init .` over it.\n- New project: `cf init \u003Cdirectory>` creates local files and installs packages.\n  Do not accept an offer to deploy.\n- `\u002Fcloudflare-preflight` inspects legacy JSON\u002FTOML only. With typed config it\n  reports that validation is unavailable; continue with reviewed config,\n  project tests, `cf build` and `cf deploy --dry-run`, rather than treating a\n  stale legacy file as the active configuration.\n\n## Typed configuration\n\n```ts\nimport { defineConfig } from \"cf\u002Fconfig\";\nexport default defineConfig({\n  worker: {\n    name: \"my-worker\",\n    entrypoint: \"src\u002Findex.ts\",\n    compatibilityDate: \"2026-10-01\", \u002F\u002F choose deliberately, never a future date\n    compatibilityFlags: [\"nodejs_compat\"],\n    observability: { enabled: true },\n  },\n});\n```\n\nUse `worker.env` with the `bindings` helpers from `cf\u002Fconfig` for KV, R2, D1,\nassets and other Workers. Confirm each helper and option against the current\nconfiguration reference. Keep the project's generated binding types current;\n`cf init` produces `.cloudflare\u002Ftypes\u002Findex.d.ts`. Compatibility dates pin\nruntime behavior; move an existing date forward only with tests. The CLI may\nuse a framework adapter or its official Wrangler compatibility delegate\ninternally; authored development and deployment commands remain `cf`.\n\n## Module Worker shape\n\n```ts\nexport interface Env {\n  \u002F\u002F Use the project's generated binding types; keep them current.\n  MY_KV: KVNamespace;\n  API_TOKEN: string; \u002F\u002F a secret: never in `vars`\n}\n\nexport default {\n  async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise\u003CResponse> {\n    const url = new URL(request.url);\n    if (url.pathname === \"\u002Fhealth\") return new Response(\"ok\");\n    ctx.waitUntil(logHit(env, url.pathname)); \u002F\u002F work after the response\n    return Response.json({ path: url.pathname });\n  },\n} satisfies ExportedHandler\u003CEnv>;\n\nasync function logHit(env: Env, path: string): Promise\u003Cvoid> {\n  await env.MY_KV.put(`hit:${path}`, String(Date.now()), { expirationTtl: 3600 });\n}\n```\n\nRules that prevent most Worker bugs:\n\n- No mutable per-request state in module scope; isolates serve many requests.\n- Do not `await` slow work you can push to `ctx.waitUntil`; stream large bodies\n  instead of buffering them.\n- Secrets stay out of literal config values and chat. Keep local secret files\n  gitignored; approved remote secret updates follow `cloudflare-deploy`.\n- Regenerate the project's binding types after binding changes and run its\n  type check so `Env` stays correct.\n- Handlers beyond `fetch` (`scheduled`, `queue`, `email`) need a matching\n  trigger or binding in the config.\n\n## Bindings and assets\n\nUse KV for read-heavy cache\u002Fconfig, R2 for blobs, D1 for relational records and\nDurable Objects for coordinated state. Their binding declarations belong in\n`worker.env`; the storage and Durable Object skills cover runtime use.\n\nUse the adapter's documented static-asset setup and `bindings.assets()` when\nWorker code needs an ASSETS binding. Check the generated build output: files\nsuch as `_worker.js`, `.git`, local credentials and `node_modules` must never\nbe public assets. A `.assetsignore` file excludes unwanted assets. Check SPA\nfallback, missing-file behavior, and routes that invoke Worker code first.\n\n## Run and test locally\n\n- `cf dev` uses the project adapter. Check its local storage location; Vite\n  development and `cf` API commands with `--local` use different stores. Do\n  not assume a value written by one is visible in the other.\n- A binding configured for remote development talks to real\n  resources, and Workers AI bills even in local mode. Treat those as\n  account-affecting: ask first.\n- Unit and integration tests: `@cloudflare\u002Fvitest-pool-workers` runs Vitest\n  inside the Workers runtime with real bindings simulated. Add a test for each\n  route you change, then run only that test file.\n- `cf deploy --dry-run` bundles and validates without uploading. It is\n  safe to run without approval; report the bundle size and any warnings.\n\n## Done means\n\nYou ran `cf dev` or the tests and report what you observed (status codes,\ntest counts). Say plainly if you could not run them. Do not claim the Worker\nworks in production; that needs a deploy the user approved.\n\nReferences: [cf project commands](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fcf\u002Fprojects\u002F), [typed config](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fcf\u002Fprojects\u002Fcloudflare-config\u002F), [migration](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fcf\u002Fwrangler\u002Fmigrate\u002F).\n",{"name":5,"description":7},"main","e83cac15fc63134280e964895df4d584e5702c13","plugins\u002Fcloudflare\u002Fskills\u002Fcloudflare-workers",2,"https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace","https:\u002F\u002Fcodewhale.net","https:\u002F\u002Fgithub.com\u002Fcodewhale-hq","Open-source coding agent for your terminal. Works with the model provider you choose.","2026-11-13 11:48:42",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add codewhale-hq\u002Fcodewhale-plugin-marketplace --skill cloudflare-workers",{"tool":39,"command":40},"bunx","bunx skills add codewhale-hq\u002Fcodewhale-plugin-marketplace --skill cloudflare-workers",{"tool":42,"command":43},"pnpm","pnpm dlx skills add codewhale-hq\u002Fcodewhale-plugin-marketplace --skill cloudflare-workers","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace\u002Fblob\u002Fmain\u002Fplugins\u002Fcloudflare\u002Fskills\u002Fcloudflare-workers\u002FSKILL.md",true,[],[48,55,62,69,75,82],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7CG92AM4VSATJQ927PE34G4","xlsx","Create\u002Fedit\u002Fanalyze\u002Fverify spreadsheet workbooks including XLSX\u002FCSV\u002FTSV.","https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7CG8ZBZXPCJACH06SFV39NM","webapp-testing","Start\u002Freuse a local app, wait for readiness, inspect rendered state\u002Fconsole\u002Fnetwork, act from observed selectors, and verify with evidence.","https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7CG8XF83CD62S7TCPMECV4N","verify","Exercise the real app\u002FAPI\u002FCLI and collect observable evidence; tests alone do not count as end-to-end verification.","https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fverify\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7CG8VF7HN4EHQM3PP877PB6","tts","https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Ftts\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7CG8RSMADT0QKP2ZSF6EN6T","test","Detect the project’s test stack, run the narrowest useful tests, create tests when authorized, and report coverage\u002Fgaps honestly.","https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Ftest\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7CG8MQTZ8VT7E4V3VY78F8X","spreadsheets","Compatibility alias for the xlsx skill. Prefer loading xlsx.","https:\u002F\u002Fgithub.com\u002Fcodewhale-hq\u002Fcodewhale-plugin-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fspreadsheets\u002FSKILL.md",[],[]]