← 返回 Skills 市场
76
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install doc-visualizer
功能描述
一键将飞书文档/Word/PDF/Excel/Txt转换成深色指挥中心风格HTML看板,支持5主题,可导出PDF和长图。
使用说明 (SKILL.md)
文档可视化 Skill
将任意格式文档(飞书文档/Word/PDF/Excel/Txt)一键生成深色指挥中心风格HTML可视化看板 + PDF/长图。
触发方式
用户在飞书发送以下任意形式即可自动触发:
- 飞书文档链接(如
https://my.feishu.cn/docx/xxx) - 附件文件(Word/Excel/PDF/Txt)
- 任何包含数据的内容文本
使用流程
用户发送文档
↓
[Step 1] 解析文档(自动识别格式)
↓
[Step 2] 数据分析 + 生成可视化配置
↓
[Step 3] 生成5种主题HTML供用户选择
↓
[Step 4] 用户确认主题
↓
[Step 5] Playwright导出PDF + 长图
↓
[Step 6] 发送文件路径给用户
5种主题(发送时指定)
| 主题 | 参数 | 风格 |
|---|---|---|
| 科技蓝 | --theme THEME_BLUE |
顾家原版深蓝 |
| 商务红 | --theme THEME_RED |
红黑商务 |
| 自然绿 | --theme THEME_GREEN |
绿色清新 |
| 皇家紫 | --theme THEME_PURPLE |
紫金高端 |
| 活力橙 | --theme THEME_ORANGE |
橙暖活力 |
示例指令: "帮我把这个飞书文档做成可视化看板,用皇家紫主题"
支持格式
| 格式 | 解析方案 |
|---|---|
| 飞书文档链接 | feishu_fetch_doc → markdown解析 |
| Word (.docx) | python-docx |
| Excel (.xlsx) | openpyxl(多Sheet) |
| PDF (.pdf) | pdfplumber |
| Txt / CSV | 直接字符串读取 |
可视化组件(自动匹配)
根据文档内容自动选择最合适的可视化方式:
- 📊 财务卡片网格 - 自动提取数字指标
- 📰 时间轴 - 2024/2025/2026年份事件
- ⚔️ 对比表 - 多列数据对比
- 💼 SWOT四象限 - 优势/劣势/机会/威胁
- 🚀 四维战略分析 - 进攻/防守/机会/威胁
- 📋 通用数据表格 - 结构化数据
- 📚 来源分布统计 - emoji统计图
- 🎯 访谈切入点 - 场景+话题建议
技术栈
- 解析:python-docx / openpyxl / pdfplumber
- HTML生成:自定义模板(CSS变量主题系统,无外部依赖)
- 导出:Playwright
page.pdf()+screenshot(full_page=True) - 文件输出:
~/.openclaw/workspace/visual_exports/{timestamp}/
文件结构
skills/doc-visualizer/
├── SKILL.md ← 本文件
├── doc_visualizer.py ← 主入口(CLI + 模块)
├── generator/
│ └── html_generator.py ← HTML生成器(5种主题CSS内嵌)
└── exporter/
└── exporter.py ← PDF/长图导出(Playwright)
CLI用法
python doc_visualizer.py \x3C文件路径> [--theme THEME_XXX]
# 示例
python doc_visualizer.py /path/to/report.xlsx --theme THEME_PURPLE
python doc_visualizer.py https://my.feishu.cn/docx/xxx --theme THEME_GREEN
Python模块调用
from doc_visualizer import run, parse_input, analyze_data
# 方式1:完整流程
result = run("/path/to/file.xlsx", theme="THEME_BLUE")
# 返回: {"html": path, "pdf": path, "png": path, "output_dir": path}
# 方式2:分步调用
info = parse_input("/path/to/file.xlsx")
parsed = parse_document(info)
viz_config = analyze_data(parsed)
依赖安装
pip install python-docx openpyxl pdfplumber pandas playwright
playwright install chromium
安全使用建议
This package appears to implement the advertised document→HTML/PNG/PDF conversion, but before installing or running it you should: 1) Confirm how Feishu document links are fetched — the code imports a feishu_fetch_doc module that is not included and no Feishu credentials or auth steps are declared; private Feishu docs likely won’t work without additional setup. 2) Review and test locally with non-sensitive files first (it writes outputs to ~/.openclaw/workspace). 3) Be prepared to install Playwright and Chromium (large binary) as the exporter requires them. 4) If you plan to allow the skill to fetch private cloud docs, require explicit credential handling (do not supply secrets unless you trust/inspect the fetch implementation). 5) If anything about Feishu integration is unclear, ask the author for the feishu_fetch_doc implementation and for details on authentication and triggering behavior before deploying widely.
功能分析
Type: OpenClaw Skill
Name: doc-visualizer
Version: 1.0.1
The doc-visualizer skill is a legitimate tool designed to parse various document formats (PDF, Word, Excel, Feishu) and generate visual HTML dashboards, PDFs, and images. The code uses standard libraries like playwright, pdfplumber, and openpyxl for its stated purpose, and the data analysis logic relies on regex-based extraction of business metrics (SWOT, financial cards). No evidence of data exfiltration, unauthorized network calls, or malicious execution was found across doc_visualizer.py, exporter.py, or the HTML generation logic.
能力评估
Purpose & Capability
The name/description (document → themed HTML + PDF/long image) matches the included code: parsing docx/xlsx/pdf/txt, generating HTML, and exporting via Playwright. However, the SKILL.md advertises automatic triggering from Feishu document links and references a feishu_fetch_doc flow, but the repository does not include a feishu_fetch_doc module nor any declared credentials or API hooks—so the claimed Feishu integration is incomplete.
Instruction Scope
SKILL.md and code instruct installing Playwright and Chromium and write outputs to ~/.openclaw/workspace/visual_exports/{timestamp}/—which is consistent. The runtime instructions/process stay within the stated purpose (parse → analyze → generate → export). Concern: parse_freshdesk_doc() imports from a missing feishu_fetch_doc module and assumes the ability to fetch Feishu documents without declaring where credentials come from; the instructions also claim automatic triggers on Feishu messages but provide no webhook or auth setup. No code paths appear to read unrelated system files or exfiltrate data to external servers.
Install Mechanism
There is no install spec in registry (instruction-only), and SKILL.md suggests installing standard pip packages (python-docx, openpyxl, pdfplumber, pandas, playwright) and running playwright install chromium. That is a normal dependency list for the described functionality; no suspicious external download URLs or archive extraction are present in the package.
Credentials
The skill declares no required environment variables or credentials but the code references a Feishu fetch routine (feishu_fetch_doc) that would normally require authentication for private docs. This is a mismatch: either the Feishu fetch functionality only supports public links (not documented) or the skill expects credentials/config that are not declared. The skill writes output files into the user's home under ~/.openclaw/workspace, which is reasonable but should be noted.
Persistence & Privilege
No special privileges are requested: always is false, the skill is user-invocable, and it does not modify other skills or system-wide settings. It does create files under ~/.openclaw/workspace which is limited to user-space and consistent with its purpose.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install doc-visualizer - 安装完成后,直接呼叫该 Skill 的名称或使用
/doc-visualizer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Version 1.0.1
- No changes detected in the codebase or documentation.
- Version bump only; functionality remains the same.
v1.0.0
- 初始版本发布,支持将飞书/Word/Excel/PDF/Txt文档一键生成深色指挥中心风格HTML可视化看板,并导出为PDF和长图。
- 内置5种可选主题(科技蓝、商务红、自然绿、皇家紫、活力橙)。
- 支持自动解析文档内容,智能匹配多种可视化组件(如财务卡片、对比表、时间轴、SWOT四象限等)。
- 提供CLI与Python模块双用法,兼容多格式输入及多种数据提取场景。
- 使用Playwright实现高质量PDF和长图导出,输出路径统一管理。
元数据
常见问题
文档可视化 是什么?
一键将飞书文档/Word/PDF/Excel/Txt转换成深色指挥中心风格HTML看板,支持5主题,可导出PDF和长图。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 76 次。
如何安装 文档可视化?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install doc-visualizer」即可一键安装,无需额外配置。
文档可视化 是免费的吗?
是的,文档可视化 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
文档可视化 支持哪些平台?
文档可视化 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 文档可视化?
由 LZM2023(@lzm2023)开发并维护,当前版本 v1.0.1。
推荐 Skills