[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C7CQHGNS5KATKXFWBX1QVM":3,"skill-same:01M7C7CQHGNS5KATKXFWBX1QVM":61},{"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":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7C7CQHGNS5KATKXFWBX1QVM","workers-best-practices",null,"Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.","stepankuzmin\u002Fsvenska-app","stepankuzmin","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F533564?v=4","01M7ADH01MGRSMC0YNW589Q6CE","Stepan Kuzmin","01M7C74QGFNTQ4J5AA0QJVZ102",0,"MIT","https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.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## 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","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## 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",{"name":5,"description":7},"main","982185840176c21a4953df3e87e85c484a6369d0",".agents\u002Fskills\u002Fworkers-best-practices","https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app","https:\u002F\u002Fsvenska-app.stepan-kuzmin.workers.dev\u002F","https:\u002F\u002Fgithub.com\u002Fstepankuzmin","https:\u002F\u002Fstepankuzmin.com\u002F","Software Engineer at @Mapbox","2026-11-14 23:14:58",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add stepankuzmin\u002Fsvenska-app --skill workers-best-practices",{"tool":39,"command":40},"bunx","bunx skills add stepankuzmin\u002Fsvenska-app --skill workers-best-practices",{"tool":42,"command":43},"pnpm","pnpm dlx skills add stepankuzmin\u002Fsvenska-app --skill workers-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkers-best-practices\u002FSKILL.md",true,[47,53,57],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fconfiguration.md","REFERENCE","参考文档",5657,"https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkers-best-practices\u002Freferences\u002Fconfiguration.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fplatform-apis.md",3876,"https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkers-best-practices\u002Freferences\u002Fplatform-apis.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fruntime-patterns.md",13644,"https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkers-best-practices\u002Freferences\u002Fruntime-patterns.md",[62,68,75,82,89,96],{"skillNo":63,"name":64,"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":65,"categories":66,"keywords":67,"publishedAt":19},"01M7C7CWDP33VRCNNQ2X0Z2WVY","code-review","https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcode-review\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"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},"01M7C7CSQ125KWMD152RVMEVR2","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\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrangler\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},"01M7C7CG0Q35G35NFECMVW0YSX","why","Use when the user asks to investigate why code is built the way it is: 'why does X work this way', 'why we picked Y', design rationale, regressions, or postmortems. Not for explaining a single error or a quick question. Queries each available evidence source (git and PRs, issues, docs, team chat) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwhy\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},"01M7C7CAXBW5SPGDN6VB0VF03P","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7C7C7SBTJEA71CZ2ZTG62C1","vendor-skill","Adapt an external skill into this marketplace, or review upstream changes to one already adapted. Use when asked to vendor, import, adapt, mirror, or update a skill from skills.sh, `npx skills add`, or any external GitHub skills repo, especially to work around Claude Code Web only allowing one marketplace per GitHub repo name.","https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fvendor-skill\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7C7C62FXTKJPJNGZZT9XZK6","unslop","Cut AI tells from any writing. Must always apply.","https:\u002F\u002Fgithub.com\u002Fstepankuzmin\u002Fsvenska-app\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Funslop\u002FSKILL.md",[],[]]