matlab-generate-report
Unified skill for all MATLAB and Simulink report generation tasks. Covers report generation, PDF report, document generation, mlreportgen, Report Generator, template, TitlePage, Chapter, multipage HTML, HTMLPage, html-multipage, custom reporter, customizeReporter, template hole, page header, page bo…
Install / Use
npx skills add matlab/matlab-agentic-toolkit --skill matlab-generate-reportInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Content & MediaSupported Platforms
Our assessment of matlab-generate-report
matlab-generate-report scores 91/100 on our quality scale, 378th of 1,199 Content & Media skills we index (top 32%).
Its SKILL.md is 17 KB long, well organised into 13 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 18 days ago, so matlab-generate-report is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
matlab-generate-report compared with similar skills
All 4 of these similar skills score higher than matlab-generate-report; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| matlab-generate-report (this skill)by matlab | 91 | 1.1k | 18d ago | SKILL.md |
| siyuanby siyuan-note | 100 | 46.6k | today | MCP Server |
| algorithmic-artby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 11d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 12d ago | SKILL.md |
Frequently asked questions
- How do I install matlab-generate-report?
- Run
npx skills add matlab/matlab-agentic-toolkit --skill matlab-generate-report. The install tabs above show the steps for each supported agent. - Which AI agents does matlab-generate-report work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is matlab-generate-report safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is matlab-generate-report still maintained?
- The repository was last updated 18 days ago, so matlab-generate-report is actively maintained.
Skill content
View source on GitHubname: matlab-generate-report description: > Unified skill for all MATLAB and Simulink report generation tasks. Covers report generation, PDF report, document generation, mlreportgen, Report Generator, template, TitlePage, Chapter, multipage HTML, HTMLPage, html-multipage, custom reporter, customizeReporter, template hole, page header, page border, company style package, branded reporters, buildTemplates, Simulink report, model documentation, slreportgen, block diagram report, model report, subsystem documentation, SystemDiagramFinder, SystemIO, ExecutionOrder, LookupTable, template style, page footer, TemplateSrc, report package, table variants, multiple HTML pages, PDF report generation, Word report, DOM API, FormalTable, BaseTable, Figure, FormalImage, Section. license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "1.0"
MATLAB Report Generation
Generate structured, professional reports (PDF, Word, HTML) from MATLAB data and Simulink models.
When to Use
- Creating PDF, Word, or HTML reports from MATLAB data
- Building reports with chapters, title pages, tables of contents
- Adding auto-numbered figures and tables to documents
- Creating multipage HTML reports (separate HTML files with navigation)
- Documenting Simulink models with block diagrams, I/O tables, execution order
- Customizing report templates (styles, colors, fonts, headers, footers)
- Creating custom reporter classes with template holes and dynamic content
- Building multi-reporter packages with shared company styles
- Creating table variant reporters with different header colors
- Including HTML content in reports
When NOT to Use
- Simple file export (CSV, Excel) — use
writetable,writematrix - Live Scripts as reports — use MATLAB Live Editor export
- Interactive report building — use Report Explorer GUI
- Web views of Simulink models — use
slreportgen.webview.*directly
API Selection
Always use the Report API (mlreportgen.report.*) as the foundation. It provides the Report container and reporters (Figure, BaseTable, FormalImage, Chapter, TitlePage, etc.) that handle auto-numbering, captions, and document structure.
Use both APIs together. Use the Report API to create the report and add content for which reporters exist. Use the DOM API (mlreportgen.dom.*) for styled paragraphs, custom tables, inline formatting, HTML inclusion, and images without captions. DOM objects append directly to Report, Chapter, or Section alongside reporters.
Critical rule: Report API reporters (Figure, BaseTable, FormalImage) can ONLY be appended to Report, Chapter, or Section objects — never to DOM objects like TableEntry. Use DOM objects inside TableEntry.
Simulink reports: Use slreportgen.report.Report (not mlreportgen.report.Report) — it extends the base with model compilation support required by SystemIO, ExecutionOrder, and other Simulink reporters.
Multipage HTML: Use mlreportgen.dom.Document with "html-multipage" type + HTMLPage objects. This is the only case where you use the DOM Document instead of the Report API Report.
Core Workflow: Standard Report
TitlePage, TableOfContents, ListOfFigures, and ListOfTables are optional — include only when the task requires them. The minimal report is just Report + content + close.
import mlreportgen.report.*
import mlreportgen.dom.*
rpt = Report("MyReport","pdf");
append(rpt,TitlePage(Title="Report Title",Author="Team")); % optional
append(rpt,TableOfContents()); % optional
append(rpt,ListOfFigures()); % optional
append(rpt,ListOfTables()); % optional
ch = Chapter("Results");
append(ch,Paragraph("Analysis complete."));
% Auto-numbered table
data = FormalTable(["ID","Value"],[1 10; 2 20]);
bt = BaseTable(data);
bt.Title = "Measured values";
append(ch,bt);
% Auto-numbered figure
fig = figure("Visible","off");
plot([1 2],[10 20]);
rptFig = Figure(fig);
rptFig.Snapshot.Caption = "Value trend";
append(ch,rptFig);
close(fig);
append(rpt,ch);
close(rpt);
rptview(rpt);
Core Workflow: Simulink Report
load_system(modelName);
% MUST use slreportgen.report.Report for Simulink content
rpt = slreportgen.report.Report(outputPath,"pdf");
append(rpt,mlreportgen.report.TitlePage("Title","Model Report"));
append(rpt,mlreportgen.report.TableOfContents());
ch = mlreportgen.report.Chapter("Diagrams");
% Root diagram — direct reporter
rootDiag = slreportgen.report.Diagram(modelName);
rootDiag.Snapshot.ScaleToFit = true;
append(ch,rootDiag);
% Subsystems — finder pattern (iterator for memory efficiency)
finder = slreportgen.finder.SystemDiagramFinder(modelName);
finder.IncludeRoot = false;
finder.SortType = "alphabetical";
while finder.hasNext()
result = finder.next();
sec = mlreportgen.report.Section("Title",result.Name);
append(sec,result);
append(ch,sec);
end
append(rpt,ch);
close(rpt);
rptview(rpt);
Choosing Built-In vs Custom Reporters
Before writing code, analyze requirements against built-in reporter capabilities:
- List all content/format requirements — title page fields, page borders, headers/footers, branded styling
- Check built-in reporters. Built-in
TitlePagehas: Title, Subtitle, Author, Publisher, PubDate, Image. Built-inChapter/Sectionprovide headings, auto-numbering, and a Content hole. - If built-in reporters meet all requirements, use them directly
- If any requirement is unmet, create custom reporters:
- Single custom reporter — see references/custom-reporters.md
- Multiple reporters sharing a visual identity — see references/report-package.md
Common triggers for custom reporters:
- Title page needs fields beyond the standard set (project name, facility, contract number)
- Page borders, watermarks, or custom page layout
- Page headers/footers with dynamic content (per-chapter images, tickers)
- Branded table variants with different header colors
- MATLAB-generated logos (geometric shapes drawn with plot/patch + exportgraphics)
Do NOT force-fit requirements into built-in properties (e.g., concatenating fields into Subtitle). Create a custom reporter instead.
Do NOT build custom title pages with raw DOM elements (Paragraphs, Images appended to a Chapter). Always use customizeReporter for template-based layout and format portability.
Decision Tree: What Reference Do I Need?
| I need to... | Reference | |--------------|-----------| | Build a standard report with chapters, figures, tables, verification | references/report-api-patterns.md | | Work with DOM tables, HTML inclusion, multipage HTML, Number/NumberFormat | references/dom-api-patterns.md | | Understand template file types, locate/inspect templates | references/template-system.md | | Look up built-in template holes, styles, page layout (pre-computed) | references/template-reference.md | | Create a custom reporter class (customizeReporter, holes, headers) | references/custom-reporters.md | | Build a multi-reporter package with shared styles and buildTemplates | references/report-package.md | | Generate Simulink model reports (finders, orientation, centering) | references/simulink-report.md | | Look up all Simulink finders and reporters | references/finders-and-reporters.md | | Iterate struct arrays into chapters with custom reporters | references/data-driven-report-pattern.md | | Edit template styles (colors, fonts, headers, footers, TOC) | references/template-system.md |
Key Functions
| Class | Purpose | Package |
|-------|---------|---------|
| Report | Top-level report container | mlreportgen.report |
| TitlePage | Title page with title, subtitle, author | mlreportgen.report |
| TableOfContents | Auto-generated TOC | mlreportgen.report |
| Chapter / Section | Document structure | mlreportgen.report |
| Figure | Auto-numbered figure from MATLAB figure | mlreportgen.report |
| FormalImage | Auto-numbered image from file with caption | mlreportgen.report |
| BaseTable | Auto-numbered table wrapper (pass FormalTable) | mlreportgen.report |
| FormalTable | Table with header/body/footer from cell arrays | mlreportgen.dom |
| Template (3-arg) | Edit templates: Template(out,fmt,src) | mlreportgen.dom |
| HTMLFile / HTML | Include HTML content in any output format | mlreportgen.dom |
| HTMLPage | Page in multipage HTML document (R2024a+) | mlreportgen.dom |
| Number | Numeric DOM object (use with NumberFormat) | mlreportgen.dom |
| TemplateHole | Placeholder filled at report time | mlreportgen.dom |
| Page / NumPages | Page number / total pages | mlreportgen.dom |
| *.customizeReporter | Scaffold custom reporter + templates | mlreportgen.report |
| getStyle / replaceStyle | Modify template styles | mlreportgen.dom |
| slreportgen.report.Report | Report container for Simulink content | slreportgen.report |
| slreportgen.report.Diagram | Diagram snapshot of a system | slreportgen.report |
| slreportgen.finder.SystemDiagramFinder | Find system/subsystem diagrams | slreportgen.finder |
| slreportgen.report.SystemIO | Report inputs/outputs (requires compilation) | slreportgen.report |
| slreportgen.report.ExecutionOrder | Report block execution order | slreportgen.report |
| slreportgen.report.LookupTable | Report lookup table data + plot | slreportgen.report |
| rptview | Display report (updates DOCX fields) | function |
| docview | Process Word documents (update fields, convert) | function |
Common Mistakes
| Mistake | Correct Approach |
|---------|-----------------|
| Using mlreportgen.dom.Document as report container | Use mlreportgen.report.Report. Exception: multipage HTML requires Document with "html-multipage" |
| Using mlreportgen.report.Report for Simulink content | Use slreportgen.report.Report — needed for model compilation |
| Using Report with "html" for multipage output | Use mlreportgen.dom.Document with "html-multipage" + HTMLPage objects |
| Appending reporters to DOM objects (Paragraph, TableEntry) | Reporters can ONLY go in Report, Chapter, or Section. Use DOM objects inside TableEntry |
| Putting raw doubles in FormalTable cells | Use Number with NumberFormat in Style: n = Number(42); n.Style = {NumberFormat("%.0f")}. Put n directly in cell arrays. See references/dom-api-patterns.md § Number and NumberFormat |
| NumberFormat("$%.0f") or NumberFormat("%,.0f") | Only standard sprintf specifiers work (no $, no %,, no %d). For currency/units, wrap Number in Paragraph and prepend/append Text |
| Customizing only "default"/"even" page headers | Customize ALL page types: "first", "default", "even" — but differentiate content (see below) |
| Putting StyleRef (chapter title) in the first-page header | First page already displays the chapter heading — omit StyleRef from "first" header. Use it only in "default"/"even" for wayfinding |
| Opening DOCX with winopen/open/start | Use rptview(rpt) or docview(file,"updatefields") — triggers field update |
| Using ColSpec/ColSpecGroup for widths | Use TableColSpecGroup + TableColSpec with Width in Style |
| Setting widths without ResizeToFitContents(false) | Add ResizeToFitContents(false) to table Style; set absolute ft.Width (not "100%") |
| TemplateParagraphStyle.Formats = {Bold(true)} | Use array: `Format
Truncated for display — read the full file on GitHub.
Related Skills
siyuan
46.6kAn open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
