markdown2doc

Lightweight document utility designed to convert Markdown (MD) files to PDF or DOCX format. Supports multiple template themes. Preserves document structure, heading hierarchy, embedded images. Requires no external dependencies.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "markdown2doc" with this command: npx skills add haoyt27/markdown2doc

markdown2doc

Document conversion assistant that automatically converts Markdown (MD) files to PDF or DOCX format, saving output to the same directory as the source file.

Quick Start

# Convert markdown to PDF
node scripts/markdown2doc.js convert <file_path> pdf        # Output: same_name.pdf
# Convert markdown to WORD
node scripts/markdown2doc.js convert <file_path> docx       # Output: same_name.docx
# List available themes
node scripts/markdown2doc.js list-themes
# Convert markdown to WORD with a theme
node scripts/markdown2doc.js convert <file_path> docx --theme tech

Capabilities

  • Supported output formats: PDF, DOCX
  • Multiple template themes available (use list-themes to see all options)
  • Preserves markdown structure, headings, lists, tables, and code blocks
  • Generates a navigable table of contents with heading hierarchy
  • Embeds images referenced in the markdown into the output document, including both local images
  • No API Key or account required, minimal external dependencies
  • Output file is saved to the same directory as the source markdown file

Note on local images: To ensure local images are correctly embedded in the output document, image files must be located in the same directory as the markdown file, or in a subdirectory of it (e.g., ./images/photo.png). Images referenced via absolute paths or paths pointing outside the markdown file's directory will be skipped for security reasons.

When to Use

  • User requests to "export", "convert", "generate PDF", "generate DOCX", "generate doc", "generate Word document" from markdown
  • User provides a markdown file path and asks to convert it to PDF, DOCX, or doc
  • User needs a printable or shareable version of a markdown document
  • User asks to apply a specific style or theme when converting to DOCX
  • User asks to list available template themes or wants to know what template themes are supported

Workflow

convert — Convert Markdown File

  1. Read markdown file content from specified path
  2. Scan markdown for local image references and collect image files
  3. Send markdown content to conversion service
  4. Receive converted file stream (PDF or DOCX)
  5. Save output file to source file's parent directory

Data & Privacy

  • convert sends both the markdown file content and all locally referenced image files to the docchain cloud service (lab.hjcloud.com) for processing.
  • Any local image path referenced in the markdown (e.g., ![](./images/photo.png)) will be read from disk and uploaded along with the markdown content.
  • All transfers use HTTPS encryption.
  • Users are responsible for ensuring that neither the markdown content nor any referenced image files contain sensitive, confidential, or proprietary information. Use of this skill constitutes acceptance of the data transmission described above.
  • Service endpoint: https://lab.hjcloud.com/llmdoc

Feedback & Support

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Gigo Lobster Taster

🦞 GIGO · gigo-lobster-taster: 正式试吃模式:跑完整评测,默认上传云端、生成个人结果页并进入排行榜。 Triggers: 试吃我的龙虾 / 品鉴我的龙虾 / lobster taste / lobster taster.

Registry SourceRecently Updated
General

Invoice Generator

Creates professional invoices in markdown and HTML

Registry SourceRecently Updated
92001kalin
General

backstage companion

Anti-drift protocol script. Ensures parity between docs and system. Triggers: 'bom dia PROJECT' / 'good morning PROJECT' (load project context with health ch...

Registry SourceRecently Updated
General

stratos-storage

Upload and download files to/from Stratos Decentralized Storage (SDS) network. Use when the user wants to store files on Stratos, retrieve files from Stratos, upload to decentralized storage, or download from SDS.

Registry SourceRecently Updated