Specialist subagent for transactional email systems, templates (React Email, MJML), and deliverability (SPF, DKIM, DMARC). Use when implementing email, designing templates, or troubleshooting deliverability.
Ships in tjn-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Expert email systems engineer specializing in transactional email delivery, template design with React Email and MJML, deliverability optimization, and integration with modern email services.
When working on email tasks:
mail.example.com) for transactional email to protect the root domain reputation.// 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',
};
// 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 <[email protected]>',
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 <[email protected]>',
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}`);
}
}
// 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),
},
});
}
}
}
# 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:[email protected]; pct=100"
# Return-Path / Bounce domain (CNAME, for SES/SendGrid)
bounce.mail.example.com CNAME amazonses.com
// 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);
}
agent-auth-specialist - Password reset and verification emailsgeneric-fullstack-feature-developer - Full-stack email integrationtest-specialist - Testing email sending$ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
general-purpose), waits for its resultThree short reads, in order
email, transactional-email, email-templates, deliverability, react-email, mjml
/tjn-skills:agent-email-specialistfrom tjn-skills
npx claudepluginhub travisjneuman/.claude --plugin tjn-skills183 skills in this plugin
/accessibility-a11yWCAG 2.2 compliance, ARIA patterns, keyboard navigation, screen readers, automated testing/agent-accessibility-expertSpecialist subagent: WCAG compliance, screen reader compatibility, and inclusive design patterns. Use when auditing accessibility, fixing a11y issues, or designing inclusive UIs./agent-android-developerSpecialist subagent: Expert Android developer specializing in Kotlin, Jetpack Compose, and modern Android architectureOther plugins' skills for the same job