Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add resend/email-best-practices
Or install specific skill: npx add-skill https://github.com/resend/email-best-practices
# Description
Use when building email features, emails going to spam, high bounce rates, setting up SPF/DKIM/DMARC authentication, implementing email capture, ensuring compliance (CAN-SPAM, GDPR, CASL), handling webhooks, retry logic, or deciding transactional vs marketing.
# SKILL.md
name: email-best-practices
description: Use when building email features, emails going to spam, high bounce rates, setting up SPF/DKIM/DMARC authentication, implementing email capture, ensuring compliance (CAN-SPAM, GDPR, CASL), handling webhooks, retry logic, or deciding transactional vs marketing.
Email Best Practices
Guidance for building deliverable, compliant, user-friendly emails.
Architecture Overview
[User] → [Email Form] → [Validation] → [Double Opt-In]
↓
[Consent Recorded]
↓
[Suppression Check] ←──────────────[Ready to Send]
↓
[Idempotent Send + Retry] ──────→ [Email API]
↓
[Webhook Events]
↓
┌────────┬────────┬─────────────┐
↓ ↓ ↓ ↓
Delivered Bounced Complained Opened/Clicked
↓ ↓
[Suppression List Updated]
↓
[List Hygiene Jobs]
Quick Reference
| Need to... | See |
|---|---|
| Set up SPF/DKIM/DMARC, fix spam issues | Deliverability |
| Build password reset, OTP, confirmations | Transactional Emails |
| Plan which emails your app needs | Transactional Email Catalog |
| Build newsletter signup, validate emails | Email Capture |
| Send newsletters, promotions | Marketing Emails |
| Ensure CAN-SPAM/GDPR/CASL compliance | Compliance |
| Decide transactional vs marketing | Email Types |
| Handle retries, idempotency, errors | Sending Reliability |
| Process delivery events, set up webhooks | Webhooks & Events |
| Manage bounces, complaints, suppression | List Management |
Start Here
New app?
Start with the Catalog to plan which emails your app needs (password reset, verification, etc.), then set up Deliverability (DNS authentication) before sending your first email.
Spam issues?
Check Deliverability first—authentication problems are the most common cause. Gmail/Yahoo reject unauthenticated emails.
Marketing emails?
Follow this path: Email Capture (collect consent) → Compliance (legal requirements) → Marketing Emails (best practices).
Production-ready sending?
Add reliability: Sending Reliability (retry + idempotency) → Webhooks & Events (track delivery) → List Management (handle bounces).
# README.md
╔══════════════════════════════════════╗
║ _____ __ __ _ ___ _ ║
║ | ____| \/ | / \ |_ _| | ║
║ | _| | |\/| | / _ \ | || | ║
║ | |___| | | |/ ___ \ | || |___ ║
║ |_____|_| |_/_/ \_\___|_____| ║
║ ║
║ Best Practices ║
╚══════════════════════════════════════╝
Email Best Practices Skill
A comprehensive agent skill for building production-ready email systems. Covers everything from DNS authentication to webhook processing, with a focus on deliverability, compliance, and reliability.
Installation
npx skills add resend/email-best-practices
What This Skill Covers
Getting Started
- Planning which emails your app needs (password reset, verification, order confirmations)
- Setting up email authentication (SPF, DKIM, DMARC) so emails reach inboxes
Sending Emails
- Transactional email design (subject lines, content structure, mobile-first)
- Marketing email best practices (consent, segmentation, unsubscribe)
- Compliance requirements by region (CAN-SPAM, GDPR, CASL)
Production Infrastructure
- Idempotency and retry logic to prevent duplicates
- Webhook processing for delivery events
- Suppression lists and list hygiene automation
Structure
email-best-practices/
├── SKILL.md # Start here - routes to the right resource
└── resources/
├── deliverability.md # SPF/DKIM/DMARC, sender reputation
├── transactional-emails.md # Password resets, OTPs, confirmations
├── transactional-email-catalog.md # Email combinations by app type
├── marketing-emails.md # Newsletters, campaigns, consent
├── email-capture.md # Validation, verification, opt-in
├── compliance.md # CAN-SPAM, GDPR, CASL
├── email-types.md # Transactional vs marketing
├── sending-reliability.md # Idempotency, retry logic, errors
├── webhooks-events.md # Delivery events, webhook setup
└── list-management.md # Suppression lists, hygiene
Quick Start
Open SKILL.md - it has a routing table that directs you to the right resource based on what you need to do.
License
MIT
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.