report-generation

Generate docx and PDF reports with embedded web UI screenshots via pandoc, docx-js, and reportlab.

1|Updated Mar 15, 2025
One-click install
npx skills add https://github.com/adikpb/dotfiles --skill report-generation-adikpb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: report-generation
Source: https://github.com/adikpb/dotfiles/tree/main/.hermes/skills/productivity/report-generation
Command: npx skills add https://github.com/adikpb/dotfiles --skill report-generation-adikpb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pillow, pdfplumber, pypdf, docx, and includes scripts (resource) and references (resource) components.

What problem does it solve? Producing polished Word and PDF reports that include accurate screenshots of web dashboards, modals, and data tables is tedious and error-prone: retina captures are oversized, modals clip, citations break in LibreOffice conversion, and exported grid PDFs resist in-place edits. This Skill provides proven end-to-end pipelines for screenshot capture, docx generation, PDF conversion, and grid-PDF rebuilds. ## Core Features & Use Cases - Web UI screenshot capture: Uses browser_vision with viewport-meta fixes, row limiting, modal scroll techniques, and Pillow-based crop/resize to produce legible, correctly sized images for embedding. - Docx + PDF generation: Builds reports with the docx npm package (ImageRun, bullets, captions, cover pages) and converts to PDF via LibreOffice headless with lossless image export settings. - Text-only pipeline: Converts markdown to docx and PDF via pandoc with page-break-per-heading, inline clickable hyperlink citations, and pypdf-based verification. - Grid PDF rebuild: Regenerates exported attendance/timesheet PDFs with reportlab, preserving letterhead, grid geometry, and fonts while updating values. - Use Case: A user asks to document a SOC dashboard: the Skill captures each tab and modal section as screenshots, embeds them in a docx with captions, exports a PDF, and verifies image counts and terminology against the live UI. ## Quick Start Ask the assistant to create a docx and PDF report with screenshots of your web dashboard's main views using this report-generation skill.

Frequently Asked Questions about report-generation

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

FAQPage Schema
How do I create a docx report with screenshots of a web dashboard?▼

Capture each view with browser_vision after fixing the viewport meta tag and limiting table rows, then embed the PNGs with the docx npm package using ImageRun at 600x377 pixels. Convert to PDF with LibreOffice headless using lossless compression filter options.

How to convert markdown to docx and PDF with pandoc?▼

Run pandoc report.md -o report.docx, then soffice --headless --convert-to pdf --outdir . report.docx. Insert raw OpenXML page-break blocks before each level-2 heading so every major section starts on a fresh page, and verify output with pypdf.

Why do Word citation fields disappear in LibreOffice PDF export?▼

LibreOffice cannot read Word citation fields and flattens them to plain text during PDF conversion. Use real Word footnotes via pandoc [^n] syntax, or keep inline [n] markers as clickable hyperlinks, both of which survive the conversion.

Why are my browser screenshots mostly empty dark space?▼

A fixed-width viewport meta tag narrower than the browser window causes content to fill only part of the capture. Change it to width=device-width, verify window.innerWidth matches the browser width, and constrain page height to the viewport before capturing.

Can I edit values inside an exported PDF report directly?▼

In-place content-stream edits are unreliable because exported reports use CID subset fonts and stale duplicate text layers. Instead, extract cell positions with pdfplumber, then rebuild the PDF with reportlab at the original mediabox, replaying rects, lines, and text positions.

What image size should screenshots be for docx embedding?▼

Resize retina captures to about 1600 pixels wide with Pillow before embedding, and render at 600x377 in the docx so landscape images fit the 6.5-inch printable area of a letter page. Images wider than roughly 2000 pixels bloat the file and render illegibly.