Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

resend

БесплатноЗапускает вложенные скриптыНе проверен

Use when working with the Resend email API — sending transactional emails (single or batch), receiving inbound emails via webhooks, managing email templates…

resendот resend★ 220 звёзд на GitHub

Об этом скилле

Resend

Quick Send — Node.js

import { Resend } from 'resend';

const resend = new Resend(process.env.RESEND_API_KEY);

const { data, error } = await resend.emails.send(
  {
    from: 'Acme <[email protected]>',
    to: ['[email protected]'],
    subject: 'Hello World',
    html: '<p>Email body here</p>',
  },
  { idempotencyKey: `welcome-email/${userId}` }
);

if (error) {
  console.error('Failed:', error.message);
  return;
}
console.log('Sent:', data.id);

Key gotcha: The Resend Node.js SDK does NOT throw exceptions — it returns { data, error }. Always check error explicitly instead of using try/catch for API errors.

Quick Send — Python

import resend
import os

resend.api_key = os.environ["RESEND_API_KEY"]

email = resend.Emails.send({
    "from": "Acme <[email protected]>",
    "to": ["[email protected]"],
    "subject": "Hello World",
    "html": "<p>Email body here</p>",
}, idempotency_key=f"welcome-email/{user_id}")

Single vs Batch Decision

Choose When
Single (POST /emails) 1 email, needs attachments, needs scheduling
Batch (POST /emails/batch) 2-100 distinct emails, no attachments, no scheduling

Batch is atomic — if one email fails validation, the entire batch fails. Always validate before sending. Batch does NOT support attachments or scheduled_at.

Idempotency Keys (Critical for Retries)

Prevent duplicate emails when retrying failed requests:

Key Facts
Format (single) <event-type>/<entity-id> (e.g., welcome-email/user-123)
Format (batch) batch-<event-type>/<batch-id> (e.g., batch-orders/batch-456)
Expiration 24 hours
Max length 256 characters
Same key + same payload Returns original response without resending
Same key + different payload Returns 409 error

Quick Receive (Node.js)

import { Resend } from 'resend';

const resend = new Resend(process.env.RESEND_API_KEY);

export async function POST(req: Request) {
  const payload = await req.text(); // Must use raw text, not req.json()

  const event = resend.webhooks.verify({
    payload,
    headers: {
      'svix-id': req.headers.get('svix-id'),
      'svix-timestamp': req.headers.get('svix-timestamp'),
      'svix-signature': req.headers.get('svix-signature'),
    },
    secret: process.env.RESEND_WEBHOOK_SECRET,
  });

  if (event.type === 'email.received') {
    // Webhook has metadata only — call API for body
    const { data: email } = await resend.emails.receiving.get(
      event.data.email_id
    );
    console.log(email.text);
  }

  return new Response('OK', { status: 200 });
}

Key gotcha: Webhook payloads do NOT contain the email body. You must call resend.emails.receiving.get() separately.

What Do You Need?

Task Reference
Send a single email sending/overview.md — parameters, deliverability, testing
Send batch emails sending/overview.md → sending/batch-email-examples.md
Full SDK examples (Node.js, Python, Go, cURL) sending/single-email-examples.md
Idempotency, retries, error handling sending/best-practices.md
Get, list, reschedule, cancel emails, retrieve metrics sending/email-management.md
Receive inbound emails receiving.md — domain setup, webhooks, attachments
Manage templates (CRUD, variables) templates.md — lifecycle, aliases, pagination
Set up webhooks (events, verification) webhooks.md — verification, CRUD, retry schedule, IP allowlist
Manage domains (create, verify, claim, DNS) domains.md — regions, TLS, tracking, claiming, capabilities
Manage contacts (CRUD, properties) contacts.md — segments, topics, custom properties, bulk CSV import
Send broadcasts (marketing campaigns) broadcasts.md — lifecycle, scheduling, template variables
Manage API keys api-keys.md — permission scoping, domain restrictions
View API request logs logs.md — list and retrieve API call history, debugging
Define contact properties contact-properties.md — custom fields for contacts
Manage segments (contact groups) segments.md — broadcast targeting, contact grouping
Manage topics (subscriptions) topics.md — opt-in/out preferences, broadcast filtering
Create automations (event-driven workflows) [a
Полный SKILL.md на GitHub

Установить resend в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/api-keys.mdreferences/automations.mdreferences/broadcasts.mdreferences/contact-properties.mdreferences/contacts.mdreferences/domains.mdreferences/events.mdreferences/fetch-all-templates.mjsreferences/inboxes.mdreferences/installation.mdreferences/logs.mdreferences/receiving.mdreferences/segments.mdreferences/sending/batch-email-examples.mdreferences/sending/best-practices.mdreferences/sending/email-management.mdreferences/sending/overview.mdreferences/sending/single-email-examples.mdreferences/templates.mdreferences/topics.mdreferences/usage.mdreferences/webhooks.md

FAQ

Что делает скилл resend?

Use when working with the Resend email API — sending transactional emails (single or batch), receiving inbound emails via webhooks, managing email templates, tracking delivery events, managing domains, contacts, broadcasts, webhooks, API keys, inboxes (threads, labels, drafts, replies), automations, events, viewing API request logs, checking account usage and quotas, or setting up the Resend SDK. Always use this skill when the user mentions Resend, even for simple tasks like "send an email with Resend" — the skill contains critical gotchas (idempotency keys, webhook verification, template variable syntax) that prevent common production issues.

Как установить скилл resend?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл resend запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить resend с