[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CH303YN7MP9VCSFAB7KSG7":3,"skill-same:01M7CH303YN7MP9VCSFAB7KSG7":62},{"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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7CH303YN7MP9VCSFAB7KSG7","workers-best-practices",null,"Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.","harunonsystem\u002Fharunon-harness-slim","harunonsystem","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34958457?v=4","01M7CGJNZEEY4GZ845775PPBV1","harunon","01M7CGJP01K9B4N0F5HMNGYC8Q",0,"MIT","https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fworkers-best-practices\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: workers-best-practices\ndescription: Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.\n---\n\nYour knowledge of Cloudflare Workers APIs, types, and configuration may be outdated. **Prefer retrieval over pre-training** when writing or reviewing Workers code.\n\nUse the project's installed versions, generated types, and Wrangler compatibility settings as the baseline for existing code. Retrieve relevant Cloudflare documentation to verify API, configuration, runtime behavior, and limit claims.\n\n## References\n\nRead the sections relevant to the task:\n\n| Reference | When to use it |\n|-----------|----------------|\n| [Configuration and observability](references\u002Fconfiguration.md) | Compatibility dates, bindings, generated types, secrets, logs, and traces |\n| [Runtime patterns](references\u002Fruntime-patterns.md) | Streaming, promise lifetime, request state, service calls, security, and runtime tests |\n| [Platform API checks](references\u002Fplatform-apis.md) | Handler signatures, platform classes, binding access, and serialization |\n\nFor missing evidence, consult [Workers best practices](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fbest-practices\u002Fworkers-best-practices\u002Findex.md) or find the affected product in the [Cloudflare docs directory](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdirectory\u002Findex.md). Use the installed Wrangler schema for config fields. A newer type package does not supersede the project's configured target.\n\n## Keep Compatibility Dates Current\n\nUse today's date for new Workers. Encourage periodic updates for existing Workers, reviewing compatibility changes and running relevant tests. Assess existing behavior against its configured date and flags; see [compatibility guidance](references\u002Fconfiguration.md#keep-compatibility_date-current).\n\n## Enable Observability\n\nEnable [Workers Logs](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fobservability\u002Flogs\u002Fworkers-logs\u002Findex.md) and [Traces](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fobservability\u002Ftraces\u002Findex.md) when creating or preparing a Worker for production. Set `observability.enabled` and `observability.traces.enabled` to `true`; the top-level setting alone does not enable traces. Use structured JSON logging and configure sampling for the workload. During reviews, flag missing logs or traces. See the [configuration example](references\u002Fconfiguration.md#enable-workers-logs-and-traces).\n\n## Place Compute Near Regional Databases\n\nFor Workers that make multiple sequential queries to one regional database, configure explicit placement matching the database's provider and region before deployment. Ask for missing location information, preserve existing placement choices, and verify handler eligibility and deployed request duration. See [database placement](references\u002Fconfiguration.md#place-compute-near-regional-databases).\n\n## Anti-Patterns to Flag\n\n| Anti-pattern | Consequence and preferred pattern |\n|-------------|-----------------------------------|\n| `await response.text()` or similar buffering on unbounded data | Can exhaust Worker memory; [stream large or unbounded bodies](references\u002Fruntime-patterns.md#stream-request-and-response-bodies). |\n| Hardcoded secrets in source or config | Leaks credentials through version control; use Wrangler secrets. |\n| `Math.random()` for security-sensitive tokens or IDs | Predictable values; use `crypto.randomUUID()` or `crypto.getRandomValues()`. |\n| Async work started without awaiting, returning, or attaching it to `ctx.waitUntil()` | Work can be dropped and errors missed; tie it to the request or background-work lifetime. |\n| Module-level mutable request state | Leaks data across requests and can cause I\u002FO ownership errors; pass request state explicitly. |\n| Cloudflare REST API calls for operations available through Worker bindings | Adds network and authentication overhead; use the available binding. |\n| `ctx.passThroughOnException()` used as general error handling | Can conceal Worker failures by forwarding to the origin; use explicit error handling and structured error responses. |\n| Hand-written `Env` that duplicates Wrangler bindings | Can drift from configuration; generate binding types with `wrangler types`. |\n| Direct string comparison of secret values | Can expose timing differences; use the [Web Crypto comparison pattern](references\u002Fruntime-patterns.md#use-web-crypto-for-secure-token-generation). |\n| Destructuring `ctx` methods, such as `const { waitUntil } = ctx` | Loses the receiver; call `ctx.waitUntil(...)`. |\n| `any` on `Env` or handler parameters | Hides binding and handler contract errors; use the project's generated and platform types. |\n| `as unknown as T` to force a platform type match | Hides incompatibilities; fix the underlying contract. |\n| `implements` used in place of extending a platform base class | Does not inherit runtime behavior, `this.ctx`, or `this.env`; use the appropriate base class. |\n| Unbound `env.X` in a platform class method | Bindings are available through `this.env.X`; see [binding access patterns](references\u002Fplatform-apis.md#binding-access--the-most-common-error). |\n| Applying one serialization rule across Queues, Workflow steps, storage, and WebSockets | Can reject valid payloads or accept unsupported ones; check the [specific API and encoding](references\u002Fplatform-apis.md#serialization-boundaries). |\n\n## Validation\n\nUse the project's existing checks for affected Workers behavior: type-check binding or handler contract changes, and run relevant runtime tests for behavior changes. Preserve required repository checks; a narrow edit does not require a full Workers audit.\n\n## Scope\n\nThis skill covers Workers-specific best practices and code review. For related topics:\n\n- **Durable Objects**: load the `durable-objects` skill\n- **Workflows**: see [Rules of Workflows](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkflows\u002Fbuild\u002Frules-of-workflows\u002Findex.md)\n- **CLI commands**: load the `cf-cli` skill, or the `wrangler` skill in a project with a Wrangler configuration file\n\n## Skill feedback\n\nIf the user reports that this skill gave incorrect or outdated guidance, or is missing information, read [references\u002Fskill-feedback.md](references\u002Fskill-feedback.md).\n","Your knowledge of Cloudflare Workers APIs, types, and configuration may be outdated. **Prefer retrieval over pre-training** when writing or reviewing Workers code.\n\nUse the project's installed versions, generated types, and Wrangler compatibility settings as the baseline for existing code. Retrieve relevant Cloudflare documentation to verify API, configuration, runtime behavior, and limit claims.\n\n## References\n\nRead the sections relevant to the task:\n\n| Reference | When to use it |\n|-----------|----------------|\n| [Configuration and observability](references\u002Fconfiguration.md) | Compatibility dates, bindings, generated types, secrets, logs, and traces |\n| [Runtime patterns](references\u002Fruntime-patterns.md) | Streaming, promise lifetime, request state, service calls, security, and runtime tests |\n| [Platform API checks](references\u002Fplatform-apis.md) | Handler signatures, platform classes, binding access, and serialization |\n\nFor missing evidence, consult [Workers best practices](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fbest-practices\u002Fworkers-best-practices\u002Findex.md) or find the affected product in the [Cloudflare docs directory](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdirectory\u002Findex.md). Use the installed Wrangler schema for config fields. A newer type package does not supersede the project's configured target.\n\n## Keep Compatibility Dates Current\n\nUse today's date for new Workers. Encourage periodic updates for existing Workers, reviewing compatibility changes and running relevant tests. Assess existing behavior against its configured date and flags; see [compatibility guidance](references\u002Fconfiguration.md#keep-compatibility_date-current).\n\n## Enable Observability\n\nEnable [Workers Logs](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fobservability\u002Flogs\u002Fworkers-logs\u002Findex.md) and [Traces](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkers\u002Fobservability\u002Ftraces\u002Findex.md) when creating or preparing a Worker for production. Set `observability.enabled` and `observability.traces.enabled` to `true`; the top-level setting alone does not enable traces. Use structured JSON logging and configure sampling for the workload. During reviews, flag missing logs or traces. See the [configuration example](references\u002Fconfiguration.md#enable-workers-logs-and-traces).\n\n## Place Compute Near Regional Databases\n\nFor Workers that make multiple sequential queries to one regional database, configure explicit placement matching the database's provider and region before deployment. Ask for missing location information, preserve existing placement choices, and verify handler eligibility and deployed request duration. See [database placement](references\u002Fconfiguration.md#place-compute-near-regional-databases).\n\n## Anti-Patterns to Flag\n\n| Anti-pattern | Consequence and preferred pattern |\n|-------------|-----------------------------------|\n| `await response.text()` or similar buffering on unbounded data | Can exhaust Worker memory; [stream large or unbounded bodies](references\u002Fruntime-patterns.md#stream-request-and-response-bodies). |\n| Hardcoded secrets in source or config | Leaks credentials through version control; use Wrangler secrets. |\n| `Math.random()` for security-sensitive tokens or IDs | Predictable values; use `crypto.randomUUID()` or `crypto.getRandomValues()`. |\n| Async work started without awaiting, returning, or attaching it to `ctx.waitUntil()` | Work can be dropped and errors missed; tie it to the request or background-work lifetime. |\n| Module-level mutable request state | Leaks data across requests and can cause I\u002FO ownership errors; pass request state explicitly. |\n| Cloudflare REST API calls for operations available through Worker bindings | Adds network and authentication overhead; use the available binding. |\n| `ctx.passThroughOnException()` used as general error handling | Can conceal Worker failures by forwarding to the origin; use explicit error handling and structured error responses. |\n| Hand-written `Env` that duplicates Wrangler bindings | Can drift from configuration; generate binding types with `wrangler types`. |\n| Direct string comparison of secret values | Can expose timing differences; use the [Web Crypto comparison pattern](references\u002Fruntime-patterns.md#use-web-crypto-for-secure-token-generation). |\n| Destructuring `ctx` methods, such as `const { waitUntil } = ctx` | Loses the receiver; call `ctx.waitUntil(...)`. |\n| `any` on `Env` or handler parameters | Hides binding and handler contract errors; use the project's generated and platform types. |\n| `as unknown as T` to force a platform type match | Hides incompatibilities; fix the underlying contract. |\n| `implements` used in place of extending a platform base class | Does not inherit runtime behavior, `this.ctx`, or `this.env`; use the appropriate base class. |\n| Unbound `env.X` in a platform class method | Bindings are available through `this.env.X`; see [binding access patterns](references\u002Fplatform-apis.md#binding-access--the-most-common-error). |\n| Applying one serialization rule across Queues, Workflow steps, storage, and WebSockets | Can reject valid payloads or accept unsupported ones; check the [specific API and encoding](references\u002Fplatform-apis.md#serialization-boundaries). |\n\n## Validation\n\nUse the project's existing checks for affected Workers behavior: type-check binding or handler contract changes, and run relevant runtime tests for behavior changes. Preserve required repository checks; a narrow edit does not require a full Workers audit.\n\n## Scope\n\nThis skill covers Workers-specific best practices and code review. For related topics:\n\n- **Durable Objects**: load the `durable-objects` skill\n- **Workflows**: see [Rules of Workflows](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fworkflows\u002Fbuild\u002Frules-of-workflows\u002Findex.md)\n- **CLI commands**: load the `cf-cli` skill, or the `wrangler` skill in a project with a Wrangler configuration file\n\n## Skill feedback\n\nIf the user reports that this skill gave incorrect or outdated guidance, or is missing information, read [references\u002Fskill-feedback.md](references\u002Fskill-feedback.md).\n",{"name":5,"description":7},"main","d7d37ad7e79d10fc5b881a8a401979484b6ee1ac","shared-agents\u002Fskills\u002Fworkers-best-practices","https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim","https:\u002F\u002Fgithub.com\u002Fharunonsystem","2026-11-14 07:03:55",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add harunonsystem\u002Fharunon-harness-slim --skill workers-best-practices",{"tool":36,"command":37},"bunx","bunx skills add harunonsystem\u002Fharunon-harness-slim --skill workers-best-practices",{"tool":39,"command":40},"pnpm","pnpm dlx skills add harunonsystem\u002Fharunon-harness-slim --skill workers-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fworkers-best-practices\u002FSKILL.md",true,[44,50,54,58],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fconfiguration.md","REFERENCE","参考文档",6722,"https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fworkers-best-practices\u002Freferences\u002Fconfiguration.md",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fplatform-apis.md",3876,"https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fworkers-best-practices\u002Freferences\u002Fplatform-apis.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fruntime-patterns.md",14071,"https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fworkers-best-practices\u002Freferences\u002Fruntime-patterns.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fskill-feedback.md",2823,"https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fworkers-best-practices\u002Freferences\u002Fskill-feedback.md",[63,70,77,84,91,98],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7CH39JSS2D4J52SCASDTJ9Q","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7CH36HM1KX4VEFNKNQZ37WP","wrangler","Run or troubleshoot Wrangler CLI commands in projects that have a wrangler.jsonc, wrangler.json, or wrangler.toml file, including local development, Previews, deployment, and resource management. For new projects and projects without a Wrangler configuration file, use the cf CLI instead.","https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fwrangler\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7CH335A6PP55E1VE1R7EXB1","workflow-modernize","パッケージ\u002FCLI更新時や定期見直し時に、自作スキル・ワークフロー・設定を監査し、不要なworkaroundの撤廃・新機能の適用・プロンプトの簡素化をGrill（壁打ち）と多角比較で提案・修正する。「workflow-modernize」「スキル監査」「ワークフロー改善」「パッケージ更新後の見直し」「モダナイズ」で起動。","https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fworkflow-modernize\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7CH2XJPDFMHNRBKZXQD16S0","web-perf","Audit, diagnose, or optimize website loading and interaction performance, Core Web Vitals, and Lighthouse performance scores.","https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fweb-perf\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7CH2V3AFZB7F055Y9KAFXZ3","wayfinder","Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7CH2R02CMKBWM9QF2Y6RXG8","variant","Builds multiple variants of a component you're working on and helps you iterate and pick one.","https:\u002F\u002Fgithub.com\u002Fharunonsystem\u002Fharunon-harness-slim\u002Fblob\u002Fmain\u002Fshared-agents\u002Fskills\u002Fvariant\u002FSKILL.md",[],[]]