Back to skills
SKILL.md
Cf Integrations Reference
ASecurity'The consolidated, world-class Cloudflare + integrations reference — CF platform/data/AI-edge patterns, media pipeline, observability/growth, payments, and the site-generation pipeline. The non-inferable choices that build the greatest web apps.'
- 33 stars
- 0 votes
- 0 copies
- 6 views
- Added November 26, 2026
Works with
Security analysis
100/100npx -y skills add heymegabyte/agent-skills --skill cf-integrations-reference --agent claude-codeAre you the author of Cf Integrations Reference?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/heymegabyte-cf-integrations-reference)---
name: "cf-integrations-reference"
description: "'The consolidated, world-class Cloudflare + integrations reference — CF platform/data/AI-edge patterns, media pipeline, observability/growth, payments, and the site-generation pipeline. The non-inferable choices that build the greatest web apps.'"
compatibility:
agentskills: ">=1.0.0"
source: "28-cf-integrations-reference/SKILL.md (heymegabyte/agent-skills)"
---
<!-- GENERATED by bin/gen-codex-skills.mjs from the category's SKILL.md — do not hand-edit.
Path legend: `<agent-home>` = your AI tool's config directory
(Claude Code: ~/.claude · Codex: ~/.codex · others: see your tool's docs). -->
# CF Integrations Reference — the world-class edge stack
> Consolidated reference (merged from the former architecture/media/observability/site-gen packs). The non-inferable Cloudflare-specific + vendor choices. Requirements own the "what"; this owns the "which CF primitive + which vendor."
## Cloudflare platform + data
- Data: **D1** (Sessions API + read replicas; dynamic sitemap from D1) · **R2** · **KV** (60s host/config cache) · **Hyperdrive** (accelerate Neon/Postgres when a CF primitive can't) · **Drizzle ORM** + migrations at the boundary.
- Compute + coordination: **Durable Objects** patterns — rate-limiter · WebSocket/realtime + presence · agent-DO; **Queues** for async delivery · **Browser Run/CDP** for headless jobs + production E2E · **@cloudflare/computer** (preview) for lightweight agent filesystem/shell/Git work. Heavy coding/desktop execution defaults to Daytona → Coolify MCP runner → GitHub runner on Ubuntu Desktop VM/Proxmox; do not default to Cloudflare Sandbox.
- API: **Hono** RPC-mode + **OpenAPI generation** from Hono. Zod at every boundary.
- Auth + tenancy: **Clerk** (M2M JWT) · Zero Trust Access · enterprise multi-tenancy · multi-tenant subdomain provisioning (`{slug}.projectsites.dev`).
- Provisioning: CF-native products are API-provisionable with the global key (Turnstile/DNS/custom-domains) — never hand-create in the dashboard.
## AI / edge intelligence
- Agent capability fabric: official `cloudflare/skills` upstream + direct Cloudflare API Code Mode MCP (`https://mcp.cloudflare.com/mcp`) + MCP Server Portal for appropriate remote MCP fleets. Code Mode for large/variable catalogs; direct tools for small predictable calls. See `[[cloudflare-agent-fabric]]` + `[[ai-search-knowledge-fabric]]`.
- **Workers AI** + **AI Gateway** as runtime control plane. Use **Dynamic Routes** for versioned model policy (conditions, budgets/rate limits, rollout, timeouts/retries, fallbacks) on compatible product calls. AI Gateway cache is exact-request caching unless current docs say otherwise — do not claim semantic caching. BYOK secrets belong in Secrets Store. **AI Search** is the managed retrieval/indexing layer for the knowledge fabric; **Vectorize** remains the lower-level vector primitive where direct vector control is needed.
- Every app is AI-native (per app-foundation): generative / chat-as-UI / voice / multimodal where they add value.
## Media pipeline
- Generation: **Ideogram** (logo · hero · wordmark — tight banner, alpha) + GPT-Image; brand-hex registry per platform.
- Optimization: AVIF + WebP targets, compression pipeline, tiered image profiling, lightbox classifier. Never gray placeholder boxes — every media slot filled (media-slot manifest).
- OG: edge-rendered per-route 1200×630 (og-card / og-image pipeline).
- Rich: **NotebookLM** per-site podcast + infographics; technical diagramming (ASCII / Mermaid / SVG).
## Observability & growth
- Analytics: **PostHog** (server-side; PLG activation funnel; feature-flags + experiments/A-B) — cloud-hosted (never self-host). GA4 only when enterprise.
- Tracing / errors: **Workers Tracing** (OTLP) · **Sentry** alert rules (HTTP API).
- Growth: conversion-optimization patterns; in-app user-feedback widget.
- Bulk email: **Listmonk** (newsletters/campaigns) — the bulk rail (Amazon SES = transactional per app-foundation).
- **Cloudflare-Native 8-Provider Mail Compatibility & `@theme.tools/mail-*` Canonical Package Suite (`@theme.tools/mail-core`, `@theme.tools/mail-auth`, `@theme.tools/mail-adapters`, `@theme.tools/mail-cf`, `@theme.tools/mail-transport`, `@theme.tools/mail-deliverability`, `@theme.tools/mail-templates`, `@theme.tools/mail-ui`, `@theme.tools/mail-e2e`)**:
- **8-Provider Drop-In Endpoint Compatibility Matrix (`mail.megabyte.space`)**:
1. **Listmonk REST v1**: Basic/token auth (`Authorization: Basic` or `token user:key`) across `/api/health`, `/api/subscribers`, `/api/subscribers/query`, `/api/lists`, `/api/campaigns`, `/api/campaigns/:id/status`, `/api/templates`, `/api/tx`, and `/api/webhooks/bounce`.
2. **Mailchimp Marketing v3.0**: Basic (`anystring:<key>-<dc>`) or Bearer auth across `/3.0/ping`, `/3.0/lists`, `/3.0/lists/:id/members`, `/3.0/lists/:id/members/:subscriber_hash` (`MD5(lowercase(email))` upsert), `/3.0/lists/:id/segments`, `/3.0/campaigns`, and `/3.0/campaigns/:id/actions/send`.
3. **SendGrid Web API v3**: Bearer (`SG.*`) auth across `/v3/mail/send` (`personalizations`, `categories`, `custom_args`), `/v3/marketing/contacts`, `/v3/marketing/lists`, and `/v3/suppression/bounces`.
4. **Mailgun v3**: Basic (`api:key-*`) auth (`multipart/form-data`, `application/x-www-form-urlencoded`, or JSON) across `/v3/:domain/messages`, `/v3/:domain/events`, `/v3/:domain/bounces`, and `/v3/lists/:address/members`.
5. **AWS SES v1 Query & v2 REST**: `AWS4-HMAC-SHA256` / Bearer auth across `POST /` (`Action=SendEmail` & `Action=SendRawEmail`), `POST /v2/email/outbound-emails`, and `/v2/email/suppressed-destinations`.
6. **Resend REST v1**: Bearer (`re_*`) auth with payload-fingerprinted `Idempotency-Key` ledger (`200` on identical retry vs `409 Conflict` on payload mismatch) across `/emails`, `/emails/batch`, `/audiences`, `/audiences/:id/contacts`, and `/domains`.
7. **Postmark REST**: `X-Postmark-Server-Token` auth across `/email`, `/email/batch`, `/email/withTemplate`, `/bounces`, and `/suppressions`.
8. **Postal & Mautic Webhooks / Relay**: `X-Server-API-Key` & signed webhook ingestion across `/api/v1/send/message`, `/api/v1/send/raw`, `/api/webhooks/postal`, and `/api/webhooks/mautic` (plus OpenAPI 3.1 `/api/openapi.json` and MCP JSON-RPC 2.0 `/api/mcp`).
- **8-View Mail Admin Control Plane UI Standard (`@theme.tools/mail-ui`)**:
1. **Overview & Bot-Aware Analytics**: Real-time delivery funnel separating human opens/clicks from Apple Mail Privacy Protection (MPP) and security scanner pre-fetches, paired with complaint-rate circuit-breaker gauges (`0.1%` warning / `<0.3%` automatic pause) and active transport driver health.
2. **Visual + D1 SQL Segment Studio**: Interactive visual predicate builder and Listmonk SQL filter editor backed by a safe recursive-descent AST compiler (`subscribers.attribs->>'key'` → parameterized D1 SQLite `json_extract(s.attribs, ?) = ?`) with instant subscriber count preview.
3. **Split-Screen Multi-Engine Campaign Composer**: Side-by-side editor and live responsive preview supporting MJML, React/JSX Email, Liquid, Handlebars, and Go/Listmonk (`{{ .Subscriber.* }}`) expressions with one-click live or `dry_run` campaign dispatch.
4. **Template Foundry**: Versioned multi-engine template registry with dark/light viewport toggle, automatic plain-text synthesis, preheader inspection, and required-variable schema validation.
5. **8-Provider API Playground**: Interactive multi-protocol request builder, cURL/SDK snippet generator, `Idempotency-Key` conflict tester (`200` vs `409`), and live canonical envelope translator across all 8 supported email providers.
6. **Delivery & MIME Inspector**: Per-message raw RFC 5322 MIME source viewer, `X-Megabyte-Run-Id` trace correlation, R2 >128 KB queue spillover pointer inspection, and live Gmail MCP inbox verification status.
7. **Webhook Replay Studio**: Cryptographically signed (`HMAC-SHA256`) inbound/outbound webhook ledger with payload diffing and one-click deterministic replay across Postal, Mautic, SendGrid, Mailgun, Postmark, and Resend event formats.
8. **Deliverability / DMARC / DKIM Auditor**: Live DNS posture verifier for SPF (`v=spf1`), DKIM selector coverage and header signature validation, DMARC `rua` XML aggregate report analyzer, and RFC 8058 One-Click `List-Unsubscribe` header auditor.
- **D1 100-Parameter SQLite Chunking**: Cloudflare D1 enforces a strict 100-bound-parameter ceiling per SQL statement; chunk all bulk subscriber, suppression, and campaign-recipient inserts/upserts (e.g., 15–16-row batches for 6-column subscriber upserts = ≤96 parameters) inside `db.batch()`.
- **Queue 128 KB R2 Spillover**: Cloudflare Queues messages have a 128 KB payload limit; automatically spill oversized HTML/MIME bodies or attachment payloads (>96–100 KB threshold) to R2 (`queue-spillover/<tenantId>/<messageId>.json`) and rehydrate transparently on consumer dequeue.
- **RFC 8058 One-Click List-Unsubscribe + Live Gmail MCP Delivery Verification**: Inject `List-Unsubscribe: <https://.../api/public/unsubscribe?token=...>, <mailto:unsubscribe@...>` and `List-Unsubscribe-Post: List-Unsubscribe=One-Click` headers with HMAC-SHA256 signed tokens on all bulk/marketing dispatches, and verify live inbox delivery + raw MIME headers via `gmail-mcp` (`search_threads` + `get_message` with `messageFormat: "RAW"`).
## Payments (route by model — see app-foundation)
- **Stripe DEFAULT + Link enabled** (accept/one-time/donations; Instant Bank Payments 2.6%+30¢; ACP/agentic-ready) · **Stripe Billing** (recurring SaaS) · **Stripe Connect** (payouts) · **Square ONLY on prompt request**. Never roll your own cart/checkout/inventory (Medusa.js 2.x — MIT, active 2026 — headless when e-commerce).
## Site-generation pipeline
- Flow: research (Google Places / web) → build-prompts → homepage block library → media acquisition → **quality gates** (AI-vision + SEO audits) → source-fidelity loop.
- Coverage: org-type → standard page-set expansion; per-vertical domain features; pSEO templates; local SEO (Google Business Profile + citations).
- Owner UX: non-technical-owner onboarding (zero-code edits); small-business rebuild mode.
- Export/template: bolt-artifact XML envelope; template system = the bolt.diy stack (Vite + React + Tailwind + shadcn) OR Angular per app-foundation.
## Multi-Swarm Parallelization & OpenCode (DeepSeek) Offload Mandate
- **Domain Swarm Directive**: Provision Cloudflare Workers, D1, KV, R2, Queues, Workflows, AI, and Browser Rendering (`[browser]` / `@cloudflare/playwright`) bindings in parallel worktrees with deterministic local port leasing.
- **Whole-change dispatch**. Apply `rules/openspec-change-ownership.md` and `rules/agent-provider-policy.md`. Assign each OpenSpec change one owner through verification. Route suitable bounded changes to OpenCode with DeepSeek through LiteLLM.
- **Architecture and verification**: Route material decisions through `rules/evidence-gated-autonomous-orchestration.md`. Its conference and risk gates govern provider selection and independence.
- **Reuse review**: Review reuse during implementation under `control-plane/RUNTIME.md`. Capture cited proposals for application code in `theme.tools`, host configuration in `install.doctor`, and agent guidance in `agent-skills`. Submit authorized findings to same-run OpenSpec admission.
## Theme.tools ecosystem contract (required)
Before implementation, load `rules/theme-tools-skill-integration.md` from the agent-skills repository and the entry for this skill in `config/theme-tools-skill-map.json`. Apply catalog-first reuse, upstream contribution, thin-consumer adoption, UI-first theme.tools implementation and test-driven verification, and `.tools/telemetry` routing proportionally to this task.
- **Evidence-Gated Autonomous Pipeline**: For material work, load `rules/evidence-gated-autonomous-orchestration.md`; complete evidence saturation, heterogeneous independent briefs and conference, architecture fixed point, assigned-architect OpenSpec freeze, executable swarms, integration, and adversarial verification without routine confirmation pauses.
- **Concurrent End-of-Prompt Delivery Closure**: Run documentation/comment reconciliation and bounded `theme.tools`, `install.doctor`, and `agent-skills` extraction reviews concurrently with proportional tests and release preparation. Then serialize the integrity boundary: commit only the exact tested tree, push that commit normally to `main`, promote through the approved production rail, and run production smoke plus critical E2E verification. Fail closed without mutating production when authority, credentials, spending permission, review, recovery, validation, or provenance gates are missing; record the exact blocker instead.
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.