doc-builder

Generate branded DOCX and PDF reports and step-by-step SOPs through Microsoft Word.

2|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill doc-builder-mbadali25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc-builder
Source: https://github.com/mbadali25/useful-claude-add-ons/tree/main/skills/doc-builder
Command: npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill doc-builder-mbadali25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, pywin32, PyMuPDF, Pillow, numpy, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Producing polished, client-ready Word documents and PDFs by hand is slow and error-prone: Word silently drops modern CSS, screenshot borders get clipped at page tops, and unstyled black-on-white output looks unprofessional. This Skill renders findings reports and step-by-step procedures in a consistent house style with automated quality gates. ## Core Features & Use Cases - Findings reports via HTML to Word COM: Build assessment reports, audit write-ups, and executive summaries with mastheads, summary cards, severity chips, and provenance footers from a JSON data file. - SOP/runbook generation via python-docx: Create step-by-step procedures, how-to guides, and work instructions with bordered screenshots, numbered steps, hyperlinks, and captions that Word renders correctly. - Brand pack resolution and quality gates: Automatically apply an installed brand pack (or neutral style), then validate structure with check_conformance.py and verify rendered screenshot borders at 300 dpi with verify_borders.py. - Use Case: After a security assessment, ask for a management-ready write-up of your findings table; the Skill produces a styled DOCX and PDF with severity chips and a provenance footer, then verifies the output before delivery. ## Quick Start Ask the assistant to turn your findings table or setup procedure into a professionally styled Word document and PDF using the doc-builder skill.

Frequently Asked Questions about doc-builder

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

FAQPage Schema
How do I create a branded SOP or runbook as a Word document?

Write a JSON spec with para, heading, step, bullet, image, and tip blocks, then run build_sop.py with --to-pdf. The script renders a .docx on the active brand pack's house template, backs up any existing master, and optionally converts to PDF through Word COM.

How do I generate a findings report as DOCX and PDF in Python?

Put your report data into the JSON shape shown by build_report.py --example, then run it with --to-docx --to-pdf. It emits Word-safe HTML with literal hex colors and converts through Word COM, producing styled output with severity chips and summary cards.

Why does my Word document lose CSS styling when converting from HTML?

Word's HTML parser silently drops var(), :nth-child, flex/grid, and elements carrying two class names, leaving flat black-on-white text. The report pipeline avoids all of these by design, using grouped selectors, shaded table cells, and literal hex values.

Why are screenshot borders clipped at the top of the page in Word?

python-docx's add_picture() writes neither the a:ln outline nor wp:effectExtent, so Word strokes the border outside the image box and clips it. build_sop.py writes both elements, and fix_effect_extent.py patches older masters.

Does this work without Microsoft Word installed?

HTML and .docx generation work without Word, but --to-docx/--to-pdf conversion and the Gate 2 border verification require Microsoft Word on Windows via pywin32 COM. The preflight script reports Word availability and never falls back to pandoc or LibreOffice.

When should I not use doc-builder for a Word document?

Do not use it to edit an arbitrary existing .docx a user hands over; use the docx skill for extraction or find-and-replace instead. It also does not produce slide decks or spreadsheets, which belong to the pptx and xlsx skills.