documents

Create, edit, and verify DOCX documents with render-based visual QA.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/AarnavBaddam/skills --skill documents-aarnavbaddam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: documents
Source: https://github.com/AarnavBaddam/skills/tree/main/documents
Command: npx skills add https://github.com/AarnavBaddam/skills --skill documents-aarnavbaddam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, lxml, pdf2image, and includes scripts (resource) and references (resource) components.

What problem does it solve? Creating or editing Word documents programmatically often produces layout defects like clipped text, broken tables, and spacing drift that text extraction cannot detect. This Skill enforces a render-and-inspect workflow so every DOCX is visually verified before delivery. ## Core Features & Use Cases - Document creation with design presets: Generate professional DOCX files using token-based design presets for business briefs, proposals, reference guides, and Google Docs-targeted output. - Editing, redlining, and comments: Apply tracked changes, inline comments, redaction, accessibility fixes, and template-following edits to existing documents while preserving original structure. - Render-and-verify QA: Convert DOCX to page PNGs via LibreOffice and inspect every page, iterating until layout is clean. - Use Case: Draft a board decision memo as a polished DOCX, render it to page images, fix a cramped table, then deliver the final file or import it as a native Google Doc. ## Quick Start Create a professional one-page project status report as a DOCX file and render it to page images so you can verify the layout before delivering it.

Frequently Asked Questions about documents

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

FAQPage Schema
How do I create a professional DOCX document programmatically?

Choose a design preset such as standard_business_brief or narrative_proposal, resolve it into exact typography and spacing tokens, then build the DOCX with real Word styles, numbering, and explicit table geometry. Render the result to page PNGs and iterate until the layout is clean.

How do I convert a DOCX to images for visual QA?

Run render_docx.py with the input DOCX and an output directory. It converts the file through LibreOffice to PDF and rasterizes each page as page-N.png images, with an optional --emit_pdf flag to also keep the intermediate PDF.

How do I accept tracked changes in a Word document?

Use scripts/accept_tracked_changes.py with --mode accept to keep insertions and drop deletions, or --mode reject for the reverse. It patches the OOXML directly and can also disable trackRevisions in settings.xml.

Can I produce a native Google Doc from a DOCX?

Yes. First create and visually verify a local DOCX, run the google_docs_title_sanitize.py script to remove Word title-style border residue, then import it through the Google Drive plugin's import action with upload_mode set to native_google_docs.

What happens if LibreOffice is not installed for rendering?

If soffice is missing, the DOCX can still be delivered using the Markdown task guides for structural QA, but the final response must state that visual render QA was skipped. Other rendering failures should be fixed before delivery.

How do I make a DOCX more accessible?

Run scripts/a11y_audit.py to detect skipped heading levels, images missing alt text, tables without header rows, and non-descriptive hyperlinks. It can optionally fill image alt text from filenames and mark first table rows as headers.