diff --git a/.cursor/plugin.json b/.cursor/plugin.json new file mode 100644 index 0000000..a517e14 --- /dev/null +++ b/.cursor/plugin.json @@ -0,0 +1,13 @@ +{ + "name": "cloudflare", + "version": "1.0.0", + "description": "Skills for the Cloudflare developer platform: Workers, Durable Objects, Agents SDK, MCP servers, Wrangler CLI, and web performance", + "author": { + "name": "Cloudflare", + "email": "support@cloudflare.com", + "url": "https://workers.cloudflare.com" + }, + "keywords": ["cloudflare", "workers", "durable-objects", "agents", "mcp", "wrangler", "serverless", "compute", "storage", "applications"], + "logo": "./logo.svg", + "primaryColor": "#EC582A" +} diff --git a/.mcp.json b/.mcp.json index 38dcdbd..9cb24c8 100644 --- a/.mcp.json +++ b/.mcp.json @@ -4,13 +4,17 @@ "command": "npx", "args": ["mcp-remote", "https://docs.mcp.cloudflare.com/mcp"] }, - "cloudflare-workers-observability": { + "cloudflare-bindings": { "command": "npx", - "args": ["mcp-remote", "https://observability.mcp.cloudflare.com/mcp"] + "args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/mcp"] }, - "cloudflare-workers-builds": { + "cloudflare-builds": { "command": "npx", "args": ["mcp-remote", "https://builds.mcp.cloudflare.com/mcp"] + }, + "cloudflare-observability": { + "command": "npx", + "args": ["mcp-remote", "https://observability.mcp.cloudflare.com/mcp"] } } } diff --git a/README.md b/README.md index 91aef90..2732514 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ Install using the [plugin marketplace](https://code.claude.com/docs/en/discover- /plugin marketplace add cloudflare/skills ``` +### Cursor + +Install from the Cursor Marketplace or add manually via **Settings > Rules > Add Rule > Remote Rule (Github)** with `cloudflare/skills`. + ### npx skills Install using the [`npx skills`](https://skills.sh) CLI: @@ -29,6 +33,7 @@ Clone this repo and copy the skill folders into the appropriate directory for yo | Agent | Skill Directory | Docs | |-------|-----------------|------| | Claude Code | `~/.claude/skills/` | [docs](https://code.claude.com/docs/en/skills) | +| Cursor | `~/.cursor/skills/` | [docs](https://cursor.com/docs/context/skills) | | OpenCode | `~/.config/opencode/skill/` | [docs](https://opencode.ai/docs/skills/) | | OpenAI Codex | `~/.codex/skills/` | [docs](https://developers.openai.com/codex/skills/) | | Pi | `~/.pi/agent/skills/` | [docs](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent#skills) | @@ -63,8 +68,9 @@ This plugin includes [Cloudflare's remote MCP servers](https://developers.cloudf | Server | Purpose | |--------|---------| | cloudflare-docs | Up-to-date Cloudflare documentation and reference | -| cloudflare-workers-observability | Debug and analyze application logs and analytics | -| cloudflare-workers-builds | Manage and get insights into Workers builds | +| cloudflare-bindings | Build Workers applications with storage, AI, and compute primitives | +| cloudflare-builds | Manage and get insights into Workers builds | +| cloudflare-observability | Debug and analyze application logs and analytics | ## Resources diff --git a/logo.svg b/logo.svg new file mode 100644 index 0000000..1b4dbd3 --- /dev/null +++ b/logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/mcp.json b/mcp.json new file mode 100644 index 0000000..12d82df --- /dev/null +++ b/mcp.json @@ -0,0 +1,18 @@ +{ + "cloudflare-docs": { + "command": "npx", + "args": ["mcp-remote", "https://docs.mcp.cloudflare.com/mcp"] + }, + "cloudflare-bindings": { + "command": "npx", + "args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/mcp"] + }, + "cloudflare-builds": { + "command": "npx", + "args": ["mcp-remote", "https://builds.mcp.cloudflare.com/mcp"] + }, + "cloudflare-observability": { + "command": "npx", + "args": ["mcp-remote", "https://observability.mcp.cloudflare.com/mcp"] + } +} diff --git a/rules/workers.mdc b/rules/workers.mdc new file mode 100644 index 0000000..c1047eb --- /dev/null +++ b/rules/workers.mdc @@ -0,0 +1,59 @@ +--- +description: When building applications on Cloudflare Workers or with frameworks that deploy to Cloudflare Workers, strongly prefer retrieval and fetching documentation over training data. +globs: + - "**/*.ts" + - "**/*.tsx" + - "**/*.js" + - "**/*.mts" + - "**/*.mjs" + - "wrangler.jsonc" + - "wrangler.json" + - "wrangler.toml" + - "worker-configuration.d.ts" + - "**/workers/**" + - "**/worker/**" +--- + +# Cloudflare Workers + +STOP. Your knowledge of Cloudflare Workers APIs and limits may be outdated. Always retrieve current documentation before any Workers, KV, R2, D1, Durable Objects, Queues, Vectorize, AI, or Agents SDK task. + +## Docs + +- https://developers.cloudflare.com/workers/ +- MCP: `https://docs.mcp.cloudflare.com/mcp` + +For all limits and quotas, retrieve from the product's `/platform/limits/` page. + +## Commands + +| Command | Purpose | +|---------|---------| +| `npx wrangler dev` | Local development | +| `npx wrangler deploy` | Deploy to Cloudflare | +| `npx wrangler types` | Generate TypeScript types | + +Run `wrangler types` after changing bindings in wrangler.jsonc. + +## Node.js Compatibility + +If you encounter `Dynamic require of "X" is not supported` or missing Node.js APIs: + +```jsonc +{ + "compatibility_flags": ["nodejs_compat"], + "compatibility_date": "YYYY-MM-DD" // Use today's date +} +``` + +Docs: https://developers.cloudflare.com/workers/runtime-apis/nodejs/ + +## Errors + +- **Error 1102** (CPU/Memory exceeded): Retrieve limits from `/workers/platform/limits/` +- **All errors**: https://developers.cloudflare.com/workers/observability/errors/ + +## Product Docs + +Retrieve API references and limits from: +`/kv/` · `/r2/` · `/d1/` · `/durable-objects/` · `/queues/` · `/vectorize/` · `/workers-ai/` · `/agents/`