← 返回 Skills 市场
ryan-owo

Export Reply

作者 Ryan-owo · GitHub ↗ · v1.1.0 · MIT-0
linuxdarwinwin32 ✓ 安全检测通过
88
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install export-reply
功能描述
Save any agent reply or full conversation to a local file. Triggers on: 保存 / 导出 / save / export. Supports MD, TXT, HTML, PDF, DOCX. Two modes: verbatim or co...
使用说明 (SKILL.md)

Export Reply 💾

Save any agent reply or full conversation to a local file.
Remembers your last export settings — repeat exports take one confirmation.

Highlights

📄 5 formats MD · TXT · HTML · PDF · DOCX (or all at once)
✂️ 2 content modes Verbatim · Condensed bilingual summary
🧠 Preference memory Recalls last scope / mode / format / path
🖨️ PDF with no extra setup Uses Chrome headless automatically; falls back to fpdf2
🌐 Bilingual summaries Chinese + English section headers and prose
Zero required deps MD / TXT / HTML work with python3 only

Usage

Just say 保存 / 导出 / save / export.
The agent asks all options in one message and infers what you already stated.
Next time: "Use same settings as last time? [yes / change]"

Install

clawhub install export-reply

Optional — better PDF / DOCX support:

pip3 install fpdf2 python-docx markdown

\x3C!-- Agent instructions below. Not rendered on ClawHub. -->

Interaction Flow (MUST follow exactly)

Step 0 — Check saved preferences

Before asking anything, run:

python3 skills/export-reply/scripts/prefs.py --action get

Branch A — Preferences exist (output is JSON, not null): Show a single message:

上次你用的是:{scope} · {mode} · {format} → {path}({saved_at})
直接沿用这个方式,还是重新选?[好/是 = 沿用 | 改/新 = 重选]
  • User confirms (好/是/沿用/yes/ok or empty reply) → skip to Step 2 with saved prefs
  • User wants to change → show Step 1 prompt

Branch B — No preferences (output is null): Go directly to Step 1.

Step 1 — Ask all options in one message

Combine only the unknowns into one single message:

请确认导出选项:
📄 内容范围:仅当前回答 / 完整对话?
✂️ 内容模式:原文保留 / 精简摘要?
📁 格式:MD · TXT · HTML · PDF · DOCX · 全部?
💾 保存路径:默认 ~/Desktop/ 还是自定义?

Infer from trigger phrase — skip already-known fields:

User says Already known
"存成PDF到桌面" format=pdf, path=~/Desktop/
"把这个回答存下来" scope=reply
"导出摘要" mode=summary
"save everything as Word" scope=full, format=docx

Step 2 — Execute export

  1. Write content to temp file, then run:
python3 skills/export-reply/scripts/summarize_conversation.py \
  --input /tmp/export_raw.md \
  --output /tmp/export_staged.md \
  --mode {raw|summary} \
  --title "{TITLE}"

python3 skills/export-reply/scripts/export_reply.py \
  --file /tmp/export_staged.md \
  --format {fmt} \
  --output {path} \
  --title "{TITLE}"
  1. On success, save preferences:
python3 skills/export-reply/scripts/prefs.py --action set \
  --scope {full|reply} --mode {raw|summary} \
  --format {fmt} --path {path}
  1. Reply:
✅ 已保存:{full_path}({size} · {format})

Step 3 — Error handling

Error Action
PDF: no Chrome + no pip libs Offer HTML fallback; show pip3 install fpdf2
DOCX: no python-docx Show pip3 install python-docx; offer MD fallback
Permission denied Suggest ~/Documents/ or ask for new path
Content too large Warn but proceed; suggest summary mode

Content Modes

Raw (原文保留)

Verbatim, role-labeled:

## 用户
{user message}

## 助手
{agent reply}

Pass --mode raw.

Summary (精简摘要)

Bilingual condensed — every header and prose block must be Chinese + English.

  • Remove: greetings, filler, repeated clarifications, narration
  • Keep: core question, conclusions, code, decisions, action items
  • Headers (exact):
    • ## 核心问题 / Core Question
    • ## 结论 / Conclusions
    • ## 代码 / Code
    • ## 行动项 / Action Items
    • ## 关键决策 / Key Decisions
  • Prose: Chinese first, English below
  • Code: keep as-is, add bilingual caption above

Pass --mode summary.


Format Quick Reference

Format Zero-install Notes
md Best for Obsidian, Git, developers
txt Email, plain readers
html Browser, shareable
pdf ✅* Chrome headless → weasyprint → pdfkit → fpdf2
docx Requires pip3 install python-docx

Common Triggers → Inferred Defaults

User says scope mode format
"保存这个回答" reply raw md
"把对话存成PDF" full raw pdf
"导出摘要到桌面" full summary md
"save everything as Word" full raw docx
"export all formats" full raw all

Preferences Script Reference

python3 skills/export-reply/scripts/prefs.py --action get    # read
python3 skills/export-reply/scripts/prefs.py --action set \
  --scope full --mode summary --format pdf --path ~/Desktop/  # save
python3 skills/export-reply/scripts/prefs.py --action clear  # reset

Stored at ~/.export_reply_prefs.json.


Related Skills

  • self-improving — Persist agent learnings permanently
  • ontology — Store structured knowledge from conversations
安全使用建议
This skill appears to do what it says, but review and consider the following before installing: - It runs included Python scripts and will write files to /tmp and to any output path you provide; don't choose sensitive system directories. - Preferences are stored at ~/.export_reply_prefs.json; if you don't want persistent prefs, you can clear or remove that file. - For PDF/DOCX best results, you may install optional packages (fpdf2, python-docx, markdown, weasyprint, pdfkit) — these are optional and not required for basic exports. - The code invokes a local Chrome/Chromium binary for high-quality PDF rendering and uses subprocess.run; this is expected but means the skill executes local binaries with generated HTML content. - The code uses tempfile.mktemp for temporary HTML files (insecure by design in multi-user environments). If you run this on a shared system, consider auditing/modifying the script to use tempfile.NamedTemporaryFile or mkstemp to avoid race conditions. If these behaviors are acceptable, the skill is coherent and reasonable to use; if you need stricter guarantees (no subprocess execution, no temp files, or no persistent prefs), request changes or audit the scripts before enabling.
功能分析
Type: OpenClaw Skill Name: export-reply Version: 1.1.0 The skill bundle provides legitimate functionality for exporting conversation logs to various formats (Markdown, PDF, DOCX, etc.). It uses local Python scripts (export_reply.py, prefs.py) to manage user preferences and perform file conversions. While it utilizes subprocess.run to invoke Chrome for headless PDF rendering and writes to the local filesystem (e.g., ~/.export_reply_prefs.json), these actions are transparently documented and aligned with the stated purpose without evidence of malicious intent or data exfiltration.
能力评估
Purpose & Capability
Name/description match the implementation. The scripts implement markdown/html/pdf/docx exports, preference saving, and simple summarization. Optional pip packages (fpdf2, python-docx, markdown, weasyprint, pdfkit) are reasonable for the stated enhanced output features.
Instruction Scope
Runtime instructions are narrowly scoped to: read/save a prefs JSON (~/.export_reply_prefs.json), write temp files in /tmp, format content, and convert to requested formats (including calling a local Chrome binary if present). The steps do not access unrelated credentials or system configuration. Minor implementation details to be aware of: the code uses tempfile.mktemp (insecure, potential race in shared /tmp) and subprocess.run to invoke local Chrome/Chromium for PDF rendering, which is expected behavior but means the script will execute a local binary with generated HTML input.
Install Mechanism
No remote install or downloads; the skill bundles Python scripts and relies on an existing python3 binary. Enhanced features are provided by optional, user-installable pip packages. No external URLs, archive extraction, or third-party package installs are forced by the skill.
Credentials
The skill requests no environment variables or external credentials. It reads/writes a single preferences file at ~/.export_reply_prefs.json and detects local Chrome and common font paths for PDF rendering; this is proportional to the export task.
Persistence & Privilege
always is false and the skill does not request elevated privileges. It persists only its own preferences in the user's home directory and writes output files to user-specified paths—behavior that matches its purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install export-reply
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /export-reply 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Cleaner README with feature table; fix description; Chrome headless PDF; preference memory
v1.0.0
Initial release: MD/TXT/HTML/PDF/DOCX export, bilingual summary, Chrome headless PDF, preference memory
元数据
Slug export-reply
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Export Reply 是什么?

Save any agent reply or full conversation to a local file. Triggers on: 保存 / 导出 / save / export. Supports MD, TXT, HTML, PDF, DOCX. Two modes: verbatim or co... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 88 次。

如何安装 Export Reply?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install export-reply」即可一键安装,无需额外配置。

Export Reply 是免费的吗?

是的,Export Reply 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Export Reply 支持哪些平台?

Export Reply 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。

谁开发了 Export Reply?

由 Ryan-owo(@ryan-owo)开发并维护,当前版本 v1.1.0。

💬 留言讨论