Install
openclaw skills install kai-report-creatorUse when the user wants to CREATE or GENERATE a report, business summary, data dashboard, or research doc — 报告/数据看板/商业报告/研究文档/KPI仪表盘. Handles Chinese and English equally. Supports generating from raw notes, data, URLs, or an approved plan file. Use for --plan (structure first), --generate (render to HTML), --review (one-pass automatic refinement), --themes (preview styles), --from FILE, --bundle, --export-image flags. Does NOT apply to exporting finished HTML to PPTX/PNG (use kai-html-export) or creating slide decks (use kai-slide-creator).
openclaw skills install kai-report-creatorGenerate single-file HTML reports from source notes or .report.md IR. Keep this file as a thin router: load only the references needed for the current path, and move detailed contracts into references/, scripts, tests, or templates.
[数据待填写] / [INSERT VALUE] when data is missing..report.md IR first, then HTML.report-summary, section annotations, and component data machine-readable.SKILL.md routes work and names hard gates; detailed rules live in references.When invoked as /report [flags] [content], parse flags first:
| Flag | Action |
|---|---|
--plan "topic" | Write .report.md IR only. Stop after saving it. |
--generate [file] | Render one .report.md IR to HTML. With no file given, extract exactly one valid IR block from context. |
--review [file] | Refine an existing HTML report with references/review-checklist.md. |
--themes | Write the themes preview HTML. |
--from <file> | If the file starts with frontmatter, treat as IR; otherwise create IR, then render. |
--theme <name> | Override the theme. Built-ins: corporate-blue, minimal, dark-tech, dark-board, data-story, newspaper, regular-lumen, fangsong. |
--template <file> | Use a custom HTML template. See references/toc-and-template.md. |
--output <file> | Save to this path instead of the default. |
--bundle | Inline CDN assets where supported. |
--export-image [mode] | After HTML generation, run scripts/export-image.py; mode is im, mobile, desktop, or all. |
| no flags + text | Create IR internally, then render HTML. |
| no flags + IR in context | Treat as --generate from context. |
Default output filename: report-<YYYY-MM-DD>-<slug>.html. Slug: lowercase ASCII, non-alphanumeric to hyphens, collapse hyphens, trim, max 30 chars.
Load references by route; do not read every reference by default.
| Route | Always load | Conditional load |
|---|---|---|
--plan | references/spec-loading-matrix.md, references/design-quality.md | references/regular-report-content-rules.md for periodic reports |
--generate | references/html-shell-template.md + every references/html-shell/*.md, references/theme-css.md, references/review-checklist.md | references/rendering-rules.md then only the references/rendering/*.md files required by the IR; references/anti-patterns.md for visual anchors; references/diagram-decision-rules.md for diagrams; references/regular-report-content-rules.md for periodic reports |
--review | references/review-checklist.md | references/review-report-template.md if a structured change summary is requested |
| custom theme/template | references/theme-css.md, references/toc-and-template.md | custom theme reference.md or theme.css |
Load references/spec-loading-matrix.md before --plan and --generate as a silent classifier. It covers optional archetypes: brief, research, comparison, update.
Always load references/anti-patterns.md before --generate. Load references/diagram-decision-rules.md whenever a diagram or diagram-like structure is being considered.
.report.md has three parts:
--- delimiters.## / ### headings.:::tag [param=value] ... :::.Minimal frontmatter:
---
title: Report Title
theme: corporate-blue # Optional. Default: corporate-blue
date: YYYY-MM-DD
lang: zh
report_class: mixed
archetype: research # Optional lightweight archetype hint for silent classification.
audience: "Busy decision-maker"
decision_goal: "Decide next move"
must_include:
- Source truth that must survive compression
must_avoid:
- Decorative placeholder chart
charts: cdn
toc: true
animations: true
abstract: "One-sentence summary"
poster_title: "Optional stronger poster headline"
poster_subtitle: "Optional poster subtitle"
poster_note: "Optional short closing sentence"
template: ./my-template.html
theme_overrides:
primary_color: "#E63946"
custom_blocks:
my-tag: |
<div class="my-class">{{content}}</div>
---
For trivial reports, omit optional fields. For high-stakes or complex reports, keep report_class, audience, decision_goal, must_include, and must_avoid so review/evals can detect drift.
Poster summary mode is opt-in. Do not infer poster_title or poster_subtitle from punctuation in title.
IR validity terms: invalid_syntax, invalid_semantics, contract_conflict, auto_downgrade_target.
Canonical component routing lives in references/rendering-rules.md; component details live in references/rendering/*.md. Compatibility anchors that must remain discoverable here:
:::kpi canonical body uses items:.Date tokens: YYYY-MM-DD, YYYY-MM, YYYY, Q[1-4] YYYY, Day N, Week N, Month N.Auto-detect lang unless frontmatter sets it: use zh when CJK is material or appears in the title/topic; otherwise use en. Apply language to placeholders, TOC labels, date display, and shell labels.
If no theme is provided, pick by intent, first match wins:
| Signal | Theme |
|---|---|
| weekly/daily/monthly/work progress/周报/日报/月报/本周/下周 | regular-lumen |
| sales/revenue/KPI/quarterly/business/销售/营收/业绩/季报 | corporate-blue |
| research/survey/whitepaper/internal/研究/调研/白皮书 | minimal |
| tech/architecture/API/system/performance/工程/架构 | dark-tech |
| news/industry/trend/新闻/行业/趋势 | newspaper |
| annual/story/growth/retrospective/年度/增长/复盘 | data-story |
| formal document/official notice/公文/正式报告/通知/制度 | fangsong |
| board/dashboard/status/看板 | dark-board |
| generic project progress/项目进展/项目状态 | corporate-blue |
Classify content by numeric density: narrative < 5%, mixed 5-20%, data > 20%; short topics default to mixed.
--plan Flowreport_class; optionally add archetype only when the report clearly matches brief, research, comparison, or update.regular-lumen or periodic keywords, load references/regular-report-content-rules.md..report.md with complete frontmatter, 3-5 useful sections, source-faithful structure, and placeholders only where data is missing.theme_overrides only for a small content-tone color hint; do not create a new design system in the IR.report-<slug>.report.md.--plan mode.Narrative rhythm reminders: lead-block, section-quote, and action-grid are optional prose upgrades. claim -> explanation -> scan anchor is a cadence, not a quota. These are optional prose upgrades, not default required blocks. If uncertain, keep normal paragraphs and add one clearer scan anchor instead of forcing a cadence block. Do not add more than one of lead-block / section-quote / action-grid by default inside the same section unless the source material clearly warrants it.
--generate Flowreferences/html-shell/*.md; component rules load by IR inventory via references/rendering-rules.md.lang, theme, report_class: mixed default, archetype, date display, chart mode, TOC, animation, template, and theme overrides.scripts/guard_validate.py with IR text from file or extracted context.auto_downgrade_target (kpi -> callout, chart -> table, timeline -> list, diagram -> callout) and mention the downgrade.references/rendering-rules.md, references/design-quality.md, and the path-specific references/rendering/*.md files selected from the IR.references/html-shell-template.md plus all references/html-shell/*.md; follow Shell metadata, version/theme metadata, export completeness, and the duplicate-date guard.<meta name="ir-hash" content="sha256:[ir-hash]"> from the exact IR text, not the file path.references/theme-css.md: theme before-marker, shared CSS, theme post-shared override, TOC/shell CSS, frontmatter overrides.::: in HTMLir-hash.kpi-value and report-summary KPI values; no placeholder or status-only KPI values.number body numerals use tabular lining numeralstext-align: justify, black-background flood, body letter-spacing > 0.05em, or mobile-hidden critical controlsscripts/html_quality_gate.py on the rendered HTML. It must pass standard shell IDs, theme fidelity, and KPI value checks. If it fails, fix the HTML and rerun it before reporting success.data-template="kai-report-creator", data-version, data-theme, id="toc-toggle-btn", id="toc-sidebar", id="card-mode-btn", id="sc-overlay", id="export-btn", id="export-menu", id="export-print", id="export-png-desktop", id="export-png-mobile", id="export-im-share", id="report-summary", plus the JS bindings for print/desktop/mobile/IM export. If any export item or binding is missing, rebuild the whole export block from references/html-shell/export.md.references/review-checklist.md, then write the HTML and report the path.When the report is explicitly comparing named vendors, models, or tools, set data-report-mode="comparison" on the outer report container and use .badge--entity-a/.badge--entity-b/.badge--entity-c only for entity identity.
--review FlowWhen the user runs /report --review [file]:
references/review-checklist.md.references/review-report-template.md when the user wants a structured summary.--themes And --export-imageFor --themes, read the theme preview template and write report-themes-preview.html verbatim.
For --export-image, after HTML generation run:
python <skill-dir>/scripts/export-image.py <output.html> --mode <mode>
If Playwright is unavailable, print install instructions and skip image export without failing HTML generation.
Generate complete self-contained HTML. The shell entry contract lives in references/html-shell-template.md; full shell structure, inline JS, export behavior, summary card, edit mode, TOC, print rules, and footer/watermark degradation rules live in references/html-shell/*.md.
All scripts are inline in the shell template. Never load nonexistent files such as templates/scripts/*.js.
For custom templates and TOC slug rules, use references/toc-and-template.md.
Always end with the file path and a one-sentence summary. If a validation, guard, or export step could not run, say exactly which step was skipped and why.