360 Secure SkillHub
360 安全技能中心

Zerox

基于 zerox 库与 GPT-4o 视觉模型的文档转换 Skill,通过 Node 脚本把 PDF、DOCX、PPTX、图片等格式提取为 Markdown 文本;支持前台快速转换与后台长任务转换,后台模式记录日志并在 macOS 上发送完成通知,需配置 API 密钥环境变量。

otacu
otacu
热度 80.63
最近更新 2026-05-18 12:02:31
分类:效率依赖:代码执行 / 读写文件 / 第三方 API / 内部调用大模型应用场景:文件转换 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add zerox
Metadata
name
zerox
description
Convert documents (PDF, DOCX, PPTX, images, etc.) to Markdown using the zerox library. Use when the user needs to extract text content from document files.
homepage
https://github.com/getomni-ai/zerox
metadata
{"clawdbot":{"emoji":"📄","requires":{"bins":["node"],"env":["APIYI_API_KEY"]},"primaryEnv":"APIYI_API_KEY"}}

Zerox Document Converter

Convert various document formats to Markdown using the zerox library and GPT-4o vision.

Supported Formats

  • PDF (scanned and text-based)
  • Microsoft Word (DOCX)
  • Microsoft PowerPoint (PPTX)
  • Images (PNG, JPG, etc.)
  • And more via OCR

Convert Document (Foreground)

For small files (< 30 seconds):

node {baseDir}/scripts/convert.mjs <filePath> [outputPath]

Examples

# Convert PDF - saves to {baseDir}/output/document.md by default
node {baseDir}/scripts/convert.mjs "/path/to/document.pdf"

# Convert PDF with custom output path
node {baseDir}/scripts/convert.mjs "/path/to/document.pdf" "/path/to/output.md"

# Convert Word document - saves to {baseDir}/output/document.md
node {baseDir}/scripts/convert.mjs "/path/to/document.docx"

Convert Document (Background)

For large files or scanned PDFs that take minutes:

node {baseDir}/scripts/convert-bg.mjs <filePath> [outputPath]

Features

  • Runs conversion in background (no timeout issues)
  • Logs progress to {baseDir}/output/convert-bg.log
  • Sends macOS notification when complete
  • Detached from terminal (safe to close)

Examples

# Convert large scanned PDF in background
node {baseDir}/scripts/convert-bg.mjs "/path/to/scanned-document.pdf"

# Monitor progress
tail -f {baseDir}/output/convert-bg.log

Requirements

  • APIYI_API_KEY: Your OpenAI-compatible API key (environment variable)

Notes

  • The conversion uses GPT-4o vision to extract text, so it works even with scanned documents
  • Large documents may take some time to process
  • Output is plain Markdown text