Skip to content

Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.

feat: add cloudflare-api skill + improve deep-research argument hints

Jeremy Dawesc3ab785ca2a5
diff --git a/CLAUDE.md b/CLAUDE.md
index 1d7829d1..3903ad66 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -16,7 +16,7 @@ Production workflow skills for Claude Code CLI. Each skill guides Claude through
```
claude-skills/
-├── plugins/ # 11 plugins, 55 skills
+├── plugins/ # 11 plugins, 56 skills
│ ├── cloudflare/ # Cloudflare Workers, Hono, D1/Drizzle, Vite, TanStack Start
│ │ └── skills/
│ │ ├── cloudflare-worker-builder/
@@ -25,7 +25,8 @@ claude-skills/
│ │ ├── hono-api-scaffolder/
│ │ ├── d1-drizzle-schema/
│ │ ├── d1-migration/
-│ │ └── db-seed/
+│ │ ├── db-seed/
+│ │ └── cloudflare-api/
│ ├── web-design/ # Local business SEO
│ │ └── skills/
│ │ └── seo-local-business/
diff --git a/README.md b/README.md
index 9a3680cd..bc9b3fb8 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
Production workflow skills for [Claude Code](https://claude.com/claude-code). Each skill guides Claude through a recipe to produce tangible output — scaffolded projects, generated assets, professional documents, deployed services.
-11 plugins. 55 skills. Every one produces something.
+11 plugins. 56 skills. Every one produces something.
## Quick Start
@@ -26,7 +26,7 @@ Then just ask Claude what you need — installed skills trigger automatically fr
| Plugin | Skills | What it does |
|--------|--------|-------------|
-| **cloudflare** | cloudflare-worker-builder, vite-flare-starter, tanstack-start, hono-api-scaffolder, d1-drizzle-schema, d1-migration, db-seed | Scaffold and deploy Cloudflare Workers, full-stack Vite+React apps, TanStack Start SSR dashboards, Hono APIs, D1/Drizzle schemas, migration workflows, database seeding |
+| **cloudflare** | cloudflare-worker-builder, vite-flare-starter, tanstack-start, hono-api-scaffolder, d1-drizzle-schema, d1-migration, db-seed, cloudflare-api | Scaffold and deploy Workers, full-stack Vite+React apps, TanStack Start, Hono APIs, D1/Drizzle schemas, migrations, database seeding, direct REST API for bulk/fleet operations |
| **shopify** | shopify-setup, shopify-products, shopify-content | Shopify API setup, product creation (single + bulk CSV), content pages, blog posts, SEO metadata |
| **wordpress** | wordpress-setup, wordpress-content, wordpress-elementor | WordPress WP-CLI/REST API access, content management, Elementor page editing |
@@ -53,7 +53,7 @@ Then just ask Claude what you need — installed skills trigger automatically fr
| **integrations** | gws-setup, gws-install, google-chat-messages, google-apps-script, elevenlabs-agents, mcp-builder, nemoclaw-setup, parcel-tracking | Google Workspace MCP setup, Google Chat webhooks, Apps Script automation, ElevenLabs voice agents, MCP server building, NVIDIA NemoClaw agent platform setup, Australian parcel tracking via Gmail |
| **basalt** | basalt-cortex | Mine knowledge from Gmail, Chat, Slack, Drive, local files, MCP, web into an Obsidian-compatible vault (~/.cortex/) |
-## All 55 Skills
+## All 56 Skills
<details>
<summary>Full skill list with trigger phrases</summary>
@@ -67,6 +67,7 @@ Then just ask Claude what you need — installed skills trigger automatically fr
| `d1-drizzle-schema` | "d1 schema", "drizzle schema" |
| `d1-migration` | "d1 migration", "migrate database" |
| `db-seed` | "seed database", "sample data", "demo data" |
+| `cloudflare-api` | "cloudflare api", "bulk dns", "custom hostname", "email routing" |
| `seo-local-business` | "local seo", "json-ld schema" |
| `tailwind-theme-builder` | "tailwind theme", "set up tailwind" |
| `shadcn-ui` | "shadcn", "install components" |
diff --git a/plugins/cloudflare/commands/cloudflare-api.md b/plugins/cloudflare/commands/cloudflare-api.md
new file mode 100644
index 00000000..0869c487
--- /dev/null
+++ b/plugins/cloudflare/commands/cloudflare-api.md
@@ -0,0 +1,19 @@
+---
+description: Hit the Cloudflare REST API for bulk, fleet, and operations wrangler can't do
+argument-hint: "[dns|hostname|email|cache|waf|redirect|settings|routes|analytics] [domain]"
+---
+
+Load the `cloudflare-api` skill.
+
+Parse $ARGUMENTS for operation type and target domain:
+- `dns example.com` — bulk DNS operations
+- `hostname example.com` — custom hostname management
+- `email example.com` — email routing rules
+- `cache example.com` — cache purge
+- `waf example.com` — WAF/firewall rules
+- `redirect example.com` — redirect rules
+- `settings` — zone settings (fleet-wide)
+- `routes example.com` — Worker route management
+- `analytics example.com` — GraphQL analytics query
+
+If no type specified, ask what they need. If no domain, use the current project's domain from wrangler.jsonc.
diff --git a/plugins/cloudflare/skills/cloudflare-api/SKILL.md b/plugins/cloudflare/skills/cloudflare-api/SKILL.md
new file mode 100644
index 00000000..876ebf39
--- /dev/null
+++ b/plugins/cloudflare/skills/cloudflare-api/SKILL.md
@@ -0,0 +1,386 @@
+---
+name: cloudflare-api
+description: "Hit the Cloudflare REST API directly for operations that wrangler and MCP can't handle well. Bulk DNS, custom hostnames, email routing, cache purge, WAF rules, redirect rules, zone settings, Worker routes, and fleet-wide operations. Produces curl commands or TypeScript/Python scripts. Triggers: 'cloudflare api', 'bulk dns', 'custom hostname', 'email routing rules', 'cache purge', 'waf rule', 'redirect rule', 'zone settings', 'worker routes', 'fleet operation', 'cloudflare curl'."
+compatibility: claude-code-only
+allowed-tools:
+ - Read
+ - Write
+ - Edit
+ - Bash
+ - Glob
+ - Grep
+---
+
+# Cloudflare API
+
+Hit the Cloudflare REST API directly when wrangler CLI or MCP servers aren't the right tool. For bulk operations, fleet-wide changes, and features that wrangler doesn't expose.
+
+## When to Use This Instead of Wrangler or MCP
+
+| Use case | Wrangler | MCP | This skill |
+|----------|---------|-----|-----------|
+| Deploy a Worker | Yes | Yes | No |
+| Create a D1 database | Yes | Yes | No |
+| Bulk update 50 DNS records | Slow (one at a time) | Slow (one tool call each) | Yes — batch script |
+| Custom hostnames for white-label | No | Partial | Yes |
+| Email routing rules | No | Partial | Yes |
+| WAF/firewall rules | No | Yes but verbose | Yes — direct API |
+| Redirect rules in bulk | No | One at a time | Yes — batch script |
+| Zone settings across 20 zones | No | 20 separate calls | Yes — fleet script |
+| Cache purge by tag/prefix | No | Yes | Yes (when scripting) |
+| Worker route management | Limited | Yes | Yes (when bulk) |
+| Analytics/logs query | No | Partial | Yes — GraphQL |
+
+**Rule of thumb**: Single operations → MCP or wrangler. Bulk/fleet/scripted → API directly.
+
+## Auth Setup
+
+### API Token (recommended)
+
+Create a scoped token at: Dashboard → My Profile → API Tokens → Create Token
+
+```bash
+# Store it
+export CLOUDFLARE_API_TOKEN="your-token-here"
+
+# Test it
+curl -s "https://api.cloudflare.com/client/v4/user/tokens/verify" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq '.success'
+```
+
+**Token scopes**: Always use minimal permissions. Common presets:
+- "Edit zone DNS" — for DNS operations
+- "Edit zone settings" — for zone config changes
+- "Edit Cloudflare Workers" — for Worker route management
+- "Read analytics" — for GraphQL analytics
+
+### Account and Zone IDs
+
+```bash
+# List your zones (find zone IDs)
+curl -s "https://api.cloudflare.com/client/v4/zones?per_page=50" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq '.result[] | {name, id}'
+
+# Get zone ID by domain name
+ZONE_ID=$(curl -s "https://api.cloudflare.com/client/v4/zones?name=example.com" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq -r '.result[0].id')
+```
+
+Store IDs in environment or a config file — don't hardcode them in scripts.
+
+## Workflows
+
+### Bulk DNS Operations
+
+**Add/update many records at once** (e.g. migrating a domain, setting up a new client):
+
+```bash
+# Pattern: read records from a file, create in batch
+while IFS=',' read -r type name content proxied; do
+ curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d "{\"type\":\"$type\",\"name\":\"$name\",\"content\":\"$content\",\"proxied\":$proxied,\"ttl\":1}" \
+ | jq '{name: .result.name, id: .result.id, success: .success}'
+ sleep 0.25 # Rate limit: 1200 req/5min
+done < dns-records.csv
+```
+
+**Export all records from a zone** (backup or migration):
+
+```bash
+curl -s "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?per_page=100" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ | jq -r '.result[] | [.type, .name, .content, .proxied] | @csv' > dns-export.csv
+```
+
+**Find and replace across records** (e.g. IP migration):
+
+```bash
+OLD_IP="203.0.113.1"
+NEW_IP="198.51.100.1"
+
+# Find records pointing to old IP
+RECORDS=$(curl -s "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?content=$OLD_IP" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq -r '.result[].id')
+
+# Update each one
+for RECORD_ID in $RECORDS; do
+ curl -s -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records/$RECORD_ID" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d "{\"content\":\"$NEW_IP\"}" | jq '.success'
+done
+```
+
+### Custom Hostnames (White-Label Client Domains)
+
+For SaaS apps where clients use their own domain (e.g. `app.clientdomain.com` → your Worker):
+
+```bash
+# Create custom hostname
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "hostname": "app.clientdomain.com",
+ "ssl": {
+ "method": "http",
+ "type": "dv",
+ "settings": {
+ "min_tls_version": "1.2"
+ }
+ }
+ }' | jq '{id: .result.id, status: .result.status, ssl_status: .result.ssl.status}'
+
+# List custom hostnames
+curl -s "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames?per_page=50" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ | jq '.result[] | {hostname, status, ssl_status: .ssl.status}'
+
+# Check status (client needs to add CNAME)
+curl -s "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/custom_hostnames/$HOSTNAME_ID" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq '.result.status'
+```
+
+**Client setup**: They add a CNAME: `app.clientdomain.com → your-worker.your-domain.com`
+
+### Email Routing Rules
+
+```bash
+# Enable email routing on zone
+curl -s -X PUT "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/email/routing/enable" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
+
+# Create a routing rule (forward info@ to a real address)
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/email/routing/rules" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "Forward info@",
+ "enabled": true,
+ "matchers": [{"type": "literal", "field": "to", "value": "[email protected]"}],
+ "actions": [{"type": "forward", "value": ["[email protected]"]}]
+ }' | jq '.success'
+
+# Create catch-all rule
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/email/routing/rules" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "name": "Catch-all",
+ "enabled": true,
+ "matchers": [{"type": "all"}],
+ "actions": [{"type": "forward", "value": ["[email protected]"]}]
+ }' | jq '.success'
+
+# List rules
+curl -s "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/email/routing/rules" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq '.result[] | {name, enabled, matchers, actions}'
+```
+
+### Cache Purge
+
+```bash
+# Purge everything (nuclear option)
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/purge_cache" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{"purge_everything": true}'
+
+# Purge specific URLs
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/purge_cache" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{"files": ["https://example.com/styles.css", "https://example.com/app.js"]}'
+
+# Purge by cache tag (requires Enterprise or cache tag headers)
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/purge_cache" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{"tags": ["product-123", "homepage"]}'
+
+# Purge by prefix
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/purge_cache" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{"prefixes": ["https://example.com/images/"]}'
+```
+
+### Redirect Rules (Bulk)
+
+```bash
+# Create a redirect rule
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets/phases/http_request_dynamic_redirect/entrypoint" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "rules": [
+ {
+ "expression": "(http.request.uri.path eq \"/old-page\")",
+ "description": "Redirect old-page to new-page",
+ "action": "redirect",
+ "action_parameters": {
+ "from_value": {
+ "target_url": {"value": "https://example.com/new-page"},
+ "status_code": 301
+ }
+ }
+ }
+ ]
+ }'
+```
+
+**For bulk redirects** (301s from a CSV), generate the rules array programmatically:
+
+```python
+import json, csv
+
+rules = []
+with open('redirects.csv') as f:
+ for row in csv.reader(f):
+ old_path, new_url = row
+ rules.append({
+ "expression": f'(http.request.uri.path eq "{old_path}")',
+ "description": f"Redirect {old_path}",
+ "action": "redirect",
+ "action_parameters": {
+ "from_value": {
+ "target_url": {"value": new_url},
+ "status_code": 301
+ }
+ }
+ })
+print(json.dumps({"rules": rules}, indent=2))
+```
+
+### Zone Settings (Fleet-Wide)
+
+Apply the same settings across multiple zones:
+
+```bash
+# Settings to apply
+SETTINGS='{"value":"full"}' # SSL mode: full (strict)
+
+# Get all active zones
+ZONES=$(curl -s "https://api.cloudflare.com/client/v4/zones?status=active&per_page=50" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq -r '.result[].id')
+
+# Apply to each zone
+for ZONE in $ZONES; do
+ curl -s -X PATCH "https://api.cloudflare.com/client/v4/zones/$ZONE/settings/ssl" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d "$SETTINGS" | jq "{zone: .result.id, success: .success}"
+ sleep 0.25
+done
+```
+
+Common fleet settings:
+- `ssl` — "full" or "strict"
+- `min_tls_version` — "1.2"
+- `always_use_https` — "on"
+- `security_level` — "medium"
+- `browser_cache_ttl` — 14400
+
+### WAF / Firewall Rules
+
+```bash
+# Create a WAF custom rule (block by country)
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets/phases/http_request_firewall_custom/entrypoint" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "rules": [{
+ "expression": "(ip.geoip.country in {\"RU\" \"CN\"})",
+ "action": "block",
+ "description": "Block traffic from RU and CN"
+ }]
+ }'
+
+# Rate limiting rule
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/rulesets/phases/http_ratelimit/entrypoint" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "rules": [{
+ "expression": "(http.request.uri.path contains \"/api/\")",
+ "action": "block",
+ "ratelimit": {
+ "characteristics": ["ip.src"],
+ "period": 60,
+ "requests_per_period": 100
+ },
+ "description": "Rate limit API to 100 req/min per IP"
+ }]
+ }'
+```
+
+### Worker Routes
+
+```bash
+# List routes
+curl -s "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/workers/routes" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq '.result[] | {pattern, id}'
+
+# Create route
+curl -s -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/workers/routes" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{"pattern": "api.example.com/*", "script": "my-worker"}'
+
+# Delete route
+curl -s -X DELETE "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/workers/routes/$ROUTE_ID" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
+```
+
+### Analytics (GraphQL)
+
+```bash
+# Worker analytics (requests, errors, CPU time)
+curl -s -X POST "https://api.cloudflare.com/client/v4/graphql" \
+ -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{
+ "query": "{ viewer { zones(filter: {zoneTag: \"'$ZONE_ID'\"}) { httpRequests1dGroups(limit: 7, filter: {date_gt: \"2026-03-10\"}) { dimensions { date } sum { requests pageViews } } } } }"
+ }' | jq '.data.viewer.zones[0].httpRequests1dGroups'
+```
+
+## Rate Limits
+
+| Endpoint | Limit |
+|---------|-------|
+| Most API calls | 1200 requests / 5 minutes |
+| DNS record operations | 1200 / 5 min (shared with above) |
+| Cache purge | 1000 purge calls / day |
+| Zone creation | 5 per minute |
+
+**In scripts**: Add `sleep 0.25` between calls for sustained operations. Use `p-limit` or `xargs -P 4` for controlled parallelism.
+
+## Script Generation
+
+When the user describes what they need, generate a script in `.jez/scripts/` that:
+- Reads API token from environment (never hardcode)
+- Handles pagination for list operations
+- Includes error checking (`jq '.success'` after each call)
+- Adds rate limit sleep between calls
+- Logs what it does
+- Supports `--dry-run` where possible
+
+Prefer `curl` + `jq` for simple operations. Use Python for complex logic (pagination loops, error handling, CSV processing). Use TypeScript with the `cloudflare` npm package for type safety in larger scripts.
+
+## API Reference
+
+Base URL: `https://api.cloudflare.com/client/v4/`
+
+Full docs: `https://developers.cloudflare.com/api/`
+
+The API follows a consistent pattern:
+- `GET /zones` — list
+- `POST /zones` — create
+- `GET /zones/:id` — read
+- `PATCH /zones/:id` — update
+- `DELETE /zones/:id` — delete
+- `PUT /zones/:id/settings/:name` — update setting
+
+Every response has `{ success: bool, errors: [], messages: [], result: {} }`.
diff --git a/plugins/dev-tools/commands/deep-research.md b/plugins/dev-tools/commands/deep-research.md
index a980669e..bf65d6d0 100644
--- a/plugins/dev-tools/commands/deep-research.md
+++ b/plugins/dev-tools/commands/deep-research.md
@@ -1,12 +1,18 @@
---
description: Deep research and discovery before building something new
-argument-hint: "[focused|wide|deep] [topic or product idea]"
+argument-hint: "[focused: 1 question | wide: landscape | deep: full build plan] [topic]"
---
Load the `deep-research` skill.
-Parse $ARGUMENTS for:
-- **Depth**: `focused` (30 min), `wide` (1-2 hours), `deep` (3-6 hours). Default: wide
-- **Topic**: what to research
+Parse $ARGUMENTS for depth and topic:
-Examples: `/deep-research deep obsidian replacement on cloudflare`, `/deep-research focused codemirror 6 vs prosemirror`, `/deep-research wide knowledge management tools`
+| Depth | What it means | Use when |
+|-------|--------------|----------|
+| `focused` | Answer one specific question. Quick comparison, 1-page recommendation. | "Should I use X or Y?" |
+| `wide` | Understand the whole landscape. Competitors, ecosystem, architecture options. Enough to write a spec. | "What's out there for [category]?" |
+| `deep` | Leave no stone unturned. Everything in wide + libraries, plugins, GitHub issues, forums, future-casting. Enough to drive weeks of coding. | "Plan a major build from scratch" |
+
+Default: `wide`
+
+Examples: `/deep-research deep obsidian replacement on cloudflare`, `/deep-research focused codemirror vs prosemirror`, `/deep-research wide knowledge management tools`