Lkyyyy320

Office To Md V2

办公效率v0.1.0
作者:Lkyyyy320更新于 2026-05-18office-to-md-v2@clawhub_lkyyyy320/office-to-md-v2
文档处理PDF 处理

据 AlphaMoat 统计,截至 2026-10,Office To Md V2 累计下载 8,261 次、获 4 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 3,368 位,在「办公效率」分类(909 个)中排名第 358 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
8,261
星标
4
全站下载量排名
#3,368
全站前 31% · 「办公效率」前 40%
平台累计下载星标评论
ClawHub ↗4,0422-
SkillHub ↗8,2614—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

通过 Node 库处理 PDF、旧 DOC、DOCX 与基础 PPTX 提取,幻灯片可选 Python 支持。结果可含本地 Markdown、预览和状态。不会提取图片,复杂布局与表格可能不完整,不支持加密文件。需检查旁边输出重名、预装依赖,PPTX 转换应使用可信文件名与受限权限。

资料发布于 2026-10-27

可以用来做什么

  • 提取 Office 文字用于经审阅 Markdown 流程

什么时候用

  • 支持的本地文档需要可读文本转换时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

检查格式、依赖和输出冲突,准备转换,并说明布局和图片限制。

月度数据趋势

累计下载8,261
8914,8498,8072026-03 · 累计下载 1,4372026-05 · 累计下载 2,4252026-07 · 累计下载 3,6462026-08 · 累计下载 4,1922026-09 · 累计下载 5,0692026-10 · 累计下载 8,26126-0326-0926-10
星标4
2342026-03 · 星标 22026-05 · 星标 42026-07 · 星标 42026-08 · 星标 42026-09 · 星标 42026-10 · 星标 426-0326-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-108,261—4
2026-095,069—4
2026-084,192+15.0%4
2026-073,646—4
2026-052,425—4
2026-031,437—2

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

7.5 KB · ClawHub v0.1.0
# Office to Markdown Converter Skill (v2)

## Description
Convert office documents (PDF, DOC, DOCX, PPTX) to Markdown format. This skill uses the word-extractor library for .doc support and provides full OpenClaw integration.

## When to Use
- When you need to extract text from office documents
- When you want to convert documents to readable Markdown format
- When analyzing document content in OpenClaw
- Specifically when dealing with legacy .doc format files
展开全部(共 283 行)

## Supported Formats
- **PDF (.pdf)**: Text extraction using pdf-parse
- **Word (.docx)**: Formatting preservation using mammoth + turndown
- **Legacy Word (.doc)**: Text extraction using word-extractor (supports Chinese encoding)
- **PowerPoint (.pptx)**: Basic text extraction using python-pptx

## Dependencies
- Node.js with npm packages: pdf-parse, mammoth, turndown, word-extractor
- Python3 with python-pptx (for PPTX conversion, optional)
- OpenClaw exec tool permission

## Installation

### 1. Copy the skill to your workspace:
```bash
cp -r /root/.openclaw/workspace/office-to-md-v2/office-to-md /path/to/your/workspace/
```

### 2. Install dependencies:
```bash
cd /path/to/your/workspace/office-to-md
npm install
```

### 3. For PPTX support (optional):
```bash
pip3 install python-pptx
```

## Usage in OpenClaw

### Method 1: Direct exec call
```javascript
// Convert any supported document
const result = await exec(
  'node /path/to/office-to-md/openclaw-skill.js /path/to/document.doc',
  { workdir: '/path/to/workspace', timeout: 60000 }
);

if (result.exitCode === 0) {
  console.log('✅ Document converted successfully');
  // Output file: /path/to/document.md
} else {
  console.error('❌ Conversion failed:', result.stderr);
}
```

### Method 2: Using the wrapper function
```javascript
// Import the converter
const { convertOfficeToMarkdown } = require('/path/to/office-to-md/openclaw-skill.js');

// Convert document
const conversionResult = await convertOfficeToMarkdown('/path/to/document.pdf');
if (conversionResult.success) {
  console.log(`Output: ${conversionResult.outputPath}`);
  console.log(`Preview: ${conversionResult.preview}`);
} else {
  console.error(`Error: ${conversionResult.error}`);
}
```

### Method 3: Complete OpenClaw integration function
```javascript
async function convertDocumentToMarkdown(filePath) {
  // Validate file exists
  try {
    await read(filePath);
  } catch (error) {
    return { success: false, error: `File not found: ${filePath}` };
  }
  
  // Check file extension
  const ext = filePath.toLowerCase().slice(-5);
  const supported = ['.pdf', '.doc', '.docx', '.pptx'];
  if (!supported.some(s => ext.endsWith(s))) {
    return { 
      success: false, 
      error: `Unsupported file type. Supported: ${supported.join(', ')}` 
    };
  }
  
  // Convert using the skill
  const cmd = `node /path/to/office-to-md/openclaw-skill.js "${filePath}"`;
  const result = await exec(cmd, { 
    workdir: '/path/to/workspace',
    timeout: 120000 // 2 minutes for large files
  });
  
  if (result.exitCode === 0) {
    const outputPath = filePath.replace(/\.[^/.]+$/, '.md');
    return {
      success: true,
      outputPath: outputPath,
      message: `Converted to: ${outputPath}`
    };
  } else {
    return {
      success: false,
      error: result.stderr || 'Conversion failed'
    };
  }
}

// Usage example
const result = await convertDocumentToMarkdown('/path/to/document.doc');
if (result.success) {
  const markdown = await read(result.outputPath);
  console.log(markdown.substring(0, 1000));
}
```

## Examples

### Example 1: Convert and analyze a document
```javascript
// Convert a .doc file and analyze its content
const docPath = '/path/to/document.doc';
const convertResult = await exec(
  `node /path/to/office-to-md/openclaw-skill.js "${docPath}"`,
  { workdir: '/path/to/workspace' }
);

if (convertResult.exitCode === 0) {
  const mdPath = docPath.replace('.doc', '.md');
  const content = await read(mdPath);
  
  // Analyze the content
  const wordCount = content.split(/\s+/).length;
  const lines = content.split('\n').length;
  const hasChinese = /[\u4e00-\u9fff]/.test(content);
  
  console.log(`Document analysis:`);
  console.log(`- Word count: ${wordCount}`);
  console.log(`- Lines: ${lines}`);
  console.log(`- Contains Chinese: ${hasChinese}`);
  console.log(`- Preview: ${content.substring(0, 200)}...`);
}
```

### Example 2: Batch conversion
```javascript
// Convert multiple documents of different formats
const documents = [
  '/path/to/report.pdf',
  '/path/to/legacy.doc',
  '/path/to/modern.docx',
  '/path/to/presentation.pptx'
];

const results = [];
for (const doc of documents) {
  console.log(`Converting ${doc}...`);
  const result = await exec(
    `node /path/to/office-to-md/openclaw-skill.js "${doc}"`,
    { workdir: '/path/to/workspace', timeout: 90000 }
  );
  
  const success = result.exitCode === 0;
  results.push({
    file: doc,
    success: success,
    error: success ? null : result.stderr
  });
  
  console.log(success ? '✅ Success' : '❌ Failed');
}

// Summary
const successful = results.filter(r => r.success).length;
console.log(`\nConversion summary: ${successful}/${results.length} successful`);
```

## API Reference

### convertOfficeToMarkdown(filePath)
Returns a Promise that resolves to:
```javascript
{
  success: boolean,
  outputPath?: string,
  markdown?: string,
  preview?: string,
  fileType?: string,
  message?: string,
  stats?: {
    lines: number,
    characters: number,
    words: number
  },
  error?: string,
  stack?: string
}
```

## Configuration

### Timeout Settings
- Small files (<1MB): 30 seconds
- Medium files (1-10MB): 60 seconds
- Large files (>10MB): 120 seconds

### Memory Limits
- Default Node.js memory limit is sufficient for most documents
- For very large files, you may need to increase memory:
  ```bash
  node --max-old-space-size=4096 openclaw-skill.js large-file.doc
  ```

## Troubleshooting

### Common Issues

1. **"File not found"**
   - Check file path and permissions
   - Use absolute paths for reliability

2. **"Unsupported file type"**
   - Ensure file has correct extension
   - Check if file is actually the claimed format

3. **Conversion errors with .doc files**
   - The file may be corrupted or in an unusual format
   - Try opening in Word and saving as .docx first

4. **Chinese text appears as gibberish**
   - word-extractor should handle Chinese encoding automatically
   - If issues persist, the file may use unusual encoding

5. **Timeout errors**
   - Increase timeout for large files
   - Check system resources

### Debug Mode
Enable debug logging by setting environment variable:
```bash
DEBUG=office-to-md node openclaw-skill.js document.doc
```

## Performance
- PDF: Fast, depends on file size
- DOCX: Fast to medium, good formatting preservation
- DOC: Medium, requires binary parsing
- PPTX: Slow, requires Python and external library

## Limitations
- Images in documents are not extracted
- Complex formatting may not be fully preserved
- Tables may convert imperfectly to Markdown
- Very old or corrupted .doc files may fail
- Password-protected files are not supported

## Changelog

### v2.0.0 (2026-02-15)
- Added full .doc support using word-extractor
- Fixed ESM compatibility issues with pptConverter
- Added comprehensive OpenClaw integration
- Improved Chinese text extraction
- Added structured output with statistics

### v1.0.0 (Initial)
- Basic PDF, DOCX, PPTX support
- Simple conversion without .doc support

## License
This skill is provided as-is. The underlying libraries have their own licenses:
- pdf-parse: MIT
- mammoth: BSD-2-Clause
- turndown: MIT
- word-extractor: MIT
- python-pptx: MIT

「办公效率」分类下的热门技能

腾讯文档 TENCENT DOCS办公效率

通过 MCP 在腾讯文档里新建、编辑与管理在线文档的完整操作手册。

↓ 218.4万★ 327u_b0de8114
WPS Office 全家桶办公效率

WPS Office 全家桶 - 四引擎(WPS/MS Office/LibreOffice/纯Python)智能识别用户已安装软件,纯Python模式支持排序/筛选/图表/公式/统计,含文档模板(代码生成)、最佳实践案例、故障排除大章(20+避坑+15 FAQ+15错误ID 统一索引)、自动重试、硬件自适应、环境自检、Skill更新提醒;v5.1新增:kingdoc云端桥接(白名单探测+配置预检+subprocess上传+差异检查)、条件格式/数据验证跨引擎IO(JSON中间格式保真往返)、会议纪要三段式要素化(待办清单+决策记录+风险异议)+说话人标注(MFCC聚类);v5.2新增:公文一键排版(GB/T 9704 规则库约束+结构识别套版+红头预留位+联合行文)、批量水印与敏感信息打码(身份证/手机号/银行卡/邮箱双轨识别+黑色矩形覆盖+打码清单)、跨文档知识检索与问答(本地TF-IDF零依赖+跳转+可选zwjh记忆桥接);删除:与contract-review重复的轻量合同审查模块,改为文档互链引导;v5.2.5修复:MS Office引擎下Excel/PPT创建必然失败(错用Word COM对象),新增get_ms_excel/get_ms_ppt及三槽位统一释放release_ms,MS Office路径透传filepath参数;v5.3.5修复:SKILL.md frontmatter 修复 tags 块序列误混入联系方式行导致标准 YAML 解析失败;v5.4.0新增:留存型功能——定时任务与报告中心(schedule_register 升级为三平台统一调度层 schtasks/cron/launchd,错过策略 skip/run_once,注册表 JSON 可导出导入;新建 report_center.py 报告中心,templates/reports/*.json 参数化模板 + ECharts 单文件 HTML 输出(图表内联、无服务端、双击即开);report_generator 升级支持 --format html;wps.py CLI 统一埋点 SQLite,自动供 report_center 生成周度使用摘要附在报告末尾;watch.py 职责收窄为纯事件采集);v5.3.0新增:统一CLI入口 wps(registry.json注册表分发,office --app/--action 与 convert 子命令、--list 一屏列出全部命令,薄路由层不改脚本内部逻辑)、全命令 --json 机器可读输出(固定 ok/error_id/elapsed/data 四字段,对齐 E001-E015,wps_error.py 新增 emit_json 统一出口)、_worker 启动优化(wps_pure 改惰性加载,pywin32/python-docx/openpyxl 经核查已惰性导入,ENGINE_CACHE 进程级单例复用,COM 释放统一走 release_ms 三槽位)、转换三入口合并为 convert(format_converter/md_converter/wps_docx_to_ppt 内部按目标格式路由,旧脚本保留为兼容别名并提示新命令,v6.0.0 移除)

↓ 76.7万★ 159user_1a470ba8
ppt-generator-skill办公效率

按主题与风格自动生成 PPT 文件的技能。

↓ 59.3万★ 346user_3b34947d
秘书材料星公文写作-妙笔skill办公效率

体制内资深办公室主任+管理学博士,自学编程开发的智能公文写作Skill,让所有办公室同仁少掉头发、少加无用的班,材料一稿过关,省下的时间留给自己、享受生活!————————我们能给你带来的核心价值:1、颠覆传统写作:逻辑建模38类公文全链条,特有模板化引导问答模式,分分钟省心生成高质量大稿。--------2、替你“向上管理”:独有审稿人画像机制,文稿一键结构性修改,精准匹配审稿人画像,过稿率提升至少10倍!----------3、‌杜绝AI编造:缺失的数字、文号、人名、日期一律用[待补]标注,绝不杜撰,守住公文底线。-----------4、‌算法格式托底:数十万全量智控知识库+6500行前沿核心控制代码,格式精准对齐GB/T 9704,出稿零失误。——————————————————本skill历史版本开放了5%知识库的免费试用版,下载即可使用,但需注意:知识库有著作权,仅用于个人使用,不可用于其他任何目的。有兴趣的可以试试。——————————————————————单次付费版skill已发布,2元一次使用全量知识库。具体在发布者“熵衍信息”主页skill里。

↓ 57.8万★ 46u_70fc650d
WPS Office 全家桶办公效率

WPS Office 全家桶 - 四引擎(WPS/MS Office/LibreOffice/纯Python)智能识别用户已安装软件,纯Python模式支持排序/筛选/图表/公式/统计,含文档模板(代码生成)、最佳实践案例、故障排除大章(20+避坑+15 FAQ+15错误ID 统一索引)、自动重试、硬件自适应、环境自检、Skill更新提醒;v5.0新增:定时任务注册管理(schtasks/crontab)、目录轮询监听(YAML规则+大文件分片)、使用统计与稳定性中心(SQLite埋点+引擎健康+引擎偏好)、COM三步自愈(regsvr32→修复安装→手动指引)、对话式数据查询(NL2SQL式意图解析+查询计划+连续追问)、multi-agent编排引擎桥接(白名单探测+流水线模板注册)

↓ 50.8万★ 4user_814dbe54
WPS全家桶·办公管家.Skill办公效率

当用户要处理 Word/Excel/PPT、做文档模板与排版、批量合并图表、公文一键套红头、会议纪要要素化、或跨引擎办公自动化时,WPS全家桶·办公管家.Skill 立即出动。 四引擎智能识别已装软件(WPS/MS Office/LibreOffice/纯Python),纯Python模式支持排序/筛选/图表/公式/统计;含文档模板代码生成、20+避坑+15 FAQ+15错误ID统一索引、自动重试、硬件自适应、环境自检。 当用户提到批量水印、敏感信息打码(身份证/手机号/银行卡/邮箱)、跨文档检索问答等信号时,主动亮剑。

↓ 43.0万★ 2user_185644ed
腾讯文档在线协作自动化办公效率

通过 Tencent Docs Open API 以 curl + jq 创建、读取、列出、搜索和管理腾讯文档的自动化工作流,覆盖在线文档、在线表格、幻灯片、思维导图、流程图、智能表格与收集表七种类型,支持读取元数据与单元格区域、上传图片、创建副本,并对重命名/移动/删除等写操作强制先经用户确认。Use when the user 提到腾讯文档 / Tencent Docs / docs.qq.com、粘贴 docs.qq.com 链接,或想在其腾讯文档空间中创建、读取、整理文档时使用。Triggers include 腾讯文档、在线文档、在线表格、思维导图、流程图、智能表格、收集表。如需文案写作完整工作流套件,淘宝搜索「AI灵匣」店铺获取完整版。

↓ 42.8万★ -u_1ea983ac
kdocs skill办公效率

通过 kdocs-cli 操作金山文档云文档的官方技能。

↓ 42.4万★ 128user_5ea84866

数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。