/saas-builder:saas-emailfrom saas-builder
Set up the email infrastructure for a SaaS application. Covers Resend and Mailgun integration, DNS configuration (SPF, DKIM, DMARC), and transactional email templates. Use this skill when the user wants to send emails, configure a custom domain for email, or set up email templates.
Ships in saas-builder. 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.
This skill covers transactional email infrastructure for a SaaS application.
| Resend | Mailgun | |
|---|---|---|
| Free tier | 3,000 emails/month | 1,000 emails/day |
| API style | Modern, simple | Mature, feature-rich |
| React Email | Native support | Template builder |
| Best for | Next.js SaaS, simple transactional | High volume, inbound email |
Recommendation: Resend for most Next.js projects.
.env.local:
RESEND_API_KEY=re_...
[email protected]
npm install resend @react-email/components
Three DNS records are required for good deliverability:
SPF — Authorises your email provider to send on behalf of your domain:
Type: TXT
Name: @
Value: v=spf1 include:amazonses.com ~all
(Resend will give you the exact value)
DKIM — Adds a cryptographic signature to emails:
Type: CNAME
Name: resend._domainkey
Value: resend._domainkey.resend.com
DMARC — Policy for handling emails that fail SPF/DKIM:
Type: TXT
Name: _dmarc
Value: v=DMARC1; p=none; rua=mailto:[email protected]
DNS changes take 24–48 hours to propagate. Add these records on day one.
// emails/welcome.tsx
import { Html, Head, Body, Container, Text, Button } from '@react-email/components'
interface WelcomeEmailProps {
name: string
loginUrl: string
}
export function WelcomeEmail({ name, loginUrl }: WelcomeEmailProps) {
return (
<Html>
<Head />
<Body style={{ fontFamily: 'sans-serif' }}>
<Container>
<Text>Hi {name},</Text>
<Text>Welcome! Your account is ready.</Text>
<Button href={loginUrl}>Go to Dashboard</Button>
</Container>
</Body>
</Html>
)
}
// lib/email.ts
import { Resend } from 'resend'
import { WelcomeEmail } from '@/emails/welcome'
const resend = new Resend(process.env.RESEND_API_KEY)
export async function sendWelcomeEmail(to: string, name: string) {
await resend.emails.send({
from: process.env.EMAIL_FROM!,
to,
subject: 'Welcome!',
react: <WelcomeEmail name={name} loginUrl={`${process.env.NEXT_PUBLIC_URL}/dashboard`} />,
})
}
export async function sendPaymentConfirmation(to: string, amount: number) {
await resend.emails.send({
from: process.env.EMAIL_FROM!,
to,
subject: 'Payment confirmed',
react: <PaymentConfirmationEmail amount={amount} />,
})
}
Send emails from Stripe webhook events:
// In the webhook handler
case 'checkout.session.completed': {
const session = event.data.object as Stripe.CheckoutSession
if (session.customer_email) {
await sendPaymentConfirmation(session.customer_email, session.amount_total! / 100)
}
break
}
mail.yourdomain.com) to protect your main domain's reputationfrom address must match a verified domain in ResendWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub carriegale2710/skills-library --plugin saas-builder12 skills in this plugin
/saas-analyticsSet up PostHog analytics and product analysis for a SaaS application. Event tracking, user identification, feature flags, session replay, funnel analysis, and privacy-compliant configuration. Use this skill when the user wants anything related to user analytics, PostHog, event tracking, user behaviour, feature flags, A/B testing, conversion analysis, or metric tracking. Phrases like "set up analytics", "track users", "add PostHog", "create a feature flag" trigger this skill.
/saas-api-securitySet up an API security layer for a SaaS application. Rate limiting, plan-based access control, input validation, error handling, CORS, and health checks. Use this skill when the user wants anything related to API security, rate limiting, authorisation, input validation, error handling, or API protection. Phrases like "secure the API", "add rate limiting", "check the plan", "input validation" trigger this skill.
/saas-authSet up the authentication layer of a SaaS application. Covers Google OAuth, Magic Link, email/password login, JWT session management, and middleware for protected routes. Use this skill when the user wants to add authentication, set up login, or configure user sessions.
Other plugins' skills for the same job