email-assistant
Original:🇨🇳 Chinese
Translated
AI Intelligent Email Assistant that analyzes email content to generate summaries, determines whether a reply is needed, and creates professional reply drafts based on context.
9installs
Added on
NPX Install
npx skill4agent add yangliu2060/smith--skills email-assistantTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →AI-Powered Email Assistant
Analyzes email content, generates summaries, judges priority and whether a reply is needed, and creates professional reply drafts.
Trigger Conditions
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
This skill supports RAG (Retrieval-Augmented Generation) knowledge base to improve reply quality:
| Feature | Description |
|---|---|
| Knowledge Base Initialization | Create structured knowledge base directories |
| Document Management | Add/update/delete knowledge base documents |
| Intelligent Retrieval | Retrieve relevant information based on email content |
| Context Injection | Integrate retrieval results into reply generation |
Workflow
┌─────────────────────┐
│ 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
Step 1: Obtain Email Content
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.txtStep 2: Email Content Parsing
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"
}Step 3: Generate Email Summary
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"Step 4: Email Classification
Classification Dimensions:
| Dimension | Options |
|---|---|
| Type | Inquiry/Notification/Request/Complaint/Business/Personal/Spam |
| Priority | 🔴Urgent/🟡Important/🟢Normal/⚪Negligible |
| Needs Reply | Yes/No |
| Suggested Reply Time | Immediate/Today/This Week/No Rush |
| Emotion | Positive/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"
}Step 5: RAG Knowledge Base Retrieval (Optional)
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:
- - Markdown Documents
.md - - Plain Text Documents
.txt - - PDF Documents (requires pdf-document skill support)
.pdf - - Word Documents
.docx
Knowledge Base Initialization:
First-time users can add the following types of documents to the knowledge base:
- Company Information: Company profile, product descriptions, service terms
- FAQ Documents: Common questions and standard replies
- Historical Emails: Excellent reply examples
- 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 promptRetrieval 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 processesStep 6: Generate Reply Draft
If , generate replies combined with the knowledge base:
needs_reply = trueReply 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.Step 7: Reply Quality Review
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.
Step 8: Output Results
Complete Output Format:
markdown
# Email Analysis Report
## 📧 Email Overview
| Item | Content |
|------|------|
| Sender | {from_name} <{from}> |
| Subject | {subject} |
| Time | {date} |
| Type | {type} |
| Priority | {priority_emoji} {priority} |
## 📝 One-Sentence Summary
> {summary}
## 🏷️ Classification Analysis
- **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
**Subject**: Re: {subject}
---
{draft_reply}
---
## 💡 Reply Suggestions
- Quality Score: {score}/10
- Notes: {notes}
---
*Generated by Claude Code email-assistant skill*Usage Examples
Example 1: Analyze and Reply to Client Email
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 regardsExample 2: Batch Process Emails
User: Help me analyze these 5 emails and tell me which ones need priority handling
Claude:
[Analyzes 5 emails and outputs priority ranking]Example 3: Role-Specific Reply
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
Template 1: Confirm Receipt
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 regardsTemplate 2: Need Time to Process
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 regardsTemplate 3: Polite Rejection
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 regardsTemplate 4: Follow-Up Reminder
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 regardsData Storage
- 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
User: Initialize email knowledge base
Claude:
1. Create knowledge base directory
2. Add sample document structure
3. Prompt user to add their own documentsAdd Document to Knowledge Base
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 additionKnowledge Base Directory Structure
~/.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.mdKnowledge Base Retrieval Strategy
- Keyword Matching: Extract keywords from emails to match document titles and content
- Semantic Search: Understand email intent to find semantically relevant document fragments
- Priority Ranking: FAQ > Policies > Templates > Historical Replies
Dependent Tools
- 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
- 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
Adapted from n8n template:
- Template ID: 2852
- Original Name: AI-Powered Email Automation for Business: Summarize & Respond with RAG
- Link: https://n8n.io/workflows/2852