Agent skill · software engineering · secondsky

cloudflare-email-routing

Cloudflare Email Routing for receiving/sending emails via Workers. Use for email workers, forwarding, allowlists, or encountering Email Trigger errors, worker call failures, SPF issues.

Why this skill is useful

Provides specific commands and configurations for setting up Cloudflare Email Routing that the AI wouldn't reliably generate on its own.

What it needs

Requires bun installed locally. Requires cloudflare account access. About 5k tokens when loaded. Last updated 2026-08-06. 204 stars on the source repository.

What this skill does

Cloudflare Email Routing Status: Production Ready ✅ Last Verified: 2025-11-18 --- What Is Email Routing? Two capabilities: 1. Email Workers - Receive and process incoming emails (allowlists, forwarding, parsing) 2. Send Email - Send emails from Workers to verified addresses Both free and work together for complete email functionality. --- Quick Start (10 Minutes) Part 1: Enable Email Routing Dashboard setup: 1. Dashboard → Domain → Email → Email Routing 2. Enable Email Routing → Add records and enable 3. Create destination address: Custom: hello@yourdomain.com Destination: Your email Verify via email 4. ✅ Basic forwarding active Part 2: Receiving Emails (Email Workers) Install dependencies: Create email worker: Configure wrangler.jsonc: Deploy and connect: Dashboard → Email Workers → Create address → Select worker Part 3: Sending Emails Add send email binding: Send from worker: Load references/setup-guide.md for complete walkthrough. --- Critical Rules Always Do ✅ 1. Enable compatibilityflags: ["nodejscompat"] for postal-mime (requires compatibilitydate >= 2024-09-23) 2. Verify destination addresses before sending 3. Parse with postal-mime for email content 4. Use mimetext for creating emails 5. Check message.from for allowlists 6. Forward with message.forward() (not manual) 7. Handle errors (email delivery can fail) 8. Test with real emails (not just dashboard) 9. Add MX records (automatic via dashboard) 10. Log email activity for debugging Never Do ❌ 1. Never skip nodejscompat (postal-mime requires the Node.js compat flag) 2. Never send without verification (delivery fails) 3. Never hardcode email addresses in public code 4. Never skip parsing (raw email is hard to work with) 5. Never ignore spam (implement allowlists/blocklists) 6. Never exceed Gmail limits (500 emails/day to Gmail) 7. Never skip error handling (emails can fail) 8. Never modify DNS manually (use dashboard) 9. Never expose email content in logs (PII) 10. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills secondsky/cloudflare-email-routing

View the source on GitHub

Browse the @skills marketplace