← Back to Skills Marketplace
haoyt27

Doc2Markdown

by Haoyt27 · GitHub ↗ · v1.0.10 · MIT-0
cross-platform ✓ Security Clean
337
Downloads
6
Stars
2
Active Installs
9
Versions
Install in OpenClaw
/install doc2markdown
Description
Lightweight document utility designed to convert files to Markdown (MD), built specifically for intelligent agents (e.g., OpenClaw, ClaudeCode) to read and p...
README (SKILL.md)

doc2markdown

Document conversion assistant that automatically converts documents to Markdown (MD), saving output to the same directory as the source file. Designed to help intelligent agents read and process document content in various formats.

Quick Start

# Convert document (auto-polls for 60s, downloads if complete, returns doc ID if timeout)
node scripts/doc2markdown.js convert \x3Cfile_path>     # Downloads MD package
node scripts/doc2markdown.js convert \x3Cfile_path> --md  # Downloads single MD file

# Check status and download (for documents that exceeded timeout)
node scripts/doc2markdown.js check \x3Cdoc_id> \x3Coriginal_file_path>     # Downloads MD package
node scripts/doc2markdown.js check \x3Cdoc_id> \x3Coriginal_file_path> --md  # Downloads single MD file

Capabilities

  • Supported formats: docx, doc, pdf, ppt, pptx, xls, xlsx, jpg, jpeg, png, ceb, teb, caj, odt, ofd, cebx, odp, ott, wps, ods, et, dps, epub, chm, sdc, sdd, sdw, mobi, etc.
  • Preserves document structure, tables, and images
  • No API Key or account required, zero external dependencies
  • Downloaded ZIP files are extracted to {doc_id}_{filename}/ under the source file's parent directory; single MD files are saved directly there

When to Use

  • User requests to "read", "extract", "convert", or "view" a document
  • User provides a document path and asks about its content
  • User needs to summarize or analyze a document
  • User needs to convert document content to Markdown package

Download Modes

This tool supports two download modes:

  • --md mode: Downloads a single merged MD file to the source file's parent directory. Images are not included
  • MD package: Downloads and extracts a ZIP package to {doc_id}_{filename}/ in the source file's parent directory. Includes image files and tables, tables are rendered in HTML format

Choosing the Right Mode

User Intent Example Phrases Mode to Use
Read / view / analyze a document "read this file", "what's in this doc", "summarize this PDF" --md (single MD file)
Explicitly convert to MD "convert to MD", "export as markdown", "转成MD" MD package (default, no --md); use --md only if user specifically asks for a single file

Workflow

convert — Convert Document

  1. Invoke file parsing service
  2. Auto-poll conversion status (up to 60 seconds)
  3. Completes within 60s → Auto-download to source file directory
  4. Exceeds 60s → Return doc ID for subsequent check query

check — Query and Download

  1. Provide the previously returned doc ID
  2. Download if complete, otherwise continue polling for 60 seconds
  3. Prompt to retry later if still not complete

Data & Privacy

  • convert uploads files to the docchain cloud service (lab.hjcloud.com) for parsing. Results are returned as a ZIP archive and extracted locally.
  • All transfers use HTTPS encryption.
  • Users should ensure that documents do not contain sensitive or confidential information unless they have verified the service's data handling practices.
  • Service endpoint: https://lab.hjcloud.com/llmdoc

Feedback & Support

For parsing errors, format issues, or other problems, please submit an issue on GitHub: https://github.com/wct-lab/docchain-skills

Usage Guidance
This skill appears to do what it says: it uploads files to lab.hjcloud.com for conversion and saves results next to the original file. Before installing or using it, consider: (1) Do not upload sensitive/confidential documents unless you trust the service and have reviewed its privacy/data‑retention policy; the SKILL.md warns about this. (2) Verify the endpoint (lab.hjcloud.com) and the project homepage; test with non‑sensitive files first. (3) Review the rest of the script (particularly ZIP extraction code) for path traversal or overwrite behavior if you need stronger assurance — the provided code writes output to the source directory. (4) If you require offline conversion for sensitive data, prefer a purely local converter instead.
Capability Analysis
Type: OpenClaw Skill Name: doc2markdown Version: 1.0.10 The doc2markdown skill is a document conversion utility that transforms various file formats into Markdown by uploading them to a remote service (lab.hjcloud.com). The implementation in scripts/doc2markdown.js is transparent, avoids external dependencies by using a custom ZIP extraction logic with built-in path traversal protection, and explicitly documents its data-handling practices in SKILL.md. While it transmits local file content to a third-party endpoint, this behavior is the stated purpose of the tool and is clearly disclosed to the user/agent.
Capability Assessment
Purpose & Capability
Name, description, SKILL.md, and the included Node script all describe and implement the same behavior: read a local file, POST it to https://lab.hjcloud.com/llmdoc, poll for conversion, download a ZIP or single MD, and write output next to the source. Required binary 'node' is appropriate.
Instruction Scope
Instructions and code explicitly read the provided file, upload it to the remote service, poll for status, download results, and write files into the source file's parent directory. This is within the declared scope, but it does involve uploading user documents off‑host and creating files/directories locally — both are explicit in SKILL.md and should be acceptable only if the user is comfortable with that.
Install Mechanism
No install spec; the skill is a bundled Node script and SKILL.md that runs with the system 'node' binary. Nothing is downloaded from unknown URLs during install; network activity occurs at runtime to the service endpoint.
Credentials
The skill requests no environment variables or credentials. It communicates with a single service endpoint (lab.hjcloud.com) which matches the skill purpose. No unrelated secrets or config paths are requested.
Persistence & Privilege
The skill does not request persistent or elevated platform privileges and is not configured always:true. It reads/writes files only in the same directory as the supplied source file (as documented).
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install doc2markdown
  3. After installation, invoke the skill by name or use /doc2markdown
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.10
- Added support for two download modes: single merged Markdown file (--md) and full Markdown package (ZIP with images and tables). - Updated Quick Start instructions to document both modes. - Expanded documentation with a "Download Modes" section explaining when to use each mode. - Clarified output location for both MD and ZIP extraction. - Improved privacy notice for sensitive document handling.
v1.0.9
- No user-visible changes or documentation updates; internal scripts updated only. - Skill description, usage, and instructions remain unchanged.
v1.0.8
- SKILL.md has been fully rewritten in concise English. - All major user documentation sections (Quick Start, Capabilities, Workflow, Privacy, Support) are now presented in English instead of Chinese. - Functional instructions and usage examples remain the same, but the language and formatting have been standardized and clarified. - Intended usage scenarios and workflow are now listed with updated phrasing for improved clarity.
v1.0.7
- Added OpenClaw metadata with emoji and required binaries to SKILL.md. - No changes to core functionality or user workflow.
v1.0.6
- Internal code improvements in scripts/doc2markdown.js. - No changes to user-facing features or documentation.
v1.0.5
- Documentation updated to clarify that no external dependencies are required for use. - Minor edit in supported features: explicitly states "无需 API Key 或账号,无需任何依赖" (no API key/account and no dependencies). - No functional or code changes included in this release.
v1.0.3
- Python 文件入口 scripts/doc2markdown.py 已被移除,skill 仅保留 Node.js 的使用方式。 - 文档与命令行说明已简化,仅展示 Node.js 的调用方法。 - 增加了隐私与数据传输说明,标明文件会上传至云端进行解析。 - 新增 skill 主页链接,并提供问题反馈途径。 - 其他说明已整体简化、聚焦主要功能和适用场景。
v1.0.1
doc2markdown 1.0.1 - Converts various document formats to Markdown for easy processing by intelligent agents. - Supports a broad range of file types, including docx, pdf, pptx, xlsx, jpg, and more. - Offers both Node.js (recommended) and Python command-line utilities. - Automatically handles document uploads, parsing status checks, and downloads. - Outputs results alongside the source file for convenient access.
v1.0.0
doc2markdown 1.0.0 - Initial release of the skill.
Metadata
Slug doc2markdown
Version 1.0.10
License MIT-0
All-time Installs 2
Active Installs 2
Total Versions 9
Frequently Asked Questions

What is Doc2Markdown?

Lightweight document utility designed to convert files to Markdown (MD), built specifically for intelligent agents (e.g., OpenClaw, ClaudeCode) to read and p... It is an AI Agent Skill for Claude Code / OpenClaw, with 337 downloads so far.

How do I install Doc2Markdown?

Run "/install doc2markdown" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Doc2Markdown free?

Yes, Doc2Markdown is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Doc2Markdown support?

Doc2Markdown is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Doc2Markdown?

It is built and maintained by Haoyt27 (@haoyt27); the current version is v1.0.10.

💬 Comments