agentleFS
Rikinshah787Rikinshah787/agent-skills-production-skills/skills/resend/SKILL.md

resend

Skill2 starsChanged 4 months agoMITView on GitHub

Use to send transactional email from Node.js with verified domains, React Email templates, idempotent retries, scheduling, and delivery tracking.

  • Reads credentials
  • Installs packages

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when: sending password resets, receipts, verification links, alerts, or onboarding emails.

    line 21
  2. Distinctive:

    Use when: you want React Email templates and a straightforward HTTP email API.

    line 22
  3. Distinctive:

    Don't use for: a full marketing automation platform with complex campaign journeys.

    line 23
  4. Very specific:

    Create the key in Resend and add a domain you own.

    line 36
  5. Distinctive:

    Use these test recipients instead of fake addresses that can damage sending reputation.

    line 98
  6. Distinctive:

    Do not put secrets or sensitive personal data in email tags, logs, or idempotency keys.

    line 125

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Resend - Skillship

Send transactional email through a small Node.js SDK, with domain verification, React templates, scheduling, delivery events, and safe retries.

🧭 When to use this skill

  • Use when: sending password resets, receipts, verification links, alerts, or onboarding emails.
  • Use when: you want React Email templates and a straightforward HTTP email API.
  • Don't use for: a full marketing automation platform with complex campaign journeys.

⚡ Quickstart

1. Install

npm install resend

2. Configure

RESEND_API_KEY=re_xxxxxxxxx

Create the key in Resend and add a domain you own. onboarding@resend.dev is test-only; production senders must use a verified domain.

3. Send from server code

import "server-only";
import { Resend } from "resend";

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

export async function sendWelcomeEmail(user: { id: string; email: string }) {
  const { data, error } = await resend.emails.send(
    {
      from: "Acme <hello@updates.example.com>",
      to: [user.email],
      subject: "Welcome to Acme",
      html: "<strong>Welcome!</strong>",
    },
    { idempotencyKey: `welcome-user/${user.id}` },
  );

  if (error) throw new Error(error.message);
  return data.id;
}

🧩 Common recipes

Recipe: React Email template

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: "Acme <hello@updates.example.com>",
  to: ["person@example.com"],
  subject: "Welcome",
  react: WelcomeEmail({ name: "Ada" }),
});

Recipe: Schedule an email

await resend.emails.send({
  from: "Acme <reminders@updates.example.com>",
  to: ["person@example.com"],
  subject: "Your appointment",
  text: "Your appointment is tomorrow.",
  scheduledAt: "2026-08-11T09:00:00Z",
});

Emails can be scheduled up to 30 days ahead using ISO 8601 or supported natural-language times.

Recipe: Test delivery outcomes safely

delivered@resend.dev
bounced@resend.dev
complained@resend.dev
suppressed@resend.dev

Use these test recipients instead of fake addresses that can damage sending reputation.

Recipe: Track internal metadata

await resend.emails.send({
  from: "Acme <billing@updates.example.com>",
  to: ["person@example.com"],
  subject: "Receipt",
  text: "Payment received.",
  tags: [
    { name: "category", value: "receipt" },
    { name: "order_id", value: "order_123" },
  ],
});

🚀 Ship to production

  • Sending domain is verified; production never sends from onboarding@resend.dev.
  • Send from a dedicated subdomain to isolate transactional reputation from marketing mail.
  • SPF/DKIM DNS records pass and DMARC is configured for the domain.
  • Every retryable business event has a stable idempotency key (maximum 256 characters, retained 24 hours).
  • Bounces, complaints, and suppressions are monitored and respected.
  • Rate limits are handled with backoff (default is 10 requests per second per team).

🔐 Security & secrets

  • RESEND_API_KEY is server-only. Never expose it in browser code or a public environment variable.
  • Scope API keys to the minimum required permission/domain when available and rotate leaked keys.
  • Do not put secrets or sensitive personal data in email tags, logs, or idempotency keys.

🐛 Common errors & fixes

SymptomLikely causeFix
validation_error for senderfrom domain is not verifiedVerify DNS and send from an address on that domain
Duplicate email after a retryNo stable idempotency keyPass { idempotencyKey } as the second SDK argument
invalid_idempotent_requestSame key reused with a different payloadKeep the payload stable or use a new event key
429 responseTeam rate limit exceededRetry with exponential backoff or request a limit increase
SDK returns no message ID{ error } was ignoredCheck both data and error from every send

💰 Pricing gotchas

  • Quotas, retention, and overage rules depend on the plan. Monitor volume plus bounce/complaint rates before large sends.

📚 Sources

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.