# Install the "Cloudflare Workers Expert" skill
You are installing an AgenticMarket skill into this workspace. Follow these steps exactly.
## 1. Detect your environment and choose the destination file
- Andromity: `.andromity/skills/cloudflare-workers/SKILL.md` (or user scope `~/.andromity/skills/cloudflare-workers/SKILL.md`)
- Antigravity / Gemini CLI: `.agent/skills/cloudflare-workers/SKILL.md`
- Cursor: `.cursor/rules/cloudflare-workers.mdc`
- Claude Code: append to `CLAUDE.md` (or `.claude/skills/cloudflare-workers.md`)
- Windsurf: append to `.windsurfrules`
- Cline / Roo Code: `.clinerules/cloudflare-workers.md`
- GitHub Copilot: append to `.github/copilot-instructions.md`
- ChatGPT / web only: paste the content into Custom Instructions
- Any other agent: save to `.agent/skills/cloudflare-workers/SKILL.md`
## 2. Create the destination file
- Preserve every existing file and configuration entry.
- Create parent folders as needed.
- Never overwrite unrelated content.
## 3. Write exactly this content
```markdown
---
name: cloudflare-workers
description: "Architect, build, and deploy ultra-low latency serverless edge compute applications on Cloudflare Workers."
author: cloudflare
license: mit
version: 1.0.0
---
# Cloudflare Workers Expert Guide
Use this skill when building, refactoring, or optimizing Cloudflare Workers.
## Key Architecture Principles
1. **Zero Cold Starts**: Target sub-5ms response times.
2. **ES Modules Syntax**: Always export default with `fetch(request, env, ctx)`.
3. **Bindings**: Inject KV, D1, R2, Queues, and AI bindings via `env`. Never hardcode secrets.
4. **Streaming**: Stream responses via `TransformStream` for large payloads or LLM completions.
## Standard Worker Structure
```typescript
export interface Env {
DB: D1Database;
CACHE: KVNamespace;
API_SECRET: string;
}
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
const url = new URL(request.url);
if (request.method === "GET" && url.pathname === "/health") {
return new Response(JSON.stringify({ status: "healthy" }), {
headers: { "Content-Type": "application/json" }
});
}
return new Response("Not Found", { status: 404 });
}
};
```
```
## 4. Verify
- Confirm the file exists and is readable.
- Report the destination path and confirm the "Cloudflare Workers Expert" skill is installed and active.
Skill metadata:
- Slug: cloudflare-workers
- Category: devops
- License: mit
- Source: AgenticMarket