Agent skill · Data & Analytics

report-generation

Creating structured PDF reports from data, templates, and AI-generated content using professional toolchains

Cosmic Stack3,294★ · 2 repos on radarProfile →
claude-codeMIT
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill report-generation --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 44 KB
Bundled scripts: none
Version: 1.0.0
Declared author: cosmicstack-labs
Path: categories/pdf-generation/report-generation/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 364
Language: JavaScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Converts data into polished PDF reports. It supports a full pipeline from data sources and templates to a final PDF, including metadata, tables, charts, and formatted sections. The skill provides a template-driven approach (HTML + CSS) rendered with Jinja2, then converted to PDF with WeasyPrint, producing a professional multi-section document.

How it works

  • Defines a standardized report structure and metadata (ReportMetadata) used to render the cover and TOC.
  • Uses a Jinja2 + WeasyPrint pipeline: an HTML template (templates/report.html) and a Python generator (Python Report Generator) to render sections.
  • Chart generation is handled by a Python method that creates charts with matplotlib and saves them as images, which are embedded in sections.
  • Data loading supports CSV, JSON, and XLSX formats via load_data.
  • build_sections_from_data constructs a list of sections from a configuration object, handling text, table, chart, and callout blocks.
  • generate() orchestrates loading data, building sections, rendering HTML, and producing a PDF via WeasyPrint.

When to use it

Use when you need a structured, data-driven PDF report with a clear layout, executive sections, charts, and tables. Suitable for business reports like quarterly analyses or performance reviews where a branded PDF is required.

What it can touch

  • Data sources: CSV, JSON, XLSX (via load_data).
  • Template engine: Jinja2 (via the template directory).
  • Output: PDF files created by WeasyPrint from rendered HTML.
  • Chart images: generated and saved to disk during section construction.
  • Template: HTML template at templates/report.html.

Caveats

  • Requires external libraries: jinja2, matplotlib, pandas, weasyprint.
  • Data formats other than CSV/JSON/XLSX are not supported (raises ValueError).
  • Output filename derives from metadata.document_id or defaults to 'report'.
  • Code assumes a specific template structure and section/block configuration to render correctly.
From the SKILL.md

# Report Generation Create structured, data-driven PDF reports that communicate insights effectively. This skill covers the full pipeline — from data sources and templates to polished PDF output with charts, tables, and professional formatting. --- ## Report Structure Fundamentals A well-structured report follows a consistent pattern that guides the reader from context to conclusions. ### Standard Report Anatomy ```text ┌────────────────────────────────────────┐ │ Cover Page │ │ Title, subtitle, author, date, │ │ organization branding │ ├────────────────────────────────────────┤ │ Table of Contents │ │ Auto-generated from headings │ ├────────────────────────────────────────┤ │ Executive Summary │ │ Key findings in 1-2 paragraphs │ ├────────────────────────────────────────┤ │ Introduction / Background │ │ Context, objectives, scope │ ├────────────────────────────────────────┤ │ Methodology │ │ How data was collected/analyzed │ ├────────────────────────────────────────┤ │ Findings / Results │ │ Data presentation with charts/tables │ ├────────────────────────────────────────┤ │ Discussion │ │ Interpretation of results │ ├────────────────────────────────────────┤ │ Conclusions │ │ Summ

What's inside
Steps it walks through
  1. Report Structure Fundamentals
  2. Standard Report Anatomy
  3. Report Metadata Standards
  4. 2. Template Engines
  5. Jinja2 + WeasyPrint Pipeline
  6. 3. Data Source Integration
  7. CSV to Report
  8. SQL Database → Report
  9. API Data → Report
  10. 4. Chart Embedding in Reports
  11. Matplotlib for Report Charts
  12. Programmatic Chart Generation (Plotly to Static Images)
  13. 5. Dynamic Tables
  14. Complex Table Formatting
More from mercury-agent-skills
All skills →
About this skill
What does the report-generation skill do?

Creating structured PDF reports from data, templates, and AI-generated content using professional toolchains

How do I install it?

Run `npx skills add cosmicstack-labs/mercury-agent-skills --skill report-generation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From cosmicstack-labs/mercury-agent-skills, a repository with 364 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going