Loading...
Loading...
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.
npx skill4agent add yangliu2060/smith--skills email-assistant| 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 |
┌─────────────────────┐
│ 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 │
└─────────────────────┘User: Help me reply to this email:
---
From: client@company.com
Subject: Regarding Q1 Project Progress
...email content...User: Help me analyze this email /path/to/email.txt{
"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"
}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"| 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 |
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"
}Knowledge Base Directory: ~/.claude/cache/email-assistant/knowledge-base/.md.txt.pdf.docx1. 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 promptBased 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 processesneeds_reply = truePlease 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.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"]
}# 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*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 regardsUser: Help me analyze these 5 emails and tell me which ones need priority handling
Claude:
[Analyzes 5 emails and outputs priority ranking]User: Help me reply to this complaint email as a customer service representative
Claude:
[Generates customer service-style apology + solution reply]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 regardsDear {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 regardsDear {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 regardsDear {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~/.claude/cache/email-assistant/{YYYYMMDD}-{subject-slug}.md~/.claude/cache/email-assistant/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 documentsUser: 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~/.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