Token导航 LogoToken导航

Agent Skill · 前端设计

send-email(发送电子邮件)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

send-email 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 817。

总安装 11,272周安装 465GitHub Stars 104下载 3,683核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:send-email(发送电子邮件)
来源仓库:https://github.com/resend/resend-skills
仓库路径:skills/send-email
安装命令:
npx skills add https://github.com/resend/resend-skills --skill send-email
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/resend/resend-skills --skill send-email

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

通过带有单个或批量端点的 Resend API 进行交易和批量电子邮件传送。

为带有附件或日程安排的单封电子邮件选择单一端点;在一个请求中使用批量端点处理 2-100 封不同的电子邮件,以减少 API 调用 实现幂等键(<event-type>/<entity-id> 格式)以防止重试时重复发送,并有 24 小时有效期 使用指数退避仅重试 429(速率限制)和 500(服务器错误)响应;修复 400/422 验证错误,无需重试 配置域级 SPF、DKIM、DMARC 记录并禁用事务性电子邮件的打开/点击跟踪,以最大限度地提高送达率 通过带有签名验证的 Webhooks 跟踪交付事件(已交付、退回、投诉、打开、点击);自动管理抑制地址

来源仓库内路径:skills/send-email

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/resend/resend-skills --skill send-email;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

send-email 怎么安装?

在终端执行 npx skills add https://github.com/resend/resend-skills --skill send-email。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

send-email 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

send-email 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

send-email 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

send-email 用的人多吗?

公开数据是累计安装 11,272 次,近一周安装 465 次,下载 3,683 次,GitHub 104 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

send-email 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
send-email

发送电子邮件 · 本页

11,272104接触敏感数据MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Send Email with Resend

Overview

Resend provides two endpoints for sending emails:

ApproachEndpointUse Case
SinglePOST /emailsIndividual transactional emails, emails with attachments, scheduled sends
BatchPOST /emails/batchMultiple distinct emails in one request (max 100), bulk notifications

Choose batch when:

  • Sending 2+ distinct emails at once
  • Reducing API calls is important (by default, rate limit is 2 requests per second)
  • No attachments or scheduling needed

Choose single when:

  • Sending one email
  • Email needs attachments
  • Email needs to be scheduled
  • Different recipients need different timing

Quick Start

  1. Detect project language from config files (package.json, requirements.txt, go.mod, etc.)
  2. Install SDK (preferred) or use cURL - See references/installation.md
  3. Choose single or batch based on the decision matrix above
  4. Implement best practices - Idempotency keys, error handling, retries

Best Practices (Critical for Production)

Always implement these for production email sending. See references/best-practices.md for complete implementations.

Idempotency Keys

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)
Expiration24 hours
Max length256 characters
Duplicate payloadReturns original response without resending
Different payloadReturns 409 error

Error Handling

CodeAction
400, 422Fix request parameters, don't retry
401, 403Check API key / verify domain, don't retry
409Idempotency conflict - use new key or fix payload
429Rate limited - retry with exponential backoff (by default, rate limit is 2 requests/second)
500Server error - retry with exponential backoff

Retry Strategy

  • Backoff: Exponential (1s, 2s, 4s...)
  • Max retries: 3-5 for most use cases
  • Only retry: 429 (rate limit) and 500 (server error)
  • Always use: Idempotency keys when retrying

Single Email

Endpoint: POST /emails (prefer SDK over cURL)

Required Parameters

ParameterTypeDescription
fromstringSender address. Format: "Name <email@domain.com>"
tostring[]Recipient addresses (max 50)
subjectstringEmail subject line
html or textstringEmail body content

Optional Parameters

ParameterTypeDescription
ccstring[]CC recipients
bccstring[]BCC recipients
reply_to*string[]Reply-to addresses
scheduled_at*stringSchedule send time (ISO 8601)
attachmentsarrayFile attachments (max 40MB total)
tagsarrayKey/value pairs for tracking (see Tags)
headersobjectCustom headers

*Parameter naming varies by SDK (e.g., replyTo in Node.js, reply_to in Python).

Minimal Example (Node.js)

import { Resend } from 'resend';

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

const { data, error } = await resend.emails.send(
  {
    from: 'Acme <onboarding@resend.dev>',
    to: ['delivered@resend.dev'],
    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);

See references/single-email-examples.md for all SDK implementations with error handling and retry logic.

Batch Email

Endpoint: POST /emails/batch (but prefer SDK over cURL)

Limitations

  • No attachments - Use single sends for emails with attachments
  • No scheduling - Use single sends for scheduled emails
  • Atomic - If one email fails validation, the entire batch fails
  • Max 100 emails per request
  • Max 50 recipients per individual email in the batch

Pre-validation

Since the entire batch fails on any validation error, validate all emails before sending:

  • Check required fields (from, to, subject, html/text)
  • Validate email formats
  • Ensure batch size <= 100

Minimal Example (Node.js)

import { Resend } from 'resend';

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

const { data, error } = await resend.batch.send(
  [
    {
      from: 'Acme <notifications@acme.com>',
      to: ['delivered@resend.dev'],
      subject: 'Order Shipped',
      html: '<p>Your order has shipped!</p>',
    },
    {
      from: 'Acme <notifications@acme.com>',
      to: ['delivered@resend.dev'],
      subject: 'Order Confirmed',
      html: '<p>Your order is confirmed!</p>',
    },
  ],
  { idempotencyKey: `batch-orders/${batchId}` }
);

if (error) {
  console.error('Batch failed:', error.message);
  return;
}
console.log('Sent:', data.map(e => e.id));

See references/batch-email-examples.md for all SDK implementations with validation, error handling, and retry logic.

Large Batches (100+ Emails)

For sends larger than 100 emails, chunk into multiple batch requests:

  1. Split into chunks of 100 emails each
  2. Use unique idempotency keys per chunk: <batch-prefix>/chunk-<index>
  3. Send chunks in parallel for better throughput
  4. Track results per chunk to handle partial failures

See references/batch-email-examples.md for complete chunking implementations.

Deliverability

Follow these practices to maximize inbox placement.

For more help with deliverability, install the email-best-practices skill with npx skills add resend/email-best-practices.

Required

PracticeWhy
Valid SPF, DKIM, DMARC recordauthenticate the email and prevent spoofing
Links match sending domainIf sending from @acme.com, link to https://acme.com - mismatched domains trigger spam filters
Include plain text versionUse both html and text parameters for accessibility and deliverability (Resend generates a plain text version if not provided)
Avoid "no-reply" addressesUse real addresses (e.g., support@) - improves trust signals
Keep body under 102KBGmail clips larger messages

Recommended

PracticeWhy
Use subdomainsSend transactional from notifications.acme.com, marketing from mail.acme.com - protects reputation
Disable tracking for transactionalOpen/click tracking can trigger spam filters for password resets, receipts, etc.

Tracking (Opens & Clicks)

Tracking is configured at the domain level in the Resend dashboard, not per-email.

SettingHow it worksRecommendation
Open trackingInserts 1x1 transparent pixelDisable for transactional emails - can hurt deliverability
Click trackingRewrites links through redirectDisable for sensitive emails (password resets, security alerts)

When to enable tracking:

  • Marketing emails where engagement metrics matter
  • Newsletters and announcements

When to disable tracking:

  • Transactional emails (receipts, confirmations, password resets)
  • Security-sensitive emails
  • When maximizing deliverability is priority

Configure via dashboard: Domain → Configuration → Click/Open Tracking

Webhooks (Event Notifications)

Track email delivery status in real-time using webhooks. Resend sends HTTP POST requests to your endpoint when events occur.

EventWhen to use
email.deliveredConfirm successful delivery
email.bouncedRemove from mailing list, alert user
email.complainedUnsubscribe user (spam complaint)
email.opened / email.clickedTrack engagement (marketing only)

Verify webhook signatures for every request. Without verification, anyone can send fake events to your endpoint.

See references/webhooks.md for setup, signature verification code, and all event types.

Tags

Tags are key/value pairs that help you track and filter emails.

tags: [
  { name: 'user_id', value: 'usr_123' },
  { name: 'email_type', value: 'welcome' },
  { name: 'plan', value: 'enterprise' }
]

Use cases:

  • Associate emails with customers in your system
  • Categorize by email type (welcome, receipt, password-reset)
  • Filter emails in the Resend dashboard
  • Correlate webhook events back to your application

Constraints: Tag names and values can only contain ASCII letters, numbers, underscores, or dashes. Max 256 characters each.

Templates

Use pre-built templates instead of sending HTML with each request.

const { data, error } = await resend.emails.send({
  from: 'Acme <hello@acme.com>',
  to: ['delivered@resend.dev'],
  subject: 'Welcome!',
  template: {
    id: 'tmpl_abc123',       // or alias: 'welcome-email'
    variables: {
      USER_NAME: 'John',     // Case-sensitive! Must match template exactly.
      ORDER_TOTAL: '$99.00'
    }
  }
});

Note: Variable names are case-sensitive and must match the template definition exactly. Any casing is valid — USER_NAME, userName, or user_name — as long as the send call uses the same casing as defined in the template.

FactDetail
Reserved namesFIRST_NAME, LAST_NAME, EMAIL, UNSUBSCRIBE_URL, contact, this
Fallback valuesOptional — if not set and variable missing at send time, send fails (422)
Can't combine withhtml, text, or react parameters
subject / fromTemplate defaults can be overridden per-send

Templates must be published before use. Draft templates cannot send.

To create, update, publish, or delete templates via API, use the templates skill.

Testing

Avoid testing with fake addresses at real email providers.

Using addresses like test@gmail.com, example@outlook.com, or fake@yahoo.com will:

  • Bounce - These addresses don't exist
  • Destroy your sender reputation - High bounce rates trigger spam filters
  • Get your domain blocklisted - Providers flag domains with high bounce rates

Safe Testing Options

MethodAddressResult
Delivereddelivered@resend.devSimulates successful delivery
Bouncedbounced@resend.devSimulates hard bounce
Complainedcomplained@resend.devSimulates spam complaint
Your own emailYour actual addressReal delivery test

For development: Use the resend.dev test addresses to simulate different scenarios without affecting your reputation.

For staging: Send to real addresses you control (team members, test accounts you own).

Domain Warm-up

New domains must gradually increase sending volume to establish reputation.

Why it matters: Sudden high volume from a new domain triggers spam filters. ISPs expect gradual growth.

Recommended Schedule

Existing domain

DayMessages per dayMessages per hour
1Up to 1,000 emails100 Maximum
2Up to 2,500 emails300 Maximum
3Up to 5,000 emails600 Maximum
4Up to 5,000 emails800 Maximum
5Up to 7,500 emails1,000 Maximum
6Up to 7,500 emails1,500 Maximum
7Up to 10,000 emails2,000 Maximum

New domain

DayMessages per dayMessages per hour
1Up to 150 emails
2Up to 250 emails
3Up to 400 emails
4Up to 700 emails50 Maximum
5Up to 1,000 emails75 Maximum
6Up to 1,500 emails100 Maximum
7Up to 2,000 emails150 Maximum

Monitor These Metrics

MetricTargetAction if exceeded
Bounce rate< 4%Slow down, clean list
Spam complaint rate< 0.08%Slow down, review content

Don't use third-party warm-up services. Focus on sending relevant content to real, engaged recipients.

Suppression List

Resend automatically manages a suppression list of addresses that should not receive emails.

Addresses are added when:

  • Email hard bounces (address doesn't exist)
  • Recipient marks email as spam
  • You manually add them via dashboard

What happens: Resend won't attempt delivery to suppressed addresses. The email.suppressed webhook event fires instead.

Why this matters: Continuing to send to bounced/complained addresses destroys your reputation. The suppression list protects you automatically.

Management: View and manage suppressed addresses in the Resend dashboard under Suppressions.

Common Mistakes

MistakeFix
Retrying without idempotency keyAlways include idempotency key - prevents duplicate sends on retry
Using batch for emails with attachmentsBatch doesn't support attachments - use single sends instead
Not validating batch before sendValidate all emails first - one invalid email fails the entire batch
Retrying 400/422 errorsThese are validation errors - fix the request, don't retry
Same idempotency key, different payloadReturns 409 error - use unique key per unique email content
Tracking enabled for transactional emailsDisable open/click tracking for password resets, receipts - hurts deliverability
Using "no-reply" sender addressUse real address like support@ - improves trust signals with email providers
Not verifying webhook signaturesAlways verify — unverified events can't be trusted
Testing with fake emails (test@gmail.com)Use delivered@resend.dev - fake addresses bounce and hurt reputation
Template variable name mismatchVariable names are case-sensitive — must match the template definition exactly. Any casing is valid; USER_NAME and firstName are both fine as long as the send call matches.
Sending high volume from new domainWarm up gradually - sudden spikes trigger spam filters

Notes

  • The from address must use a verified domain
  • If the sending address cannot receive replies, set the reply_to parameter to a valid address.
  • Store API key in RESEND_API_KEY environment variable
  • Node.js SDK supports react parameter for React Email components
  • Resend returns error, data, headers in the response.
  • Data returns {id: "email-id"} on success (single) or array of IDs (batch)
  • For marketing campaigns to large lists, use Resend Broadcasts instead

平台分布

Claude Code

30.98%
按下载量换算1,141

Cursor

24.6%
按下载量换算906

OpenCode

17.91%
按下载量换算660

Codex

14.09%
按下载量换算519

Gemini CLI

7.46%
按下载量换算275

Antigravity

3.41%
按下载量换算126

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills