用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill process-emails命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | process-emails |
| description | Process pending Brikette customer emails and generate draft responses using MCP tools |
Process customer emails for Hostel Brikette, generating intelligent draft responses using the knowledge base and MCP tools.
Run this skill when you want to process customer inquiry emails for Brikette:
First, run an inbox organize pass for unread emails. This does a garbage/sort cycle:
Brikette/Inbox/Needs-ProcessingOrganizing unread inbox...
Call the tool:
gmail_organize_inbox({ limit: 500 })
Then briefly report the result:
Use the gmail_list_pending MCP tool to fetch pending emails:
gmail_list_pending({ limit: 20 })
If no pending emails, inform the user:
No pending emails in your queue. You're all caught up!
Present emails in a summary table:
## Pending Emails (N total)
| # | From | Subject | Received | Type |
|---|------|---------|----------|------|
| 1 | maria@example.com | Availability June 15-18? | 2h ago | Inquiry |
| 2 | john@example.com | RE: Booking confirmation | 4h ago | Reply |
...
Actions:
- "Process all" - work through queue in order
- "Process #1" - handle specific email
- "Skip #3" - mark as spam/not-customer
- "Defer #5" - move to deferred manual-review label
- "Done" - finish session
Classify emails by type:
Needs Draft Response:
No Draft Needed:
Special Handling:
When user selects an email to process:
Fetch full details using gmail_get_email:
gmail_get_email({ emailId: "...", includeThread: true })
Run Interpretation stage using draft_interpret:
draft_interpret({
body: email.body.plain,
subject: email.subject,
threadContext: email.thread_context
})
Output: EmailActionPlan (intents, scenario, agreement status, workflow triggers).
Review the Action Plan:
scenario.categorydeferred (manual review)Run Composition stage using draft_generate:
draft_generate({
actionPlan,
subject: email.subject,
recipientName: email.from.name,
prepaymentStep: "first" | "second" | "third" | "success",
prepaymentProvider: "octorate" | "hostelworld"
})
Output: draft (plain + HTML), template_used, answered_questions, knowledge_sources.
Run Quality Gate using draft_quality_check:
Create draft (for Inquiry/Reply/FAQ):
gmail_create_draft({
emailId: "original_email_id",
subject: "RE: Original Subject",
bodyPlain: "Plain text version",
bodyHtml: "HTML version with branding"
})
gmail_mark_processed({ emailId: "...", action: "drafted" })
Edit request:
Acknowledge (for Informational emails - no draft needed):
gmail_mark_processed({ emailId: "...", action: "acknowledged" })
Use when customer provides info but no reply is needed:
Promotional (for marketing/newsletters):
gmail_mark_processed({ emailId: "...", action: "promotional" })
Archives email and labels Brikette/Promotional for batch review later.
Use for:
When a promotional/spam false-positive appears in queue:
promotional or spam immediately.packages/mcp-server/src/tools/gmail.ts (NON_CUSTOMER_* constants) so future organize runs stop queueing it.Skip (not relevant/not customer):
gmail_mark_processed({ emailId: "...", action: "skipped" })
Spam (suspicious/unwanted):
gmail_mark_processed({ emailId: "...", action: "spam" })
Defer (complex/needs more info):
gmail_mark_processed({ emailId: "...", action: "deferred" })
Moves it out of the active queue and labels it Brikette/Inbox/Deferred for manual follow-up.
Agreement detection is high-stakes:
confirmed only for explicit agreement phrases (EN/IT/ES).likely or unclear requires human confirmation before any payment workflow.agreement.requires_human_confirmation.If the email includes agreement and questions, treat as mixed response:
likely/unclear.When an email is classified as Informational (customer providing info, no reply needed):
## Email #3: Customer Information
**From:** John Smith <john@example.com>
**Subject:** RE: Booking confirmation
**Received:** 1 hour ago
### Content:
> Thanks for confirming! Just to let you know, we'll be arriving
> around 3pm. See you then!
### Classification:
- **Type:** Informational (arrival time notification)
- **Action Needed:** Note arrival time
- **Draft Required:** No
### Extracted Information:
- **Arrival time:** 3pm (approximately)
- **Guest:** John Smith
### Suggested Action:
Note arrival time in booking system if applicable.
**Mark as acknowledged?** (y/n)
Common informational patterns:
When user requests batch processing ("Process all FAQ emails"):
## Batch Processing: 4 FAQ Emails
1. "Check-in time question" -> Draft created
2. "Breakfast included?" -> Draft created
3. "Pet policy" -> Draft created
4. "Luggage storage" -> Draft created
4 drafts created. Review them in Gmail.
Remaining in queue: 2 emails
When user says "Done" or queue is empty:
## Session Complete
**Processed this session:**
- 3 drafts created
- 2 emails acknowledged (no reply needed)
- 1 promotional archived
- 1 email deferred
**Drafts ready for review:**
1. RE: Availability June 15-18? (maria@example.com)
2. RE: Check-in time question (guest@hotel.com)
3. RE: Breakfast options (traveler@email.com)
**Acknowledged (info noted):**
- Arrival time 3pm (john@example.com)
- Dietary: vegetarian (jane@example.com)
Remember to review and send drafts in Gmail!
**Deferred for manual review:** 1 email
Use these patterns to correctly classify incoming emails:
Inquiry - Customer asking a question:
Reply - Continuing a conversation that needs response:
FAQ - Common questions with standard answers:
Informational - Customer providing info (acknowledge, no reply):
Promotional - Marketing (archive to Brikette/Promotional):
Not-Customer - Skip without reply:
Complex - Defer for careful handling:
Spam - Mark as spam:
Is it from a real person about Brikette?
├─ No → Is it promotional?
│ ├─ Yes → PROMOTIONAL
│ └─ No → Is it spam?
│ ├─ Yes → SPAM
│ └─ No → SKIP (not-customer)
└─ Yes → Does it contain a question or need a response?
├─ Yes → Is it a complaint or complex?
│ ├─ Yes → DEFER (complex)
│ └─ No → DRAFT (inquiry/faq/reply)
└─ No → Is it providing useful information?
├─ Yes → ACKNOWLEDGE (informational)
└─ No → ACKNOWLEDGE (no action needed)
Availability inquiry:
Price question:
Directions/Location:
Policy questions:
Complaints:
## Gmail API Error
Unable to fetch emails: [Error message]
Options:
1. "Retry" - try again
2. "Done" - end session and try later
## Draft Generation Issue
I'm having trouble with this email because:
- [Reason]
Options:
1. "Flag for manual" - you'll handle this directly
2. "Use template" - generic acknowledgment response
3. "Give context" - tell me more to help
When user needs to stop:
Before creating each draft, verify:
docs/guides/brikette-email-workflow.mddocs/plans/email-autodraft-workflow-design.mddocs/business-os/cards/BRIK-ENG-0020.user.md| URI | Content |
|---|---|
brikette://faq | 29 FAQ items |
brikette://rooms | Room details and config |
brikette://pricing/menu | Bar and breakfast prices |
brikette://policies | Check-in, age restrictions, etc. |
brikette://draft-guide | Draft quality framework |
brikette://voice-examples | Voice/tone examples |
brikette://email-examples | Classification examples |
Pre-written templates are available in packages/mcp-server/data/email-templates.json for common response scenarios. Use these as a starting point and personalize for each customer.
| Category | Templates | Use For |
|---|---|---|
| check-in | Arriving before check-in, Arrival Time, Out of hours | Check-in timing questions |
| access | Inner/Outer Building Main Door | Door code and access questions |
| transportation | Transportation to Hostel | How to get here questions |
| payment | Change Credit Card Details | Payment method updates |
| prepayment | 1st/2nd/3rd Attempt, Cancelled, Successful | Payment processing status |
| cancellation | Non-Refundable Booking, No Show | Cancellation requests |
| policies | Alcohol, Age Restriction | Policy explanations |
| activities | Path of the Gods Hike | Activity recommendations |
| booking-issues | Why cancelled | Booking troubleshooting |
When handling prepayment chase emails, apply these mappings:
When updating Gmail labels, use gmail_mark_processed with:
prepayment_chase_1, prepayment_chase_2, or prepayment_chase_3.
When drafting a response:
Templates provide consistent messaging for common scenarios while maintaining the professional, warm tone expected by guests.
draft_quality_check({ actionPlan, draft })
If passed=false, present failed checks and ask how to proceed (edit or regenerate).
Present to user:
## Email #1: Availability Inquiry
**From:** Maria Santos <maria@example.com>
**Subject:** Availability June 15-18?
**Received:** 2 hours ago
### Content:
> [Customer's email content]
### Classification:
- **Scenario:** [from EmailActionPlan]
- **Language:** [from EmailActionPlan]
- **Agreement:** confirmed / likely / unclear / none
- **Workflow triggers:** prepayment / terms_and_conditions / booking_monitor
### Relevant Knowledge:
- [Knowledge sources used]
### Draft Response:
---
[Generated draft]
---
Actions:
- "Create draft" - save to Gmail drafts
- "Edit" - modify the response
- "Regenerate" - try a different approach
- "Skip" - don't respond
- "Flag" - mark for manual handling