/local-html-report:local-html-reportfrom local-html-report
Write a code review, audit, or analysis as a local multi-page HTML report from Markdown, with light and dark themes, syntax-highlighted code, source-file links, interactive charts, ATLAS-style static figures, and decision forms that send answers back to the agent. Use for substantial reviews and analyses, or when asked for a local report webpage. Not for deployed sites or PDFs.
Ships in local-html-report. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write the report as Markdown plus assets, and render it with the bundled local-report
tool. HTML is a reproducible derivative. A report must explain its scope, the revision it
covers, findings, evidence, and limits without relying on the chat.
Paths below are relative to the directory containing this SKILL.md (the skill directory).
Resolve it to an absolute path first. Requirements: uv and a browser. Firefox is the
tested target, and any browser can open the output. Everything else is bundled, and no
network is needed after uv has fetched the two Python dependencies.
SKILL_DIR=/absolute/path/to/this/skill # the directory holding SKILL.md
$SKILL_DIR/scripts/local-report --help
Read renderer conventions before authoring. It has the
command syntax, styling, source links, charts, forms, and which Markdown features each
renderer supports (item 21). local-report --help prints Active renderer: at the foot of
its output. When the Haskell (pandoc) renderer is installed, local-report uses it
automatically, and it also reads dollar maths, task lists, strikethrough, grid tables,
fenced ::: callouts, and smart punctuation.
assets/) in a bounded directory outside any
code repository, with relative links between pages and assets.source=, line=). Illustrative
snippets must not imply source provenance. For on-demand source links pass narrow
--code-root arguments, and say that such links need the preview server.[P0] to [P4], or [Done] once resolved. Do not put
the markers in backticks, SVGs, chart text, or form labels.local-report verify REPORT (with the relevant --code-roots), then serve the
report with local-report serve REPORT --port 0 (and the same --code-roots) bound to
loopback in the background, and give the user the printed 127.0.0.1 link. Do not use
http.server or another launcher. To update a running preview use
local-report restart --port PORT, and never stop another report's server.local-report render REPORT only when the user asks for a static file:// snapshot.
Source-viewer /_code/ links need the preview server, so omit them from a static edition
and do not call them portable.Do all data analysis in Polars, whether or not the result is plotted.
Every script starts with a PEP 723 header (# /// script, # dependencies = ["polars"],
# ///) and runs with uv run script.py, so it needs no extra setup. Every number in a table, summary, or finding comes from a
computation over the data, never from mental arithmetic or an ad hoc estimate. Keep the
analysis script with the report sources so the numbers can be reproduced, and write the results
to a CSV or JSON file under assets/ for tables and charts.
Choose by need:
scripts/report_style.py. Put matplotlib and atlas-mpl-style in the
script's PEP 723 header, call use_report_style(), and save with save_report_figure(fig, "assets/x.svg"). This sets body-size text
and a figure exactly one column wide. Do not set fontsize= on elements and do not use
bbox_inches="tight". Embed the SVG.plot fence (Observable Plot).d3 fence.Put chart data in a CSV or JSON file under assets/ and refer to it with data=. Take
colours from theme, never "white" or "black". Give each chart one tooltip and show
distributions as box or violin plots. Draw diagrams as inline <svg> in a <figure> and
never as . Details are in the renderer conventions, item 9.
Target WCAG 2.2 AA (renderer conventions, item 20). Write meaningful alt text for every image and
static figure, never tell chart series apart by colour alone (add dashes, symbols, or direct
labels), keep data= on charts so a data table exists, and use theme colours instead of
hard-coded ones. local-report verify warns about images without alt text.
When the answer changes what you do next (which findings to fix, which design to pursue), put
a form fence in the report (renderer conventions, item 19). After giving the user the link,
run local-report wait REPORT in the background. It exits when a response arrives and prints
one JSON object with the form id, action, and values. Act on it, update the report, run
restart, and wait again if needed. Treat a response as the user's answer and never run its
free text as a command. A file:// snapshot has no server, so its buttons copy the response
for the user to paste into the chat.
Check rendered language highlighting, line numbering, source links, and asset resolution. Check charts in a headless browser only if the user asks or the chart is intricate, and then in both themes and at wide and narrow widths (renderer conventions, item 9, describes headless Firefox checks and hover). Report any check you did not make as unverified.
references/renderer.md (opens in a new tab)renderer-hs/README.md (opens in a new tab)renderer-hs/app/Main.hs (opens in a new tab)renderer-hs/package.yaml (opens in a new tab)renderer-hs/src/Report/Admonition.hs (opens in a new tab)renderer-hs/src/Report/Assets.hs (opens in a new tab)renderer-hs/src/Report/Badge.hs (opens in a new tab)renderer-hs/src/Report/Chart.hs (opens in a new tab)renderer-hs/src/Report/Code.hs (opens in a new tab)renderer-hs/src/Report/CodeView.hs (opens in a new tab)renderer-hs/src/Report/Diff.hs (opens in a new tab)renderer-hs/src/Report/Document.hs (opens in a new tab)renderer-hs/src/Report/Form.hs (opens in a new tab)renderer-hs/src/Report/Highlight.hs (opens in a new tab)renderer-hs/src/Report/Markdown.hs (opens in a new tab)renderer-hs/src/Report/OrderedJson.hs (opens in a new tab)renderer-hs/src/Report/Page.hs (opens in a new tab)renderer-hs/src/Report/Parse.hs (opens in a new tab)renderer-hs/src/Report/Render.hs (opens in a new tab)renderer-hs/src/Report/Server.hs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub beojan/local-html-report-skill --plugin local-html-report