About doc-to-txt
doc-to-txt is a skill that converts DOC, DOCX, and PDF files into plain TXT text. It is intended for workflows that need document text, with either a default or specified output path.
Key features
- 01Convert DOC files to TXT
- 02Convert DOCX files to TXT
- 03Convert PDF files to TXT
- 04Set a TXT output path
Use cases
- 01Convert PDF content to plain text
- 02Extract text from DOCX documents
- 03Save converted text to a specified path
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ chunpu/ agent-skills --skill doc-to-txtAfter installing, type/doc-to-txtin Claude Code to confirm it loaded.
Bundled filesscripts/convert.py
Details
From the project READMEDoc to TXT 文档转换
将 DOC、DOCX、PDF 文件转换为 TXT 纯文本格式。
使用方法
uv run {baseDir}/scripts/convert.py <输入文件路径> [--output <输出文件路径>]
参数说明
| 参数 | 说明 |
|---|---|
<输入文件路径> | 要转换的文档文件(支持 .doc, .docx, .pdf) |
--output | 可选,输出 txt 文件路径(默认同目录同名 .txt) |
示例
转换 PDF 到 TXT:
uv run skills/doc-to-txt/scripts/convert.py document.pdf
指定输出文件:
uv run skills/doc-to-txt/scripts/convert.py report.docx --output output.txt
Comments
Markdown supported