Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

email-smart-reply电子邮件智能回复

Agent Skill

email-smart-reply 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,752

周安装

117

GitHub Stars

公开资料未说明

下载量

964
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:email-smart-reply(电子邮件智能回复)
来源仓库:https://github.com/cjboy007/email-smart-reply
安装命令:
openclaw skills install email-smart-reply
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install email-smart-reply

简介

基于 B2B 场景分析邮件意图并生成针对性回复建议。

  • 适用于销售、技术支持等岗位快速响应客户咨询与投诉。
  • 可识别询问、交付追踪、投诉等多种意图类型并匹配话术。
  • 依赖模型对语义的理解准确性,复杂语境下可能需要人工复核。
  • 建议结合企业知识库训练以提高领域适应性。email-smart-reply 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
email-smart-reply
description
AI-powered email reply generation for B2B sales. Analyzes incoming emails to detect intent (inquiry, delivery chase, complaint, technical question, partnership, spam), retrieves relevant knowledge base content, generates contextually appropriate draft replies, and routes low-confidence replies for human review via Discord. Use when you need to automate initial email response drafting for sales inquiries.

email-smart-reply

Category: Email Automation Status: Production-Ready Version: 1.0.0 Created: 2026-03-24 Maintainer: WILSON + IRON


Description

Intelligent email auto-reply pipeline for B2B sales. Automatically classifies incoming emails by intent, retrieves relevant knowledge from your knowledge base, generates personalized reply drafts, and routes them through a Discord-based human review workflow before sending.

Pipeline: IMAP fetch → Intent Recognition → KB Retrieval → Reply Generation → Discord Review → SMTP Send

This skill is designed for B2B electronics manufacturing email workflows. It understands product lines (HDMI/DP/USB/LAN cables), customer intent categories specific to electronics manufacturing, and integrates with CRM data.


Core Modules

FilePurpose
scripts/intent-recognition.jsClassifies email intent via LLM (OpenRouter) with keyword fallback
scripts/kb-retrieval.jsRetrieves relevant knowledge from LanceDB + Obsidian vault
scripts/reply-generation.jsGenerates personalized reply drafts using templates + KB context
scripts/discord-review.jsPushes drafts to Discord for human approval before sending
scripts/integration-test.jsEnd-to-end pipeline test with --dry-run mode
config/intent-schema.jsonDefines 6 intent categories with thresholds and behaviors
config/discord-config.jsonDiscord bot token and channel configuration

Intent Categories

Defined in config/intent-schema.json:

IDEnglishChinesePriorityAuto-DraftFallback
inquiryProduct Inquiry产品询价highmanual_review
delivery-chaseDelivery Follow-up交期催促highmanual_review
complaintCustomer Complaint客户投诉urgentescalate_to_human
technicalTechnical Support技术支持mediummanual_review
partnershipPartnership/Collaboration合作意向highmanual_review
spamSpam/Promotional垃圾邮件lowignore

Confidence threshold: 0.75 (below this → needs_manual = true, no auto-draft sent)


Usage

Run Full Pipeline (Dry Run)

cd $WORKSPACE/skills/email-smart-reply/scripts
node integration-test.js --dry-run --limit 5

Run Full Pipeline (Live - sends to Discord review)

node integration-test.js --limit 10

Intent Recognition Only

const { recognizeIntent } = require('./scripts/intent-recognition');
const result = await recognizeIntent(emailText);
// Returns: { intent, confidence, method: 'llm'|'keyword' }

KB Retrieval Only

const { retrieveKB } = require('./scripts/kb-retrieval');
const results = await retrieveKB({ intent, emailText });
// Returns: { found, results: [{source, content}], queries }

Generate Reply Draft

const { generateReply } = require('./scripts/reply-generation');
const draft = await generateReply({ email, intentResult, kbResults });
// Returns: { draft_id, subject, body, needs_manual, reason } or null
// Draft saved to: $WORKSPACE/skills/imap-smtp-email/drafts/

Push to Discord Review

const { pushToDiscordReview } = require('./scripts/discord-review');
await pushToDiscordReview({ draft, email, intentResult });
// Sends embed with Approve/Edit/Discard buttons to #email-review channel

Discord Review CLI (manual actions)

node scripts/discord-review.js test          # Send test embed
node scripts/discord-review.js approve <draft_id>
node scripts/discord-review.js discard <draft_id>

Draft ID Format

DRAFT-{timestamp}-{3-letter-prefix}

IntentPrefix
inquiryINQ
delivery-chaseDEL
complaintCOM
technicalTEC
partnershipPAR
spam(filtered, no draft)

Dependencies

External Services

  • IMAP/SMTP: Configured email account via enterprise mail provider
  • OpenRouter API: LLM intent classification (API key in .env)
  • Discord Bot: Token + channel (configured in config/discord-config.json)

Local Skills/Tools

  • $WORKSPACE/skills/imap-smtp-email/ — IMAP/SMTP transport layer
  • $WORKSPACE/vector_store/okki_vector_search_v3.py — LanceDB vector search
  • $KB_PATH — Product knowledge base (Obsidian vault)

Node.js Packages

  • imap / nodemailer — email transport (inherited from imap-smtp-email skill)
  • node-fetch — OpenRouter API calls
  • discord.js — Discord bot integration

Configuration

config/intent-schema.json

  • Intent definitions, keywords (EN + ZH), confidence thresholds
  • Fallback behaviors per intent type
  • Global settings (multi-intent handling, language detection)

config/discord-config.json

  • bot_token: Discord bot token
  • channel_id: Target channel for review embeds (<your-discord-channel-id>)
  • review_timeout_minutes: Auto-discard timeout (default: 30)

Safety Guarantees

  1. No blind sending: All drafts require human approval via Discord before SMTP send
  2. Low confidence → manual: Confidence < 0.75 sets needs_manual=true, skips Discord push, queues for manual review
  3. Complaint escalation: Complaint intent never auto-drafts; always escalates to human
  4. Spam filtering: Spam intent immediately discarded, no draft created
  5. Dry-run mode: --dry-run flag for safe testing without real sends or Discord posts
  6. Fallback degradation: LLM unavailable → keyword matching; IMAP unavailable → sample emails

Development History

Task: task-001 | Phase: 1 | Iterations: 5 | Duration: ~2.5 hours

IterationAgentWhat Was Built
1IRONInitial attempt (timed out at 300s — restructured to single-subtask iterations)
2IRONSteps 1-3: intent-schema.json, intent-recognition.js, kb-retrieval.js
3IRONStep 4: reply-generation.js (templates, escalation logic, draft file I/O)
4IRONStep 5: discord-review.js (Embed format, 3-button interaction, CLI fallback)
5IRONStep 6: integration-test.js (full pipeline, --dry-run, test-results/ output)

Key Design Decisions:

  • Single-subtask-per-iteration strategy after initial timeout failure
  • LLM → keyword cascade for intent recognition robustness
  • Discord embed review (not email approval) for fast human-in-the-loop UX
  • needs_manual flag as primary safety gate (not confidence threshold alone)
  • Reviews stored locally in reviews-pending/ as fallback if Discord is unavailable

Known Limitations (Phase 1):

  • Integration tests use sample emails (real IMAP auth was unavailable in test env)
  • LLM intent classification falls back to keyword matching (confidence ~0.4–0.6)
  • Discord live push not tested in dry-run (separately verified in Iteration 4)

Phase 2 Roadmap

  1. Real IMAP testing — Run pipeline against actual incoming emails, measure intent accuracy
  2. LLM availability — Ensure OpenRouter API accessible in production
  3. Discord Bot permissions — Confirm bot has send access to #email-review channel
  4. Cron job — Schedule integration-test.js every 30 minutes via cron
  5. Manual queue monitoring — Alert when needs_manual backlog exceeds threshold

File Structure

email-smart-reply/
├── SKILL.md                    ← This file
├── README.md                   ← Quick start guide
├── scripts/
│   ├── intent-recognition.js   ← LLM + keyword intent classifier
│   ├── kb-retrieval.js         ← LanceDB + Obsidian knowledge retrieval
│   ├── reply-generation.js     ← Template-based reply drafts
│   ├── discord-review.js       ← Discord embed review workflow
│   └── integration-test.js     ← End-to-end pipeline runner
├── config/
│   ├── intent-schema.json      ← Intent categories and thresholds
│   └── discord-config.json     ← Discord bot configuration
└── drafts/                     ← Generated draft replies (gitignored)

Environment Variables

Create a .env file in the skill root:

# LLM API
OPENROUTER_API_KEY=your-openrouter-api-key

# Knowledge Base Path (e.g. Obsidian vault)
KB_PATH=/path/to/your/knowledge-base

# Draft output directory
DRAFTS_DIR=./drafts

# Discord Review (optional)
DISCORD_BOT_TOKEN=your-discord-bot-token
DISCORD_REVIEW_CHANNEL_ID=your-channel-id

# IMAP (to read incoming emails)
IMAP_HOST=imap.your-provider.com
IMAP_PORT=993
IMAP_USER=your@email.com
IMAP_PASS=your-password

Source

This skill is a packaged, documented, reusable version of the email automation pipeline.

适合场景

01

调用多模型

02

代码和文本生成

03

Agent 推理流程

04

OpenRouter 模型接入

能力概览

能力 1

统一调用多种 LLM

能力 2

支持 Claude、Gemini、Kimi 等模型

能力 3

适合聊天、代码和推理任务

能力 4

可作为 Agent 模型调用入口

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

平台分布

OpenClaw

97.35%
按下载量换算938

安全审计

VirusTotal

未展示

ClawScan

可疑

Static analysis

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills