resend
БесплатноБез исполняемых скриптовНе проверенResend is an email API for developers: send transactional and marketing email from Node.js, Python and other SDKs, with React Email templates, webhooks for…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Resend — Modern Email API for Developers
Overview
Resend sends email over a REST API with official SDKs (Node.js, Python, Go, Ruby, PHP, Java, .NET, Rust). Templates can be written as React components with React Email, delivery events arrive as signed webhooks, and marketing mail goes out as broadcasts to a segment of contacts. This skill covers the Node.js SDK (resend 6.x) as of October 2026.
Instructions
Install and authenticate
npm install resend react react-dom
npm install react-email # templates and the preview server
Create an API key in the Resend dashboard and keep it in RESEND_API_KEY. Verify a sending domain at resend.com/domains (SPF and DKIM records) before production; [email protected] is for testing only.
Send an email
The SDK does not throw on API errors; it returns { data, error }. Node parameter names are camelCase (scheduledAt, replyTo).
import { Resend } from "resend";
import { WelcomeEmail } from "@/emails/welcome";
const resend = new Resend(process.env.RESEND_API_KEY);
const { data, error } = await resend.emails.send({
from: "Northwind <[email protected]>",
to: "[email protected]",
subject: "Welcome to Northwind",
react: WelcomeEmail({ name: "Maria", loginUrl: "https://app.northwind.io/login" }),
});
if (error) throw new Error(`Resend: ${error.message}`);
console.log(data.id); // e.g. "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
Pass the component as a function call (WelcomeEmail({...})), not as JSX. Other content options are html, text, or a stored template ({ id, variables }). Extras: cc, bcc, replyTo, headers, tags (name and value use only letters, numbers, _ and -), attachments (filename plus content or path), and scheduledAt (ISO 8601 or text such as "in 1 hour").
Batch sending
const { data, error } = await resend.batch.send(
users.map((u) => ({
from: "Northwind <[email protected]>",
to: u.email,
subject: "Your weekly digest",
react: DigestEmail({ items: u.items }),
})),
);
// data.data[i].id matches payload[i]
A batch holds up to 100 emails. Each email can set its own scheduledAt (up to 30 days ahead); attachments are not supported in batch requests.
React Email templates
// emails/welcome.tsx
import { Html, Head, Body, Container, Heading, Text, Button, Hr } from "react-email";
export function WelcomeEmail({ name, loginUrl }: { name: string; loginUrl: string }) {
return (
<Html>
<Head />
<Body style={{ fontFamily: "Arial, sans-serif", backgroundColor: "#f4f4f5" }}>
<Container style={{ maxWidth: 600, padding: 20, backgroundColor: "#ffffff" }}>
<Heading as="h1">Welcome, {name}</Heading>
<Text>Your workspace is ready.</Text>
<Button href={loginUrl} style={{ backgroundColor: "#000", color: "#fff", padding: "12px 24px" }}>
Open Northwind
</Button>
<Hr />
<Text style={{ fontSize: 12, color: "#666" }}>Did not sign up? Ignore this email.</Text>
</Container>
</Body>
</Html>
);
}
Preview in the browser with npx email dev (serves templates from emails/ on localhost:3000). The older @react-email/components package is deprecated on npm; import components from react-email.
Webhooks
Add an endpoint in the dashboard and store its signing secret as RESEND_WEBHOOK_SECRET. Verify against the raw body, not parsed JSON:
export async function POST(req: Request) {
const payload = await req.text();
try {
const event = resend.webhooks.verify({
payload,
headers: {
id: req.headers.get("svix-id")!,
timestamp: req.headers.get("svix-timestamp")!,
signature: req.headers.get("svix-signature")!,
},
webhookSecret: process.env.RESEND_WEBHOOK_SECRET!,
});
if (event.type === "email.bounced") await markUndeliverable(event.data.to);
} catch {
return new Response("Invalid webhook", { status: 400 });
}
return new Response("ok");
}
Email events: email.sent, email.scheduled, email.delivered, email.delivery_delayed, email.bounced, email.complained, email.suppressed, email.failed, email.opened, email.clicked, email.received.
Contacts and broadcasts
Contacts are global to the account and are grouped into segments (the older "audiences" are replaced by segments and topics).
await resend.contacts.create({ email: "[email protected]", firstName: "Steve", unsubscribed: false });
await resend.broadcasts.create({
segmentId: "78261eea-8f8b-4381-83c6-79fa7120f1cf",
from: "Northwind <[email protected]>",
subject: "October release notes",
html: "Hi {{{contact.first_name|there}}}, read the notes. Unsubscribe: {{{RESEND_UNSUBSCRIBE_URL}}}",
send: true,
});
Leave out send: true to save a draft.
Examples
Example 1: Send an invoice with
Установить resend в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл resend?
Resend is an email API for developers: send transactional and marketing email from Node.js, Python and other SDKs, with React Email templates, webhooks for delivery events, batch sending and contact broadcasts. Use when someone asks to "send an email with Resend", "set up Resend webhooks", "build a React Email template", "send a batch of emails" or to move off SendGrid or Mailgun.
Как установить скилл resend?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл resend запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic