MAGIC Agent Skills is now open source! Star on GitHub
MAGIC Agent SkillsMAGIC Agent Skills
Skills Reference

magic-report-generation

Assemble data analysis findings into structured Markdown reports with mandatory sections (Summary, Data Provenance, Methodology, Key Findings, Caveats, Next Steps). Use when creating the final deliverable report after analysis is complete, generating an executive summary, converting findings JSON into a formatted document, or producing ckpt_07_report.md. Supports standard, executive, and technical templates.

When It Activates

Use this skill when assembling findings into a structured report. Trigger phrases: report, summary report, generate report, write up findings, executive summary, document results, final deliverable.

  • Need to assemble analysis results into a structured report
  • Need to format DataFrames as readable tables
  • After magic-statistical-analysis and magic-data-visualization are complete

When NOT to Use: Use magic-statistical-analysis for computing results; use magic-data-visualization for creating charts.

Quick Facts

PropertyValue
Version2.0.0
Complexitylow
Phase1
Scripts3

Tags

data-science reporting markdown documentation

Scripts

Scriptable Tools (call directly or read + adapt)

ScriptStandard CLI UsageWhen to Customize
format_table.pypython3 format_table.py stats.csv table.md--format html|latex for non-Markdown; --max_rows 50, --max_cols 15 to adjust truncation
validate_report.pypython3 validate_report.py report.md validation.json --template standard--template MUST match generation template (technical is default and may mismatch)

Reference Implementations (read patterns, write custom code)

ScriptDemonstratesKey Pattern
generate_report.pyJinja2 template rendering for structured findingsRequires findings JSON with specific schema (summary, key_findings, data_source, caveats); agents must read source to construct valid input

New in v2.0.0

validate_report.py — Mandatory Section Checking

validate_report.py checks generated reports for required sections and non-empty content. Every standard report must contain: Summary, Data Provenance, Methodology, Key Findings, Caveats, and Next Steps.

# Validate a report against the standard template
python3 validate_report.py report.md validation.json --template standard

# Validate against executive template (condensed but caveats required)
python3 validate_report.py report.md validation.json --template executive

If validation fails, the JSON output includes a sections_missing array listing which mandatory sections are absent.

Mandatory Report Sections

Every report must include these 6 sections regardless of template:

SectionPurpose
SummaryLead with the key finding — what should the reader remember?
Data ProvenanceSource file, row count, columns — what data backs the claims?
MethodologyHow was the analysis done? (one line for executive, full detail for technical)
Key FindingsOrdered by business impact, with evidence and uncertainty language
CaveatsAt least one — stakeholders treat caveat-free reports as overconfident
Next StepsWhat decisions or actions follow from the findings?

Dependencies

pandas jinja2 tabulate

Was this page helpful?
Edit on GitHub

Last updated on

On this page