report-builder
Skill7 starsChanged 4 months agoMITView on GitHub
Build a self-contained single-page HTML report or dashboard from data with Python, Jinja2, Bootstrap 5 and Chart.js or Plotly. Use whenever the task is an HTML report, dashboard, metrics or status page, or "visualize this" for a CSV, DataFrame or JSON. Covers safe Jinja2 autoescaping, passing data to JS with tojson, choosing Chart.js or Plotly, and shipping one portable file.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- cogover/cogover-skillstheir own version, first seen Sep 7, 2026
- metalaihq/trip-event-curatortheir own version, first seen Jul 8, 2026
- magiskboy/agent-skillstheir own version, first seen Jun 15, 2026
- Pascal-Neubauer/Claude_Skillstheir own version, first seen Apr 20, 2026
- inbharatai/claude-skillstheir own version, first seen Mar 14, 2026
- anthropics/knowledge-work-pluginstheir own version, first seen Jan 29, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- anthropics/knowledge-work-plugins★ 26ksame name
- inbharatai/claude-skills★ 37same name
- cogover/cogover-skills★ 9same name
- metalaihq/trip-event-curator★ 1same name
- Pascal-Neubauer/Claude_Skills★ 1same name
- magiskboy/agent-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- beadsSkill
- azadvertizerSkill
- business-planSkill
- c7searchSkill
- clear-and-humanSkill
- convert-to-webpSkill
- cv-and-humanSkill
- cv-cover-letterSkill
- cv-evidence-baseSkill
- dev-fleetSkill
- excalidraw-diagramSkill
- frontier-roundsSkill
- ghost-publishSkill
- hook-and-humanSkill
- interview-panelSkill
- job-feedsSkill
- markdown-converterSkill
- nano-banana-pro-jsonSkill
- readabilitySkill
- social-image-prepSkill
- source-snapshotSkill
- terraform-registrySkill
- terragrunt-skillSkill
- transcribe-summarizeSkill
- travel-planningSkill
- trilium-captureSkill
- use-linearisSkill
- ux-auditSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 0 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Run render.py by its absolute path — it lives in this skill's base directory (announced when the skill loads, usually …
- Very specific: line 51
Only reach for | safe on content you generated and trust (e.g.
- Very specific: line 73
Default to Chart.js for status/metrics dashboards.
- Very specific: line 97
Keep custom CSS to a small <style> block for things Bootstrap doesn't cover (chart container heights, print tweaks).
- Very specific: line 110
Don't assert a current Bootstrap/Chart.js/Plotly version or a chart-config field from memory — these drift.
- Very specific: line 133
Write a small prep step that produces a JSON context ({"title": ..., "kpis": [...], "chart": {...}, "rows": [...], "generated_at": "...", …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Report Builder
The job is almost always the same shape: data in → one HTML file out, rendered by a
template, viewable by double-clicking with no server. Keep that shape and the work stays
small and reproducible. The two failure modes to design against are (1) non-determinism
(charts that fetch live, timestamps that drift) and (2) unsafe data interpolation (raw
values dropped into HTML or <script>). Both are solved below.
The pattern
data (CSV / DataFrame / JSON)
└─ your prep code (pandas, optional) → a plain JSON "context"
└─ Jinja2 template (.html.j2) → scripts/render.py
└─ one self-contained report.htmlSeparate prep (project-specific, may use pandas) from render (generic, reusable).
scripts/render.py is the generic half — point it at a template and a JSON context file
and it emits HTML. Don't rewrite it per project.
Run render.py by its absolute path — it lives in this skill's base directory (announced
when the skill loads, usually ~/.claude/skills/report-builder); a relative
report-builder/scripts/render.py won't resolve from another repo. It has PEP 723 inline deps
(jinja2), so it must run under uv — never bare python. Define an rbuild function per
block (a function passes arguments correctly under bash and zsh, where a plain $VAR doesn't
word-split; re-declare it per block since shell state doesn't persist between tool calls):
# uv is required here (jinja2); resolve it even when it's not on a bare PATH (non-interactive
# shells often drop ~/.local/bin or the Homebrew bin -> `uv: command not found`):
UV="$(command -v uv || ls "$HOME/.local/bin/uv" "$HOME/.cargo/bin/uv" /opt/homebrew/bin/uv /usr/local/bin/uv 2>/dev/null | head -1)"
rbuild() { "$UV" run "$HOME/.claude/skills/report-builder/scripts/render.py" "$@"; }
rbuild --template my_report.html.j2 \
--data context.json \
--out report.html --title "Q2 Cost Report"Two rules that prevent the common bugs
- Autoescape stays ON.
render.pyenables it and usesStrictUndefined, so a typo'd variable fails loudly instead of rendering blank, and text values can't inject markup. Only reach for| safeon content you generated and trust (e.g. a Markdown→HTML block you produced). Never| safeon data that originated from a user, a file, or an API. - Pass data to JavaScript with
| tojson, never string-building. To hand a dataset to Chart.js/Plotly, serialize it in the template:
This is correct and XSS-safe. Building JS by concatenating values is the classic injection hole — don't.<script> const chartData = {{ data | tojson }}; {# safe: escapes </script>, quotes, unicode #} </script>
Chart.js or Plotly — pick per report
| Use Chart.js when | Use Plotly when |
| Standard charts: bar, line, pie, doughnut, radar | Interactive exploration: zoom, pan, rich hover, selection |
| Small bundle, fast, dashboard-y look | Statistical/scientific: box, violin, heatmap, 3D, contour |
| Few hundred → few thousand points | Large datasets, or users will drill into the data |
| You want a clean default aesthetic with little config | You need subplots, dual axes, or precise scientific layout |
Default to Chart.js for status/metrics dashboards; reach for Plotly when the reader needs to interrogate the data, not just read it. Don't load both unless a report truly needs each.
Self-contained vs. CDN
- CDN (default for internal/online reports): Bootstrap 5, Chart.js, Plotly via
<script src="https://cdn...">. Smallest file, but needs network at view time. - Vendored / inline (for portable, air-gapped, or archived reports): download the libs and inline them, or commit them next to the report. Choose this when the report must open with no network, or must look identical years later. State which mode you chose in the report's provenance footer.
The starter template (assets/report-template.html.j2) uses CDN with the swap point
marked. Pin a major version in the URL; verify the current version rather than guessing
a patch number (see Fact-discipline).
Layout with Bootstrap 5
Lean on the grid and components instead of hand-rolling CSS:
- Page frame: a
container/container-fluid, a header row, thenrow/col-*for content. - KPIs:
cardcomponents in a responsiverow-cols-1 row-cols-md-3grid. - Tables:
<table class="table table-sm table-striped">; for long tables, wrap intable-responsive. - Keep custom CSS to a small
<style>block for things Bootstrap doesn't cover (chart container heights, print tweaks). Don't fight the framework.
Reproducibility (so the same data gives the same report)
- Pass any "generated at" timestamp in via the context (
--data), don't calldatetime.now()inside the template — that way a re-render of the same inputs is byte-stable, and tests can assert on output. - Record provenance in a footer: source of the data, the render command, lib versions/mode (CDN vs vendored). A report a reader can't trace is a report they can't trust.
Fact-discipline (library versions & APIs)
Don't assert a current Bootstrap/Chart.js/Plotly version or a chart-config field from memory — these drift. Confirm the version and the option name before pinning:
# resolve then fetch — see the c7search skill (avoid `ask`)
LIB=$(c7search resolve --library-name "chart.js" "bar chart options" --json --limit 1 | jq -r '.[0].id')
c7search docs "$LIB" --topic "bar chart options" --tokens 3000Or check the official docs/CDN. If you can't verify, leave the version as a clearly-marked
placeholder rather than inventing a number. (Defer to the fact-verifier agent when a
version gates the build.)
Files in this skill
scripts/render.py— generic Jinja2 renderer (autoescape + StrictUndefined; PEP 723 inline deps;uv run-ready). Reuse it; don't reinvent it.assets/report-template.html.j2— starter: Bootstrap 5 frame, KPI cards, a Chart.js example wired through| tojson, a data table, and a provenance footer. Copy and adapt.
Quick start
- Copy
assets/report-template.html.j2into the project; adapt the markup. - Write a small prep step that produces a JSON context (
{"title": ..., "kpis": [...], "chart": {...}, "rows": [...], "generated_at": "...", "provenance": {...}}). rbuild --template <tpl> --data <ctx.json> --out report.html(definerbuildas shown above).- Open
report.html. Verify chart renders, table populates, noUndefinederrors.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

