Skip to main content
skill CX Codex

email-best-practices — Claude Code skill: emails that get delivered

Resend's skill for coding agents: it walks through deliverability, consent, compliance and accessible markup before a message goes out.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add resend/resend-skills --skill email-best-practices -a claude-code
Open on GitHub

What email-best-practices does

Email fails in a lot of small ways, and this skill gives the agent a reference for each one before it writes code: authentication, consent, retries, bounce handling, accessible HTML. Everything ships as markdown under references/, and the agent opens the file that matches the task — deliverability, transactional emails, email capture, marketing, compliance, sending reliability, webhooks, list management, accessibility.

The diagram in SKILL.md traces one message end to end: validation, double opt-in, consent recorded, suppression check, idempotent send with retry, then webhook events for delivered, bounced, complained and opened. Bounces and complaints feed back into the suppression list, and list hygiene jobs follow. Read it as a checklist of the places your code needs a guard.

Getting spam complaints? Start with references/deliverability.md, because missing domain authentication is the usual cause and Gmail and Yahoo reject unauthenticated mail outright. The skill is documentation only and sends nothing for you, so DNS records and the mail API integration remain your job.

What it helps with

  • set up SPF, DKIM and DMARC so mail stops landing in spam
  • build a signup form with double opt-in and recorded consent
  • make sends idempotent and retry them after API errors
  • separate transactional messages from marketing campaigns
  • clean the list after bounces and complaints

Example prompts for the agent

  • Password reset emails are going to spam. Check domain authentication and set up SPF, DKIM and DMARC following references/deliverability.md.
  • Build a signup form with double opt-in: validate the address, record consent, check the suppression list before sending.
  • Sends keep timing out — add idempotency and retries, then handle the delivered, bounced and complained webhook events.

How to install email-best-practices

1Skills CLI (Vercel)

npx skills add resend/resend-skills --skill email-best-practices -a claude-code

2Manually: put the files in place

~/.claude/skills/email-best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/email-best-practices/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about email-best-practices

How do I install email-best-practices in Claude Code?

Run npx skills add resend/resend-skills --skill email-best-practices -a claude-code. The skill file lands at ~/.claude/skills/email-best-practices/SKILL.md.

What does email-best-practices do?

It hands the agent reference docs on deliverability, transactional and marketing email, email capture, compliance, webhooks and accessibility. The agent opens the file under references/ that fits the task and edits your project from it.

Does the skill cover accessibility and legal compliance?

Yes. references/accessibility.md goes through lang/dir, presentational tables, headings, alt text, <title> and contrast, and references/compliance.md covers CAN-SPAM, GDPR and CASL.

Source text

SKILL.md · MIT
---
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, making emails accessible (alt text, headings, contrast, screen readers), or deciding transactional vs marketing.
license: MIT
metadata:
  author: Resend
  version: "1.0.2"
  homepage: https://resend.com/agent-skills
  source: https://github.com/resend/email-best-practices
  openclaw:
    links:
      repository: https://github.com/resend/email-best-practices
      documentation: https://resend.com/docs/email-best-practices-skill
---

# 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](./references/deliverability.md) |
| Build password reset, OTP, confirmations | [Transactional Emails](./references/transactional-emails.md) |
| Plan which emails your app needs | [Transactional Email Catalog](./references/transactional-email-catalog.md) |
| Build newsletter signup, validate emails | [Email Capture](./references/email-capture.md) |
| Send newsletters, promotions | [Marketing Emails](./references/marketing-emails.md) |
| Ensure CAN-SPAM/GDPR/CASL compliance | [Compliance](./references/compliance.md) |
| Decide transactional vs marketing | [Email Types](./references/email-types.md) |
| Handle retries, idempotency, errors | [Sending Reliability](./references/sending-reliability.md) |
| Process delivery events, set up webhooks | [Webhooks & Events](./references/webhooks-events.md) |
| Manage bounces, complaints, suppression | [List Management](./references/list-management.md) |
| Make emails accessible (screen readers, alt text, contrast) | [Accessibility](./references/accessibility.md) |

## Start Here

**New app?**
Start with the [Catalog](./references/transactional-email-catalog.md) to plan which emails your app needs (password reset, verification, etc.), then set up [Deliverability](./references/deliverability.md) (DNS authentication) before sending your first email.

**Spam issues?**
Check [Deliverability](./references/deliverability.md) first—authentication problems are the most common cause. Gmail/Yahoo reject unauthenticated emails.

**Marketing emails?**
Follow this path: [Email Capture](./references/email-capture.md) (collect consent) → [Compliance](./references/compliance.md) (legal requirements) → [Marketing Emails](./references/marketing-emails.md) (best practices).

**Production-ready sending?**
Add reliability: [Sending Reliability](./references/sending-reliability.md) (retry + idempotency) → [Webhooks & Events](./references/webhooks-events.md) (track delivery) → [List Management](./references/list-management.md) (handle bounces).

**Accessibility?**
Most emails fail basic accessibility checks. See [Accessibility](./references/accessibility.md) for `lang`/`dir`, presentational tables, headings, alt text, `<title>`, and contrast.

© Resend · MIT · resend/resend-skills

Similar skills

Everything for Backend and APIs →

From the same set5

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor