← Back to Skills Marketplace
76
Downloads
1
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install doc-visualizer
Description
一键将飞书文档/Word/PDF/Excel/Txt转换成深色指挥中心风格HTML看板,支持5主题,可导出PDF和长图。
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install doc-visualizer - After installation, invoke the skill by name or use
/doc-visualizer - Provide required inputs per the skill's parameter spec and get structured output
Version History
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和长图导出,输出路径统一管理。
Metadata
Frequently Asked Questions
What is 文档可视化?
一键将飞书文档/Word/PDF/Excel/Txt转换成深色指挥中心风格HTML看板,支持5主题,可导出PDF和长图。 It is an AI Agent Skill for Claude Code / OpenClaw, with 76 downloads so far.
How do I install 文档可视化?
Run "/install doc-visualizer" 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 LZM2023 (@lzm2023); the current version is v1.0.1.
More Skills