email-assistant

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

智能邮件助手

AI-Powered Email Assistant

分析邮件内容,生成摘要,判断优先级和是否需要回复,并生成专业的回复草稿。
Analyzes email content, generates summaries, judges priority and whether a reply is needed, and creates professional reply drafts.

触发条件

Trigger Conditions

当用户说以下内容时启动此技能:
  • "帮我回这封邮件"
  • "分析这封邮件"
  • "邮件摘要"
  • "email reply"
  • "帮我写邮件回复"
  • "这封邮件怎么回"
  • "初始化邮件知识库"
  • "添加文档到知识库"
Activate this skill when the user says:
  • "Help me reply to this email"
  • "Analyze this email"
  • "Email summary"
  • "email reply"
  • "Help me write an email reply"
  • "How should I reply to this email"
  • "Initialize email knowledge base"
  • "Add document to knowledge base"

知识库功能

Knowledge Base Features

此技能支持 RAG(检索增强生成)知识库,提升回复质量:
功能说明
知识库初始化创建结构化的知识库目录
文档管理添加/更新/删除知识库文档
智能检索根据邮件内容检索相关信息
上下文注入将检索结果融入回复生成
This skill supports RAG (Retrieval-Augmented Generation) knowledge base to improve reply quality:
FeatureDescription
Knowledge Base InitializationCreate structured knowledge base directories
Document ManagementAdd/update/delete knowledge base documents
Intelligent RetrievalRetrieve relevant information based on email content
Context InjectionIntegrate retrieval results into reply generation

工作流程

Workflow

┌─────────────────────┐
│   输入邮件内容       │
│   (粘贴/文件)        │
└──────────┬──────────┘
┌─────────────────────┐
│   邮件内容解析       │
│   提取关键信息       │
└──────────┬──────────┘
┌─────────────────────┐
│   生成邮件摘要       │
│   (一句话概括)       │
└──────────┬──────────┘
┌─────────────────────┐
│   邮件分类判断       │
│   优先级/是否需回复   │
└──────────┬──────────┘
     ┌─────┴─────┐
     │           │
     ▼           ▼
┌─────────┐  ┌─────────┐
│ 需要回复 │  │ 无需回复 │
└────┬────┘  │ 标记完成 │
     │       └─────────┘
┌─────────────────────┐
│   RAG 知识库检索     │
│   (获取相关上下文)   │
└──────────┬──────────┘
┌─────────────────────┐
│   生成回复草稿       │
│   (结合知识库)       │
└──────────┬──────────┘
┌─────────────────────┐
│   回复质量审核       │
│   优化后输出         │
└─────────────────────┘
┌─────────────────────┐
│   Input Email Content       │
│   (Paste/File)        │
└──────────┬──────────┘
┌─────────────────────┐
│   Email Content Parsing       │
│   Extract Key Information       │
└──────────┬──────────┘
┌─────────────────────┐
│   Generate Email Summary       │
│   (One-sentence summary)       │
└──────────┬──────────┘
┌─────────────────────┐
│   Email Classification       │
│   Priority/Need for Reply   │
└──────────┬──────────┘
     ┌─────┴─────┐
     │           │
     ▼           ▼
┌─────────┐  ┌─────────┐
│ Needs Reply │  │ No Reply Needed │
└────┬────┘  │ Mark as Completed │
     │       └─────────┘
┌─────────────────────┐
│   RAG Knowledge Base Retrieval     │
│   (Obtain relevant context)   │
└──────────┬──────────┘
┌─────────────────────┐
│   Generate Reply Draft       │
│   (Combine with knowledge base)       │
└──────────┬──────────┘
┌─────────────────────┐
│   Reply Quality Review       │
│   Optimize and Output         │
└─────────────────────┘

执行步骤

Execution Steps

步骤 1:获取邮件内容

Step 1: Obtain Email Content

方式 A - 直接粘贴
用户: 帮我回这封邮件:
---
From: client@company.com
Subject: 关于Q1项目进度
...邮件内容...
方式 B - 文件读取
用户: 帮我分析这封邮件 /path/to/email.txt
Method A - Direct Paste:
User: Help me reply to this email:
---
From: client@company.com
Subject: Regarding Q1 Project Progress
...email content...
Method B - File Reading:
User: Help me analyze this email /path/to/email.txt

步骤 2:邮件内容解析

Step 2: Email Content Parsing

提取以下信息:
json
{
  "from": "发件人邮箱",
  "from_name": "发件人姓名",
  "to": "收件人",
  "subject": "邮件主题",
  "date": "发送时间",
  "body": "邮件正文",
  "attachments": ["附件列表"],
  "thread_context": "是否是回复/转发"
}
Extract the following information:
json
{
  "from": "Sender Email",
  "from_name": "Sender Name",
  "to": "Recipient",
  "subject": "Email Subject",
  "date": "Sending Time",
  "body": "Email Body",
  "attachments": ["Attachment List"],
  "thread_context": "Whether it's a reply/forward"
}

步骤 3:生成邮件摘要

Step 3: Generate Email Summary

摘要提示词
请用一句话概括这封邮件的核心内容:

【邮件主题】{subject}
【发件人】{from}
【邮件正文】
{body}

要求:
1. 不超过50字
2. 突出关键信息(时间、金额、请求等)
3. 使用陈述句

示例:
- "客户询问Q1项目进度并要求本周五前提交报告"
- "供应商通知下月起涨价15%,需确认是否续约"
- "HR提醒年假剩余5天,12月31日前需用完"
Summary Prompt:
Please summarize the core content of this email in one sentence:

【Email Subject】{subject}
【Sender】{from}
【Email Body】
{body}

Requirements:
1. No more than 50 words
2. Highlight key information (time, amount, requests, etc.)
3. Use declarative sentences

Examples:
- "Client inquires about Q1 project progress and requires report submission by this Friday"
- "Supplier notifies 15% price increase starting next month, needs confirmation on renewal"
- "HR reminds 5 days of annual leave remaining, must be used by December 31"

步骤 4:邮件分类

Step 4: Email Classification

分类维度
维度选项
类型询问/通知/请求/投诉/商务/个人/垃圾
优先级🔴紧急/🟡重要/🟢普通/⚪可忽略
是否需回复是/否
建议回复时间立即/今天内/本周内/不急
情绪积极/中性/消极/紧迫
分类提示词
分析这封邮件并分类:

【邮件摘要】{summary}
【邮件正文】{body}

输出 JSON 格式:
{
  "type": "询问|通知|请求|投诉|商务|个人|垃圾",
  "priority": "urgent|important|normal|low",
  "needs_reply": true|false,
  "reply_deadline": "立即|今天|本周|不急",
  "sender_emotion": "positive|neutral|negative|urgent",
  "key_asks": ["具体请求1", "具体请求2"],
  "reasoning": "分类理由"
}
Classification Dimensions:
DimensionOptions
TypeInquiry/Notification/Request/Complaint/Business/Personal/Spam
Priority🔴Urgent/🟡Important/🟢Normal/⚪Negligible
Needs ReplyYes/No
Suggested Reply TimeImmediate/Today/This Week/No Rush
EmotionPositive/Neutral/Negative/Urgent
Classification Prompt:
Analyze and classify this email:

【Email Summary】{summary}
【Email Body】{body}

Output in JSON format:
{
  "type": "inquiry|notification|request|complaint|business|personal|spam",
  "priority": "urgent|important|normal|low",
  "needs_reply": true|false,
  "reply_deadline": "immediate|today|this week|no rush",
  "sender_emotion": "positive|neutral|negative|urgent",
  "key_asks": ["Specific Request 1", "Specific Request 2"],
  "reasoning": "Classification Reason"
}

步骤 5:RAG 知识库检索(可选)

Step 5: RAG Knowledge Base Retrieval (Optional)

如果配置了知识库,在生成回复前检索相关信息:
知识库配置
知识库目录: ~/.claude/cache/email-assistant/knowledge-base/
支持的文档格式
  • .md
    - Markdown 文档
  • .txt
    - 纯文本文档
  • .pdf
    - PDF 文档(需 pdf-document 技能支持)
  • .docx
    - Word 文档
知识库初始化
首次使用时,用户可添加以下类型文档到知识库:
  1. 公司信息: 公司简介、产品说明、服务条款
  2. FAQ 文档: 常见问题和标准回复
  3. 历史邮件: 优秀回复案例
  4. 政策文档: 退款政策、隐私政策等
检索流程
1. 解析邮件关键词和主题
2. 在知识库中搜索相关文档
3. 提取最相关的 3-5 个片段
4. 将相关信息注入回复生成提示词
检索提示词
根据邮件内容,请从以下知识库片段中找出与回复相关的信息:

【邮件主题】{subject}
【关键请求】{key_asks}

【知识库片段】
{knowledge_snippets}

请提取:
1. 直接相关的信息点
2. 可引用的标准回复语
3. 相关政策或流程
If a knowledge base is configured, retrieve relevant information before generating replies:
Knowledge Base Configuration:
Knowledge Base Directory: ~/.claude/cache/email-assistant/knowledge-base/
Supported Document Formats:
  • .md
    - Markdown Documents
  • .txt
    - Plain Text Documents
  • .pdf
    - PDF Documents (requires pdf-document skill support)
  • .docx
    - Word Documents
Knowledge Base Initialization:
First-time users can add the following types of documents to the knowledge base:
  1. Company Information: Company profile, product descriptions, service terms
  2. FAQ Documents: Common questions and standard replies
  3. Historical Emails: Excellent reply examples
  4. Policy Documents: Refund policies, privacy policies, etc.
Retrieval Process:
1. Parse email keywords and subject
2. Search relevant documents in the knowledge base
3. Extract the most relevant 3-5 fragments
4. Inject relevant information into the reply generation prompt
Retrieval Prompt:
Based on the email content, find information relevant to the reply from the following knowledge base fragments:

【Email Subject】{subject}
【Key Requests】{key_asks}

【Knowledge Base Fragments】
{knowledge_snippets}

Please extract:
1. Directly relevant information points
2. Quotable standard reply phrases
3. Relevant policies or processes

步骤 6:生成回复草稿

Step 6: Generate Reply Draft

如果
needs_reply = true
,结合知识库生成回复:
回复生成提示词
请根据以下邮件生成专业的回复:

【原邮件】
发件人: {from}
主题: {subject}
正文: {body}

【邮件分析】
类型: {type}
关键请求: {key_asks}
发件人情绪: {sender_emotion}

【知识库参考】(如有)
{relevant_knowledge}

【回复要求】
1. 专业但不冷冰冰
2. 直接回应每个请求
3. 如无法满足,给出替代方案
4. 结尾有明确下一步
5. 长度适中(100-200字)
6. 如有知识库信息,准确引用

【我的角色】
{user_context} (如:产品经理、销售、客服等)

请生成回复,不需要写主题行。
If
needs_reply = true
, generate replies combined with the knowledge base:
Reply Generation Prompt:
Please generate a professional reply based on the following email:

【Original Email】
Sender: {from}
Subject: {subject}
Body: {body}

【Email Analysis】
Type: {type}
Key Requests: {key_asks}
Sender Emotion: {sender_emotion}

【Knowledge Base Reference】(if any)
{relevant_knowledge}

【Reply Requirements】
1. Professional but not cold
2. Directly respond to each request
3. Provide alternative solutions if unable to meet requests
4. Include clear next steps at the end
5. Moderate length (100-200 words)
6. Accurately cite knowledge base information if available

【My Role】
{user_context} (e.g., Product Manager, Sales, Customer Service, etc.)

Please generate the reply, no need to write the subject line.

步骤 7:回复质量审核

Step 7: Reply Quality Review

生成后进行自我审核:
请审核这封回复邮件:

【原邮件关键请求】
{key_asks}

【回复草稿】
{draft_reply}

审核维度:
1. 是否回应了所有请求?
2. 语气是否合适?
3. 是否有明确的下一步?
4. 是否有遗漏或歧义?

输出:
{
  "score": 8.5,
  "issues": ["未明确回复第二个问题"],
  "suggestions": ["加入对时间节点的确认"]
}
如果分数 < 8,优化后再输出。
Conduct self-review after generation:
Please review this reply email:

【Original Email Key Requests】
{key_asks}

【Reply Draft】
{draft_reply}

Review Dimensions:
1. Have all requests been addressed?
2. Is the tone appropriate?
3. Are there clear next steps?
4. Are there any omissions or ambiguities?

Output:
{
  "score": 8.5,
  "issues": ["Failed to clearly respond to the second question"],
  "suggestions": ["Add confirmation of the time node"]
}
If the score < 8, optimize before outputting.

步骤 8:输出结果

Step 8: Output Results

完整输出格式
markdown
undefined
Complete Output Format:
markdown
undefined

邮件分析报告

Email Analysis Report

📧 邮件概览

📧 Email Overview

项目内容
发件人{from_name} <{from}>
主题{subject}
时间{date}
类型{type}
优先级{priority_emoji} {priority}
ItemContent
Sender{from_name} <{from}>
Subject{subject}
Time{date}
Type{type}
Priority{priority_emoji} {priority}

📝 一句话摘要

📝 One-Sentence Summary

{summary}
{summary}

🏷️ 分类分析

🏷️ Classification Analysis

  • 是否需回复: {needs_reply}
  • 建议回复时间: {reply_deadline}
  • 发件人情绪: {sender_emotion}
  • 关键请求:
    1. {key_ask_1}
    2. {key_ask_2}

  • Needs Reply: {needs_reply}
  • Suggested Reply Time: {reply_deadline}
  • Sender Emotion: {sender_emotion}
  • Key Requests:
    1. {key_ask_1}
    2. {key_ask_2}

✉️ 建议回复

✉️ Suggested Reply

主题: Re: {subject}

{draft_reply}

Subject: Re: {subject}

{draft_reply}

💡 回复建议

💡 Reply Suggestions

  • 质量评分: {score}/10
  • 注意事项: {notes}

由 Claude Code email-assistant 技能生成
undefined
  • Quality Score: {score}/10
  • Notes: {notes}

Generated by Claude Code email-assistant skill
undefined

使用示例

Usage Examples

示例 1:分析并回复客户邮件

Example 1: Analyze and Reply to Client Email

用户: 帮我回这封邮件:
From: li.ming@client.com
Subject: 关于下周演示的确认

王总您好,

我们计划下周三下午2点在贵司进行产品演示,
请问会议室和投影设备是否已经准备好?
另外,参会人员名单能否提前发给我们?

谢谢!
李明

Claude:
📝 摘要: 客户确认下周三演示安排,需确认会议室和参会名单

🏷️ 分类: 请求 | 🟡重要 | 需今天回复

✉️ 建议回复:

李明您好,

感谢确认!下周三下午2点的演示安排已就绪:

1. 会议室:已预定3楼大会议室
2. 设备:投影仪和视频会议系统均已测试
3. 参会名单:我方将有产品、技术、商务共5人参加,
   名单今天下班前发您

如有其他需要,请随时联系。

祝好
User: Help me reply to this email:
From: li.ming@client.com
Subject: Confirmation Regarding Next Week's Demo

Dear Mr. Wang,

We plan to conduct a product demo at your company at 2 PM next Wednesday.
Could you please confirm if the conference room and projection equipment are ready?
Additionally, could you send us the participant list in advance?

Thank you!
Li Ming

Claude:
📝 Summary: Client confirms next Wednesday's demo arrangement, needs confirmation on conference room and participant list

🏷️ Classification: Request | 🟡Important | Need reply today

✉️ Suggested Reply:

Dear Li Ming,

Thank you for your confirmation! The demo arrangement at 2 PM next Wednesday is all set:

1. Conference Room: 3rd Floor Large Conference Room has been booked
2. Equipment: Projector and video conference system have been tested
3. Participant List: Our team will have 5 members from product, technical, and business departments attending,
   and we will send you the list before the end of today

Please feel free to contact us if you have any other needs.

Best regards

示例 2:批量处理邮件

Example 2: Batch Process Emails

用户: 帮我分析这5封邮件,告诉我哪些需要优先处理

Claude:
[分析5封邮件,输出优先级排序]
User: Help me analyze these 5 emails and tell me which ones need priority handling

Claude:
[Analyzes 5 emails and outputs priority ranking]

示例 3:特定角色回复

Example 3: Role-Specific Reply

用户: 帮我以客服身份回复这封投诉邮件

Claude:
[生成客服风格的道歉+解决方案回复]
User: Help me reply to this complaint email as a customer service representative

Claude:
[Generates customer service-style apology + solution reply]

邮件回复模板库

Email Reply Template Library

模板 1:确认收到

Template 1: Confirm Receipt

{name}您好,

邮件已收到,感谢告知。

{具体回应}

如有问题,随时联系。

祝好
Dear {name},

We have received your email, thank you for informing us.

{Specific Response}

Please feel free to contact us if you have any questions.

Best regards

模板 2:需要时间处理

Template 2: Need Time to Process

{name}您好,

感谢您的邮件。

关于{具体事项},我需要与{相关方}确认后回复您,
预计{时间}前给您答复。

如有紧急情况,可直接电话联系我。

祝好
Dear {name},

Thank you for your email.

Regarding {specific matter}, I need to confirm with {relevant party} before replying to you,
and I will give you a reply by {time}.

Please contact me directly by phone if it's an emergency.

Best regards

模板 3:礼貌拒绝

Template 3: Polite Rejection

{name}您好,

感谢您的{请求/邀请/提议}。

经过慎重考虑,{拒绝理由},因此这次无法{具体事项}。

{替代方案,如有}

感谢理解,期待未来有合作机会。

祝好
Dear {name},

Thank you for your {request/invitation/proposal}.

After careful consideration, {reason for rejection}, so we are unable to {specific matter} this time.

{Alternative solution, if any}

Thank you for your understanding, and we look forward to potential cooperation in the future.

Best regards

模板 4:跟进催促

Template 4: Follow-Up Reminder

{name}您好,

想跟进一下{具体事项}的进展。

上次沟通是在{日期},您提到{上次结论}。

请问目前进展如何?是否需要我这边配合什么?

期待您的回复。

祝好
Dear {name},

I'm following up on the progress of {specific matter}.

Our last communication was on {date}, and you mentioned {previous conclusion}.

Could you please update me on the current progress? Is there anything I can assist with?

Looking forward to your reply.

Best regards

数据存储

Data Storage

  • 邮件分析结果:
    ~/.claude/cache/email-assistant/
  • 文件命名:
    {YYYYMMDD}-{subject-slug}.md
  • 知识库目录:
    ~/.claude/cache/email-assistant/knowledge-base/
  • Email Analysis Results:
    ~/.claude/cache/email-assistant/
  • File Naming:
    {YYYYMMDD}-{subject-slug}.md
  • Knowledge Base Directory:
    ~/.claude/cache/email-assistant/knowledge-base/

知识库管理

Knowledge Base Management

初始化知识库

Initialize Knowledge Base

用户: 初始化邮件知识库

Claude:
1. 创建知识库目录
2. 添加示例文档结构
3. 提示用户添加自己的文档
User: Initialize email knowledge base

Claude:
1. Create knowledge base directory
2. Add sample document structure
3. Prompt user to add their own documents

添加文档到知识库

Add Document to Knowledge Base

用户: 把这个FAQ文档加入知识库 /path/to/faq.md

Claude:
1. 读取文档内容
2. 复制到知识库目录
3. 索引文档关键信息
4. 确认添加成功
User: Add this FAQ document to the knowledge base /path/to/faq.md

Claude:
1. Read document content
2. Copy to knowledge base directory
3. Index document key information
4. Confirm successful addition

知识库目录结构

Knowledge Base Directory Structure

~/.claude/cache/email-assistant/knowledge-base/
├── company/           # 公司信息
│   ├── about.md
│   └── products.md
├── faq/               # 常见问题
│   ├── general.md
│   └── technical.md
├── policies/          # 政策文档
│   ├── refund.md
│   └── privacy.md
├── templates/         # 回复模板
│   └── common-replies.md
└── history/           # 历史优秀回复
    └── examples.md
~/.claude/cache/email-assistant/knowledge-base/
├── company/           # Company Information
│   ├── about.md
│   └── products.md
├── faq/               # Frequently Asked Questions
│   ├── general.md
│   └── technical.md
├── policies/          # Policy Documents
│   ├── refund.md
│   └── privacy.md
├── templates/         # Reply Templates
│   └── common-replies.md
└── history/           # Historical Excellent Replies
    └── examples.md

知识库检索策略

Knowledge Base Retrieval Strategy

  1. 关键词匹配: 从邮件提取关键词,匹配文档标题和内容
  2. 语义搜索: 理解邮件意图,找到语义相关的文档片段
  3. 优先级排序: FAQ > 政策 > 模板 > 历史回复
  1. Keyword Matching: Extract keywords from emails to match document titles and content
  2. Semantic Search: Understand email intent to find semantically relevant document fragments
  3. Priority Ranking: FAQ > Policies > Templates > Historical Replies

依赖工具

Dependent Tools

  • Read: 读取邮件文件
  • Write: 保存分析结果
  • Glob: 搜索知识库文档
  • Grep: 在知识库中检索关键词
  • Read: Read email files
  • Write: Save analysis results
  • Glob: Search knowledge base documents
  • Grep: Retrieve keywords in knowledge base

最佳实践

Best Practices

提高回复效率

Improve Reply Efficiency

  • 先看摘要和优先级,决定处理顺序
  • 紧急邮件立即处理,普通邮件批量处理
  • 使用模板减少重复劳动
  • Check summary and priority first to determine processing order
  • Handle urgent emails immediately, process regular emails in batches
  • Use templates to reduce repetitive work

邮件礼仪

Email Etiquette

  • 24小时内回复商务邮件
  • 无法立即解决也要先确认收到
  • 避免全大写和过多感叹号
  • 检查收件人和抄送是否正确
  • Reply to business emails within 24 hours
  • Confirm receipt even if you can't resolve it immediately
  • Avoid all caps and excessive exclamation marks
  • Double-check recipients and cc list

避免常见错误

Avoid Common Mistakes

  • 不要回复时忘记附件
  • 不要在情绪激动时发送邮件
  • 不要使用模糊表述("尽快"改为"周五前")
  • Don't forget attachments when replying
  • Don't send emails when emotionally agitated
  • Don't use vague expressions (replace "as soon as possible" with "by Friday")

限制说明

Limitations

  • 此技能分析邮件并生成回复,不负责实际发送
  • 需要用户手动复制到邮件客户端发送
  • 涉及敏感信息的邮件请谨慎使用
  • 生成的回复建议人工审核后发送
  • This skill analyzes emails and generates replies, but does not handle actual sending
  • Users need to manually copy replies to email clients for sending
  • Use caution with emails involving sensitive information
  • Generated replies should be manually reviewed before sending

原始来源

Original Source

改编自 n8n 模板:
Adapted from n8n template: