Doc Genius

v1.2.0

支持PDF、Word、Markdown智能摘要和格式转换,提供批量处理与进度报告,提升文档处理效率。

0· 296·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for imgolye/doc-genius.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Doc Genius" (imgolye/doc-genius) from ClawHub.
Skill page: https://clawhub.ai/imgolye/doc-genius
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Canonical install target

openclaw skills install imgolye/doc-genius

ClawHub CLI

Package manager switcher

npx clawhub@latest install doc-genius
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
high confidence
Purpose & Capability
The name/description and most code files implement PDF/Word/Markdown summarization and conversion, which is coherent. However, a bundled 'paid' variant (scripts/doc_processor_paid.py) includes SkillPay billing integration (skillpay.me) and an embedded BILLING_API_KEY and SKILL_ID that are not mentioned in SKILL.md or registry metadata. The presence of billing code in a tool advertised as a free document processor is unexpected and should be justified.
!
Instruction Scope
SKILL.md instructs running scripts/doc_processor.py and references OPENAI_API_KEY for AI summarization. It does not mention the paid script or any billing/remote calls. The codebase includes additional scripts (doc_processor_paid.py and v2) that import 'requests' and contact external endpoints; this expands runtime actions beyond the documented instructions and the user-visible examples.
Install Mechanism
No install spec downloads arbitrary code; this is an instruction-and-source bundle. Dependencies are local Python packages (PyPDF2, python-docx, markdown, beautifulsoup4) and no external installers or archive downloads are used.
!
Credentials
Registry metadata declares no required environment variables, but SKILL.md and code reference OPENAI_API_KEY for AI summarization (expected). More concerning: scripts/doc_processor_paid.py hard-codes a BILLING_API_KEY and a user-specific VENV_PYTHON path. A billing API key embedded in code is disproportionate and sensitive; the skill also performs network calls to billing endpoints without documenting them in metadata or instructions.
Persistence & Privilege
The skill does not request always:true, does not claim to modify other skills, and appears to run as user-invoked scripts. No elevated persistence or automatic always-on behavior is present in the metadata.
Scan Findings in Context
[hardcoded-credential] unexpected: scripts/doc_processor_paid.py contains a hard-coded BILLING_API_KEY ('sk_0de94ea93e9...') and SKILL_ID. A document-processing skill should not include embedded billing credentials in source; this is sensitive and unexpected.
[external-billing-endpoint] unexpected: scripts/doc_processor_paid.py calls https://skillpay.me API endpoints (balance, charge, payment-link). The public SKILL.md and registry metadata do not document billing integration or require network access for payments, so these network calls are not clearly expected.
[user-path-in-source] unexpected: scripts/doc_processor_paid.py contains VENV_PYTHON = '/Users/gaolei/.openclaw/workspace/.venv/bin/python3', a user-specific path. This looks like leaked local configuration and is not relevant to the documented capabilities.
What to consider before installing
This skill's core document-processing code appears legitimate, but there are important red flags you should address before installing or running it: (1) The package includes a 'paid' script that contacts an external billing service (skillpay.me) and contains a hard-coded billing API key — treat that key as sensitive and avoid running that script until you confirm its legitimacy. (2) The registry metadata does not declare environment variables (OPENAI_API_KEY) referenced in the docs; expect to provide your OpenAI key if you plan to use AI summarization. (3) Run the code in a restricted environment (container or sandbox) and inspect or remove the paid script if you do not intend to use billing. (4) Ask the author for provenance: where the hard-coded billing key came from, why billing is bundled but undocumented, and for a version without embedded secrets. If you cannot verify the source or the billing integration, do not run the paid script and consider rejecting this skill.

Like a lobster shell, security has layers — review code before you run it.

conversionvk97a96tg2e7yrwz7b49te3d5j182eax6documentvk97a96tg2e7yrwz7b49te3d5j182eax6latestvk979fkt5ajmftm5cs8ke3krems82ems4markdownvk97a96tg2e7yrwz7b49te3d5j182eax6pdfvk97a96tg2e7yrwz7b49te3d5j182eax6summaryvk97a96tg2e7yrwz7b49te3d5j182eax6wordvk97a96tg2e7yrwz7b49te3d5j182eax6
296downloads
0stars
3versions
Updated 1mo ago
v1.2.0
MIT-0

Doc Genius - 智能文档处理助手

快速开始

智能摘要

# PDF摘要
python3 scripts/doc_processor.py summarize /path/to/document.pdf

# Word摘要
python3 scripts/doc_processor.py summarize /path/to/document.docx

# Markdown摘要
python3 scripts/doc_processor.py summarize /path/to/document.md --format json

格式转换

# PDF → Markdown
python3 scripts/doc_processor.py convert /path/to/document.pdf --output markdown

# Word → Markdown
python3 scripts/doc_processor.py convert /path/to/document.docx --output markdown

# Markdown → HTML
python3 scripts/doc_processor.py convert /path/to/document.md --output html

批量处理

# 批量转换文件夹
python3 scripts/doc_processor.py batch /path/to/folder --output markdown

# 批量摘要
python3 scripts/doc_processor.py batch /path/to/folder --action summarize

输出格式

JSON格式(默认)

{
  "file": "document.pdf",
  "type": "pdf",
  "summary": "这是文档的智能摘要...",
  "keywords": ["关键词1", "关键词2"],
  "word_count": 5000,
  "pages": 12
}

Markdown格式

python3 scripts/doc_processor.py summarize document.pdf --format markdown

核心功能

1. 智能摘要

支持格式:

  • ✅ PDF(PyPDF2)
  • ✅ Word(.docx)
  • ✅ Markdown
  • ✅ 纯文本

摘要算法:

  • 本地摘要(TextRank,速度快)
  • AI摘要(OpenAI API,质量高)

示例:

# 本地摘要
python3 scripts/doc_processor.py summarize document.pdf --method local

# AI摘要(需配置API Key)
export OPENAI_API_KEY="sk-xxx"
python3 scripts/doc_processor.py summarize document.pdf --method ai

2. 格式转换

转换矩阵:

输入格式输出格式状态
PDFMarkdown
PDFHTML⚠️ 实验性
WordMarkdown
WordHTML
MarkdownHTML
MarkdownWord🔜 计划中

示例:

# PDF → Markdown(推荐)
python3 scripts/doc_processor.py convert report.pdf --output markdown

# Word → HTML
python3 scripts/doc_processor.py convert report.docx --output html

3. 批量处理

功能:

  • 文件夹扫描
  • 并发处理
  • 进度报告
  • 错误日志

示例:

# 批量转换(默认并发数=5)
python3 scripts/doc_processor.py batch /path/to/docs --output markdown

# 指定并发数
python3 scripts/doc_processor.py batch /path/to/docs --output markdown --workers 10

# 生成报告
python3 scripts/doc_processor.py batch /path/to/docs --action summarize --report report.json

4. 结构化提取(实验性)

提取内容:

  • 标题层级
  • 目录
  • 关键信息(日期、金额、人名)

示例:

python3 scripts/doc_processor.py extract document.pdf --fields title,toc,dates

高级用法

使用AI摘要

# 配置API Key
export OPENAI_API_KEY="sk-xxx"

# AI摘要(更智能)
python3 scripts/doc_processor.py summarize document.pdf --method ai --model gpt-4

自定义输出

# 指定输出文件
python3 scripts/doc_processor.py convert document.pdf --output markdown --out-file output.md

# 指定输出目录
python3 scripts/doc_processor.py batch /path/to/docs --output-dir /path/to/output

过滤处理

# 只处理PDF文件
python3 scripts/doc_processor.py batch /path/to/docs --filter "*.pdf"

# 排除文件
python3 scripts/doc_processor.py batch /path/to/docs --exclude "temp_*"

技术细节

依赖库

PyPDF2==3.0.1          # PDF处理
python-docx==1.1.0     # Word处理
markdown==3.5.1        # Markdown处理
beautifulsoup4==4.12.2 # HTML解析
aiofiles==23.2.1       # 异步文件处理

安装依赖

pip install PyPDF2 python-docx markdown beautifulsoup4 aiofiles

性能优化

并发处理

  • 默认并发数:5
  • 最大并发数:20
  • 推荐:根据CPU核心数调整

内存优化

  • 流式处理大文件(>10MB)
  • 分块处理(避免内存溢出)

错误处理

常见错误

错误原因解决方案
FileNotFoundError文件不存在检查路径
PermissionError权限不足检查文件权限
UnsupportedFormat格式不支持查看支持列表

日志级别

# 调试模式
python3 scripts/doc_processor.py summarize document.pdf --log-level debug

最佳实践

1. 大文件处理

# 分块处理
python3 scripts/doc_processor.py summarize large.pdf --chunk-size 1000

2. 批量处理优化

# 使用适当的并发数
python3 scripts/doc_processor.py batch /path/to/docs --workers $(nproc)

3. 输出格式选择

场景推荐格式
内容分析JSON
人类阅读Markdown
网页展示HTML

使用场景

1. 研究人员

  • 快速阅读大量论文
  • 提取关键信息
  • 生成文献摘要

2. 内容创作者

  • 转换格式(PDF→Markdown)
  • 提取素材
  • 智能摘要

3. 企业用户

  • 批量处理合同
  • 文档格式统一
  • 知识库构建

与其他技能配合

scrapling-fetch

# 抓取网页 → 转换PDF → 智能摘要
python3 scrapling-fetch/scripts/fetch.py "https://example.com/article" --text > temp.md
python3 doc-genius/scripts/doc_processor.py summarize temp.md

更新日志

v1.0.0 (2026-03-07)

  • ✅ 初始发布
  • ✅ 支持PDF/Word/Markdown摘要
  • ✅ 支持格式转换
  • ✅ 支持批量处理

反馈与支持


Doc Genius - 让文档处理更智能 📄✨

Comments

Loading comments...