dev-document_builder

Create, convert, and process documents across Markdown, DOCX, and PDF formats.

1|2|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/zhizhunbao/textbook-rag --skill dev-document-builder-zhizhunbao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dev-document_builder
Source: https://github.com/zhizhunbao/textbook-rag/tree/main/.agent/skills/dev-document_builder
Command: npx skills add https://github.com/zhizhunbao/textbook-rag --skill dev-document-builder-zhizhunbao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, pypandoc, mammoth, pymupdf, pdfplumber, pypdf, reportlab, pytesseract, pdf2image, pillow, pix2text, and includes scripts (resource) and references (resource) components.

What problem does it solve? Working with documents across formats is fragmented: creating polished Word reports requires manual formatting, converting Markdown to DOCX produces broken images and stray horizontal lines, and extracting content from PDFs (especially textbooks and scanned slides) needs different tools for each task. This Skill unifies all of these into five clear routes with ready-to-run scripts. ## Core Features & Use Cases - Programmatic DOCX Generation: Build professional reports with python-docx using styled tables (dark headers, alternating rows), controlled typography, and page setup. - Format Conversion: Convert Markdown to DOCX via Pandoc with automatic preprocessing (alt-text removal, cover page, TOC insertion), and DOCX back to Markdown via Mammoth or Pandoc with image extraction. - PDF Processing: Extract text and tables, split textbooks by TOC bookmarks, merge/split pages, OCR scanned documents, and convert slides to Markdown with images. - Use Case: A student needs to submit a lab report: generate screenshots, fill a Markdown template, then run convert_md_to_docx.py to produce a Word file with a formatted cover page and table of contents. ## Quick Start Ask the AI to convert your Markdown notes into a formatted Word document, or to split a textbook PDF into per-chapter files using the included scripts.

Frequently Asked Questions about dev-document_builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Markdown to DOCX with images?▼

Run the convert_md_to_docx.py script with your Markdown file. It preprocesses the content by removing image alt text and horizontal rules, resolves relative image paths via Pandoc's resource-path option, then inserts a formatted cover page and Word table of contents.

How do I split a PDF textbook by chapter?▼

Use the pdf_section_split.py script, which automatically reads the PDF's built-in TOC bookmarks and splits it into per-section files organized by chapter. For PDFs without bookmarks, it falls back to scanning running page headers.

Which Python library should I use for PDF table extraction?▼

Use pdfplumber for table extraction because it detects cell boundaries and table structure accurately. For plain text extraction, PyMuPDF (fitz) is faster, and pypdf handles merging and splitting operations.

Why do unwanted captions appear under images after Markdown to Word conversion?▼

Pandoc renders Markdown image alt text as visible captions in Word. Remove the alt text by using empty brackets like ![](path.png) instead of ![description](path.png); the conversion script does this automatically during preprocessing.

Can I extract text from a scanned PDF?▼

Standard parsers cannot read scanned pages because they contain only images. Use pytesseract with pdf2image to OCR each page, or use the pdf_to_image_md.py script which integrates Pix2Text for text and formula recognition.

How do I convert a DOCX file back to editable Markdown?▼

Use the convert_docx_mammoth.py script, which converts DOCX to Markdown via the mammoth library and extracts embedded images to an images folder. For batch conversion of a whole directory, use batch_convert.py with Pandoc.