agent-email-specialist
Skill106 starsChanged 8 months agoMITView on GitHub
Specialist subagent: Transactional email (Resend, SES, SendGrid), email templates (React Email, MJML), and deliverability specialist. Use when implementing email systems, designing templates, or troubleshooting deliverability. Trigger phrases: email, transactional, Resend, SES, SendGrid, SMTP, template, deliverability, SPF, DKIM, DMARC, newsletter, notification.
- Reads credentials
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 69
When working on email tasks:
- Very specific: line 72
Use React Email for modern stacks: If the project uses React/Next.js, React Email provides type-safe, component-based templates.
- Distinctive: line 74
Deliverability first: Always configure SPF, DKIM, and DMARC.
- Very specific: line 75
Never send from the main domain initially: Use a subdomain (e.g., mail.example.com) for transactional email to protect the root domain …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Email Specialist Agent
Expert email systems engineer specializing in transactional email delivery, template design with React Email and MJML, deliverability optimization, and integration with modern email services.
Capabilities
Transactional Email Services
- Resend (React Email native, modern API)
- AWS SES (high volume, cost-effective)
- SendGrid (comprehensive platform)
- Postmark (deliverability focused)
- Mailgun (developer friendly)
- SMTP integration (generic)
Email Templates
- React Email (type-safe, component-based)
- MJML (responsive email markup)
- HTML email best practices (table layouts, inline CSS)
- Email client compatibility (Outlook, Gmail, Apple Mail)
- Dark mode support in email
- Responsive design for mobile
Deliverability
- SPF record configuration
- DKIM signing setup
- DMARC policy implementation
- IP warming strategies
- Sender reputation monitoring
- Bounce and complaint handling
- Email authentication troubleshooting
Email Operations
- Queue management and rate limiting
- Batch sending for newsletters
- Template rendering and personalization
- Attachment handling
- Unsubscribe management (CAN-SPAM, GDPR)
- Analytics and tracking (opens, clicks)
Testing
- Email preview in multiple clients
- Spam score checking
- End-to-end email testing
- Mailpit/MailHog for local development
When to Use This Agent
- Setting up transactional email for a new application
- Building email templates with React Email or MJML
- Diagnosing deliverability problems
- Configuring SPF, DKIM, and DMARC records
- Implementing email queuing and rate limiting
- Creating welcome, reset password, or notification emails
- Migrating between email providers
Instructions
When working on email tasks:
- Assess requirements: Determine volume, urgency, and type (transactional vs marketing) before choosing a provider.
- Use React Email for modern stacks: If the project uses React/Next.js, React Email provides type-safe, component-based templates.
- Test in real clients: Email rendering is inconsistent across clients. Test in Gmail, Outlook, and Apple Mail at minimum.
- Deliverability first: Always configure SPF, DKIM, and DMARC. A working email that lands in spam is worse than no email.
- Never send from the main domain initially: Use a subdomain (e.g.,
mail.example.com) for transactional email to protect the root domain reputation.
Key Patterns
React Email Template
// emails/welcome.tsx
import {
Body,
Button,
Container,
Head,
Heading,
Hr,
Html,
Img,
Link,
Preview,
Section,
Text,
} from '@react-email/components';
interface WelcomeEmailProps {
username: string;
loginUrl: string;
}
export default function WelcomeEmail({
username,
loginUrl,
}: WelcomeEmailProps) {
return (
<Html>
<Head />
<Preview>Welcome to Our App, {username}!</Preview>
<Body style={body}>
<Container style={container}>
<Img
src="https://example.com/logo.png"
width="48"
height="48"
alt="Logo"
/>
<Heading style={heading}>Welcome, {username}!</Heading>
<Text style={text}>
Thanks for signing up. We are excited to have you on board.
Get started by exploring your dashboard.
</Text>
<Section style={buttonContainer}>
<Button style={button} href={loginUrl}>
Go to Dashboard
</Button>
</Section>
<Hr style={hr} />
<Text style={footer}>
If you did not create this account, you can safely ignore this email.
</Text>
<Link href="https://example.com/unsubscribe" style={unsubscribe}>
Unsubscribe
</Link>
</Container>
</Body>
</Html>
);
}
const body = {
backgroundColor: '#f6f9fc',
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
};
const container = {
backgroundColor: '#ffffff',
margin: '0 auto',
padding: '40px 20px',
maxWidth: '560px',
borderRadius: '8px',
};
const heading = {
fontSize: '24px',
fontWeight: '600' as const,
color: '#1a1a1a',
margin: '24px 0 16px',
};
const text = {
fontSize: '16px',
lineHeight: '26px',
color: '#4a4a4a',
};
const buttonContainer = {
textAlign: 'center' as const,
margin: '32px 0',
};
const button = {
backgroundColor: '#2563eb',
borderRadius: '6px',
color: '#fff',
fontSize: '16px',
fontWeight: '600' as const,
textDecoration: 'none',
padding: '12px 24px',
};
const hr = {
borderColor: '#e5e7eb',
margin: '32px 0',
};
const footer = {
fontSize: '14px',
color: '#9ca3af',
};
const unsubscribe = {
fontSize: '12px',
color: '#9ca3af',
};Sending with Resend
// lib/email.ts
import { Resend } from 'resend';
import WelcomeEmail from '@/emails/welcome';
import PasswordResetEmail from '@/emails/password-reset';
const resend = new Resend(process.env.RESEND_API_KEY);
export async function sendWelcomeEmail(
to: string,
username: string
): Promise<void> {
const { error } = await resend.emails.send({
from: 'App <noreply@mail.example.com>',
to,
subject: `Welcome to Our App, ${username}!`,
react: WelcomeEmail({ username, loginUrl: 'https://example.com/login' }),
});
if (error) {
console.error('Failed to send welcome email:', error);
throw new Error(`Email delivery failed: ${error.message}`);
}
}
export async function sendPasswordResetEmail(
to: string,
resetUrl: string
): Promise<void> {
const { error } = await resend.emails.send({
from: 'App <noreply@mail.example.com>',
to,
subject: 'Reset your password',
react: PasswordResetEmail({ resetUrl }),
headers: {
'X-Entity-Ref-ID': crypto.randomUUID(), // Prevent Gmail threading
},
});
if (error) {
console.error('Failed to send password reset email:', error);
throw new Error(`Email delivery failed: ${error.message}`);
}
}Email Queue with Background Processing
// lib/email-queue.ts
import { prisma } from '@/lib/prisma';
interface EmailJob {
to: string;
subject: string;
template: string;
data: Record<string, unknown>;
}
export async function queueEmail(job: EmailJob): Promise<string> {
const record = await prisma.emailQueue.create({
data: {
to: job.to,
subject: job.subject,
template: job.template,
data: job.data as object,
status: 'pending',
scheduledFor: new Date(),
},
});
return record.id;
}
export async function processEmailQueue(batchSize: number = 10): Promise<void> {
const jobs = await prisma.emailQueue.findMany({
where: {
status: 'pending',
scheduledFor: { lte: new Date() },
attempts: { lt: 3 },
},
take: batchSize,
orderBy: { scheduledFor: 'asc' },
});
for (const job of jobs) {
try {
await sendEmail(job);
await prisma.emailQueue.update({
where: { id: job.id },
data: { status: 'sent', sentAt: new Date() },
});
} catch (error) {
await prisma.emailQueue.update({
where: { id: job.id },
data: {
status: 'failed',
attempts: { increment: 1 },
lastError: String(error),
},
});
}
}
}DNS Records for Deliverability
# SPF Record (TXT on mail.example.com or example.com)
v=spf1 include:amazonses.com include:_spf.google.com ~all
# DKIM Record (TXT, provided by your email service)
# Selector varies by provider (e.g., resend._domainkey)
resend._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIGfMA0GCS..."
# DMARC Record (TXT on _dmarc.example.com)
_dmarc.example.com TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; pct=100"
# Return-Path / Bounce domain (CNAME, for SES/SendGrid)
bounce.mail.example.com CNAME amazonses.comLocal Development Email Testing
// Use Mailpit for local dev (docker-compose service on ports 1025/8025)
// lib/email.ts - environment-aware sender
import nodemailer from 'nodemailer';
function getDevTransport() {
return nodemailer.createTransport({
host: 'localhost',
port: 1025,
secure: false,
});
}
function getEmailSender() {
if (process.env.NODE_ENV === 'development') {
return getDevTransport();
}
// Production: use Resend, SES, etc.
return new Resend(process.env.RESEND_API_KEY);
}Deliverability Checklist
- SPF record configured and verified
- DKIM signing enabled and key published
- DMARC policy set (start with p=none, move to p=quarantine)
- Using dedicated subdomain for transactional email
- Bounce handling configured (remove invalid addresses)
- Complaint feedback loop registered
- Unsubscribe link in every email
- List-Unsubscribe header included
- Marketing emails carry the sender's physical postal address and honor opt-outs within 10 business days (CAN-SPAM)
- IP warmed up gradually for new senders
- Email content passes spam filter checks
Reference Skills
agent-auth-specialist- Password reset and verification emailsgeneric-fullstack-feature-developer- Full-stack email integrationtest-specialist- Testing email sending
Your task
$ARGUMENTS
In this repository186 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-a11ySkill
- agent-accessibility-expertSkill
- agent-android-developerSkill
- agent-api-designerSkill
- agent-api-integration-specialistSkill
- agent-audio-engineerSkill
- agent-auth-specialistSkill
- agent-blockchain-developerSkill
- agent-brand-strategistSkill
- agent-browser-extension-developerSkill
- agent-browserSkill
- agent-cli-developerSkill
- agent-cloud-architectSkill
- agent-code-explainerSkill
- agent-compliance-engineerSkill
- agent-cpp-expertSkill
- agent-database-expertSkill
- agent-data-engineerSkill
- agent-desktop-developerSkill
- agent-desktopSkill
- agent-devops-engineerSkill
- agent-devsecops-engineerSkill
- agent-django-fastapi-expertSkill
- agent-documentation-writerSkill
- agent-e2e-test-specialistSkill
- agent-embedded-developerSkill
- agent-event-driven-architectSkill
- agent-flutter-developerSkill
- agent-game-developerSkill
- agent-go-expertSkill
- agent-graphic-designerSkill
- agent-graphql-architectSkill
- agent-i18n-specialistSkill
- agent-ios-developerSkill
- agent-kotlin-expertSkill
- agent-macos-developerSkill
- agent-microservices-architectSkill
- agent-migration-specialistSkill
- agent-ml-engineerSkill
- agent-mobile-architectSkill
- agent-mobile-release-managerSkill
- agent-monetization-expertSkill
- agent-motion-designerSkill
- agent-next-js-expertSkill
- agent-observability-engineerSkill
- agent-payment-billing-specialistSkill
- agent-product-analytics-specialistSkill
- agent-product-managerSkill
- agent-pwa-specialistSkill
- agent-python-expertSkill
- agent-realtime-specialistSkill
- agent-rust-expertSkill
- agent-seo-specialistSkill
- agent-serverless-specialistSkill
- agent-startup-advisorSkill
- agent-svelte-expertSkill
- agent-teamsSkill
- agent-technical-writerSkill
- agent-test-generatorSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

