← Back to Skills Marketplace
25
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install laosi-quick-draft
Description
快速草稿 - 说几个要点自动生成结构化邮件/消息/周报草稿,内置多种模板(followup/thankyou/request/report)
README (SKILL.md)
Quick Draft - 快速草稿
激活词: 草稿 / 写邮件 / 写消息 / 生成
功能
- 输入要点自动生成完整草稿
- 多种模板:跟进 / 感谢 / 请求 / 周报 / 通知
- 支持邮件和消息格式
- 保存草稿历史
Python 实现
import os, json
from datetime import datetime
DRAFT_FILE = os.path.join(os.path.dirname(__file__), "quick_drafts.json")
class QuickDraft:
TEMPLATES = {
"followup": {
"name": "跟进邮件",
"format": "email",
"subject": "关于 {topic} 的跟进",
"body": "Hi {name},\
\
"
"关于 {topic} 的事情,想跟您确认一下进度。\
\
"
"方便的话请回复,谢谢!\
\
"
"Best,\
{sender}"
},
"thankyou": {
"name": "感谢信",
"format": "email",
"subject": "感谢 {reason}",
"body": "Hi {name},\
\
"
"非常感谢您 {reason}!这对我帮助很大。\
\
"
"期待后续继续合作。\
\
"
"Best,\
{sender}"
},
"request": {
"name": "请求协助",
"format": "email",
"subject": "请求协助: {topic}",
"body": "Hi {name},\
\
"
"想请您帮忙 {request}。\
\
"
"如果方便的话,请在 {deadline or '方便时'} 回复。\
\
"
"提前感谢!\
\
"
"Best,\
{sender}"
},
"weekly": {
"name": "周报",
"format": "report",
"subject": "周报 {week_start} - {week_end}",
"body": "# {name} 周报 ({week_start} - {week_end})\
\
"
"## 本周完成\
"
"{completed}\
\
"
"## 下周计划\
"
"{planned}\
\
"
"## 问题与风险\
"
"{risks}"
},
"meeting": {
"name": "会议纪要",
"format": "note",
"body": "# 会议纪要 - {topic}\
\
"
"**时间**: {date}\
"
"**参与人**: {attendees}\
\
"
"## 讨论内容\
"
"{discussion}\
\
"
"## 行动项\
"
"{actions}"
}
}
def __init__(self):
os.makedirs(os.path.dirname(DRAFT_FILE), exist_ok=True)
self.drafts = self._load()
def _load(self):
if os.path.exists(DRAFT_FILE):
with open(DRAFT_FILE, encoding="utf-8") as f:
return json.load(f)
return []
def _save(self):
with open(DRAFT_FILE, "w", encoding="utf-8") as f:
json.dump(self.drafts, f, ensure_ascii=False, indent=2)
def generate(self, template_key: str, params: dict) -> dict:
"""根据模板生成草稿"""
if template_key not in self.TEMPLATES:
available = list(self.TEMPLATES.keys())
return {"error": f"Unknown template '{template_key}'. Available: {', '.join(available)}"}
tmpl = self.TEMPLATES[template_key]
# 填充模板变量
try:
subject = tmpl.get("subject", "").format(**params) if "subject" in tmpl else None
body = tmpl["body"].format(**params)
except KeyError as e:
return {"error": f"Missing parameter: {e}"}
draft = {
"id": len(self.drafts) + 1,
"template": template_key,
"format": tmpl["format"],
"subject": subject,
"body": body,
"params": params,
"created": datetime.now().isoformat(),
"finalized": False
}
self.drafts.append(draft)
self._save()
return draft
def list_recent(self, limit: int = 5) -> list:
return [{"id": d["id"], "template": d["template"], "subject": d.get("subject"),
"created": d["created"], "finalized": d["finalized"]}
for d in self.drafts[-limit:]]
# 使用示例
draft = QuickDraft()
# 生成跟进邮件
email = draft.generate("followup", {
"name": "张三",
"topic": "项目方案评审",
"sender": "李四"
})
print(f"📧 {email['subject']}")
print(email['body'])
# 生成周报
report = draft.generate("weekly", {
"name": "李四",
"week_start": "2026-05-22",
"week_end": "2026-05-28",
"completed": "- FlashAttention 调研完成\
- 性能测试框架搭建",
"planned": "- 集成测试\
- 文档撰写",
"risks": "- 依赖库版本兼容性问题"
})
print(f"📋 {report['subject']}")
print(report['body'])
# 生成会议纪要
meeting = draft.generate("meeting", {
"topic": "Q2 OKR Review",
"date": "2026-05-28",
"attendees": "全员",
"discussion": "- KR1 完成 80%,预计下月交付\
- KR2 延期2周,需要协调资源",
"actions": "- 张三: 补充KR2资源申请\
- 李四: 周五前更新排期"
})
print(f"📝 {meeting['subject'] if meeting.get('subject') else meeting['body'][:50]}")
可用模板
| 模板 | 适用场景 | 格式 |
|---|---|---|
| followup | 跟进客户/同事 | 邮件 |
| thankyou | 感谢信 | 邮件 |
| request | 请求资源/协助 | 邮件 |
| weekly | 周报 | 报告 |
| meeting | 会议纪要 | 笔记 |
命令行用法
# 生成跟进邮件
python -c "
from quick_draft import QuickDraft
d = QuickDraft().generate('followup', {'name': '王总', 'topic': '合同', 'sender': '我'})
print(d['subject'] + '\
---\
' + d['body'])
"
使用场景
- 跟进客户: 快速生成专业跟进邮件,不遗漏要点
- 感谢同事: 别人帮了忙,一键生成感谢信
- 每周周报: 填几个要点生成完整周报
- 会议纪要: 会后5分钟出纪要
- 日常沟通: 请假、通知、邀请等常用场景
依赖
- Python 3.8+
- 无第三方依赖
Usage Guidance
Install only if you are comfortable with generated drafts and their input details being saved locally. Avoid using it for highly sensitive business, legal, medical, or personal content unless you know where the history file is stored and how to clear it.
Capability Assessment
Purpose & Capability
The skill's templates, draft generation, and recent-draft listing are coherent with its stated email/message/report drafting purpose.
Instruction Scope
The activation words include broad phrases such as “生成,” which could trigger during ordinary Chinese-language drafting requests, but the artifact does not show automatic execution beyond user-directed draft creation.
Install Mechanism
The package contains only a markdown skill file, declares no third-party dependencies, and static scan metadata reports no suspicious patterns.
Credentials
The embedded Python uses local JSON file I/O for draft history and standard-library modules only, which is proportionate for a drafting/history feature.
Persistence & Privilege
Generated drafts and input parameters are saved to a local quick_drafts.json file; this is disclosed as draft history, but retention location and clearing controls are not fully explained.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install laosi-quick-draft - After installation, invoke the skill by name or use
/laosi-quick-draft - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Quick Draft v1.0.0
- Initial release with structured draft generation for emails, reports, and meeting notes.
- Provides multiple built-in templates: followup, thank you, request, weekly report, and meeting summary.
- Supports customizable input for automatic draft creation.
- Saves draft history for future reference.
- Usable via command line; requires only Python 3.8+, no third-party libraries.
Metadata
Frequently Asked Questions
What is 快速草稿?
快速草稿 - 说几个要点自动生成结构化邮件/消息/周报草稿,内置多种模板(followup/thankyou/request/report). It is an AI Agent Skill for Claude Code / OpenClaw, with 25 downloads so far.
How do I install 快速草稿?
Run "/install laosi-quick-draft" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 快速草稿 free?
Yes, 快速草稿 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 快速草稿 support?
快速草稿 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 快速草稿?
It is built and maintained by 534422530 (@534422530); the current version is v1.0.0.
More Skills