Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

email-resend重新发送电子邮件

Agent Skill

email-resend 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

214

周安装

9

GitHub Stars

2

下载量

75
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

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

简介

email-resend 集成 Resend 服务发送事务性邮件与通知消息。

  • 支持国际化模板与动态变量插入,适用于联系表单提交等场景。
  • 需配置 RESEND_API_KEY 与接收邮箱地址方可正常使用。
  • 发送前应预览模板渲染效果,避免敏感信息泄露风险。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Email with Resend

Environment Setup

# .env.local
RESEND_API_KEY=re_...
CONTACT_TO_EMAIL=hello@studioname.com

Resend Client

// lib/resend.ts
import { Resend } from 'resend';

export const resend = process.env.RESEND_API_KEY
  ? new Resend(process.env.RESEND_API_KEY)
  : null;

export function hasResend(): boolean {
  return resend !== null;
}

Contact Form Email

// lib/emails/contact.ts
import { resend } from '@/lib/resend';
import type { Locale } from '@/i18n.config';

interface ContactEmailParams {
  name: string;
  email: string;
  phone?: string;
  message: string;
  locale: Locale;
}

export async function sendContactEmail({
  name,
  email,
  phone,
  message,
  locale,
}: ContactEmailParams) {
  if (!resend) {
    console.log('Resend not configured, skipping email');
    return { success: false, error: 'Email not configured' };
  }

  const toEmail = process.env.CONTACT_TO_EMAIL!;

  try {
    await resend.emails.send({
      from: 'Studio Contact <noreply@studioname.com>',
      to: toEmail,
      replyTo: email,
      subject: `New Contact Form Submission from ${name}`,
      html: `
        <h2>New Contact Form Submission</h2>
        <p><strong>Name:</strong> ${name}</p>
        <p><strong>Email:</strong> ${email}</p>
        ${phone ? `<p><strong>Phone:</strong> ${phone}</p>` : ''}
        <p><strong>Message:</strong></p>
        <p>${message.replace(/\n/g, '<br>')}</p>
        <hr>
        <p><small>Submitted from: ${locale} locale</small></p>
      `,
    });

    return { success: true };
  } catch (error) {
    console.error('Failed to send email:', error);
    return { success: false, error: 'Failed to send email' };
  }
}

Booking Request Email

// lib/emails/booking.ts
import { resend } from '@/lib/resend';
import type { Locale } from '@/i18n.config';

interface BookingEmailParams {
  name: string;
  email: string;
  phone?: string;
  goals: string;
  experienceLevel: string;
  injuries?: string;
  preferredTimes: string;
  sessionType: 'in-person' | 'online';
  locale: Locale;
}

const subjectByLocale: Record<Locale, string> = {
  'pt-PT': 'Novo Pedido de Sessão',
  'en': 'New Booking Request',
  'tr': 'Yeni Rezervasyon Talebi',
  'es': 'Nueva Solicitud de Reserva',
  'fr': 'Nouvelle Demande de Réservation',
  'de': 'Neue Buchungsanfrage',
};

export async function sendBookingEmail(params: BookingEmailParams) {
  if (!resend) {
    console.log('Resend not configured, skipping email');
    return { success: false, error: 'Email not configured' };
  }

  const toEmail = process.env.CONTACT_TO_EMAIL!;

  try {
    // Email to studio
    await resend.emails.send({
      from: 'Studio Booking <noreply@studioname.com>',
      to: toEmail,
      replyTo: params.email,
      subject: `${subjectByLocale[params.locale]}: ${params.name}`,
      html: generateBookingHtml(params),
    });

    // Confirmation email to client
    await resend.emails.send({
      from: 'Studio Name <noreply@studioname.com>',
      to: params.email,
      subject: getConfirmationSubject(params.locale),
      html: generateConfirmationHtml(params),
    });

    return { success: true };
  } catch (error) {
    console.error('Failed to send booking email:', error);
    return { success: false, error: 'Failed to send email' };
  }
}

function generateBookingHtml(params: BookingEmailParams): string {
  return `
    <h2>New Booking Request</h2>
    <table style="border-collapse: collapse; width: 100%;">
      <tr>
        <td style="padding: 8px; border: 1px solid #ddd;"><strong>Name</strong></td>
        <td style="padding: 8px; border: 1px solid #ddd;">${params.name}</td>
      </tr>
      <tr>
        <td style="padding: 8px; border: 1px solid #ddd;"><strong>Email</strong></td>
        <td style="padding: 8px; border: 1px solid #ddd;">${params.email}</td>
      </tr>
      ${params.phone ? `
      <tr>
        <td style="padding: 8px; border: 1px solid #ddd;"><strong>Phone</strong></td>
        <td style="padding: 8px; border: 1px solid #ddd;">${params.phone}</td>
      </tr>
      ` : ''}
      <tr>
        <td style="padding: 8px; border: 1px solid #ddd;"><strong>Session Type</strong></td>
        <td style="padding: 8px; border: 1px solid #ddd;">${params.sessionType}</td>
      </tr>
      <tr>
        <td style="padding: 8px; border: 1px solid #ddd;"><strong>Experience</strong></td>
        <td style="padding: 8px; border: 1px solid #ddd;">${params.experienceLevel}</td>
      </tr>
      <tr>
        <td style="padding: 8px; border: 1px solid #ddd;"><strong>Goals</strong></td>
        <td style="padding: 8px; border: 1px solid #ddd;">${params.goals}</td>
      </tr>
      ${params.injuries ? `
      <tr>
        <td style="padding: 8px; border: 1px solid #ddd;"><strong>Injuries/Notes</strong></td>
        <td style="padding: 8px; border: 1px solid #ddd;">${params.injuries}</td>
      </tr>
      ` : ''}
      <tr>
        <td style="padding: 8px; border: 1px solid #ddd;"><strong>Preferred Times</strong></td>
        <td style="padding: 8px; border: 1px solid #ddd;">${params.preferredTimes}</td>
      </tr>
    </table>
    <p><small>Locale: ${params.locale}</small></p>
  `;
}

function getConfirmationSubject(locale: Locale): string {
  const subjects: Record<Locale, string> = {
    'pt-PT': 'Recebemos o seu pedido de sessão',
    'en': 'We received your booking request',
    'tr': 'Rezervasyon talebinizi aldık',
    'es': 'Recibimos tu solicitud de reserva',
    'fr': 'Nous avons reçu votre demande',
    'de': 'Wir haben Ihre Anfrage erhalten',
  };
  return subjects[locale];
}

function generateConfirmationHtml(params: BookingEmailParams): string {
  // Localized confirmation message
  return `
    <h2>Thank you for your booking request!</h2>
    <p>Hi ${params.name},</p>
    <p>We've received your request and will get back to you within 24 hours.</p>
    <p>Best regards,<br>Studio Name</p>
  `;
}

Server Action with Email

// lib/actions/contact.ts
'use server';

import { contactFormSchema } from '@/lib/validations';
import { sendContactEmail } from '@/lib/emails/contact';
import type { Locale } from '@/i18n.config';

export async function submitContactForm(formData: FormData, locale: Locale) {
  const rawData = {
    name: formData.get('name'),
    email: formData.get('email'),
    phone: formData.get('phone'),
    message: formData.get('message'),
  };

  const result = contactFormSchema.safeParse(rawData);

  if (!result.success) {
    return {
      success: false,
      errors: result.error.flatten().fieldErrors,
    };
  }

  const emailResult = await sendContactEmail({
    ...result.data,
    locale,
  });

  if (!emailResult.success) {
    return {
      success: false,
      errors: { _form: ['Failed to send message. Please try again.'] },
    };
  }

  return { success: true };
}

Fallback Without Resend

// When RESEND_API_KEY is not set
export function ContactForm() {
  const hasEmail = hasResend();

  if (!hasEmail) {
    return (
      <div className="text-center p-8">
        <p>Contact us directly at:</p>
        <a href="mailto:hello@studioname.com" className="text-primary">
          hello@studioname.com
        </a>
      </div>
    );
  }

  return <ContactFormWithEmail />;
}

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.33%
按下载量换算27

Claude

32.6%
按下载量换算24

Cursor

18.7%
按下载量换算14

Gemini CLI

9.41%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills