Skip to content
Back to skills

Report Rendering

ASecurity

Apply when a report, analysis, or write-up is finished and someone other than the author will read it. Ship it as a single self-contained HTML file, and a PDF where a fixed page is wanted. Markdown split across several files in a repo is a working artifact, not a delivered report. Reach for it on: a multi-section analysis, a report with figures, anything to be handed to someone without a checkout, or any request to 'show me the report'.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentspythongo

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add EdbertChan/catstack --skill report-rendering --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Report Rendering?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Report Rendering
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/edbertchan-report-rendering/badge)](https://www.skillsdirectory.com/skills/edbertchan-report-rendering)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: report-rendering
description: "Apply when a report, analysis, or write-up is finished and someone other than the author will read it. Ship it as a single self-contained HTML file, and a PDF where a fixed page is wanted. Markdown split across several files in a repo is a working artifact, not a delivered report. Reach for it on: a multi-section analysis, a report with figures, anything to be handed to someone without a checkout, or any request to 'show me the report'."
disable-model-invocation: true
---

# Render the report

A report that only exists as markdown in a repo has not been delivered. It has
been left where the author was working. The reader either lacks a checkout, or
has one and must open several files in the right order and imagine the figures
in place.

Ship one file that opens by double-clicking it.

## Must always

- **One self-contained HTML file.** Embed every figure as a `data:` URI rather
  than linking a path. A document that breaks when moved is not a deliverable.
  Inline the CSS for the same reason.
- **Concatenate the sections in reading order**, with a table of contents and
  each source path shown beside its section, so a reader can find the file
  behind any claim.
- **Add print styles.** `page-break-before` on each top-level section, and
  unstick any `position: sticky` table headers, which otherwise repeat or
  vanish across page boundaries. Without this the PDF is unusable even though
  the HTML looks correct.
- **Produce the PDF from the same HTML**, so the two cannot disagree.
- **Commit both**, and say where they are. A rendered report that lives only in
  a temp directory has the same problem as the markdown did.

## Must never

- Hand back a list of markdown paths in response to "show me the report."
- Link figures by relative path in a document intended to be sent anywhere.
- Reach for pandoc, LaTeX, or a new dependency when the machine already has a
  browser. The recipe below needs nothing else.
- Render a report whose numbers have not passed their own gate. Rendering makes
  a claim easier to circulate, which is a reason to be more careful about what
  is in it, not less. See [[principle-report-the-disqualifier]].

## The recipe

Markdown to self-contained HTML to PDF, with no toolchain beyond a browser:

```python
import base64, markdown
from pathlib import Path

md = markdown.Markdown(extensions=["tables", "fenced_code", "toc", "sane_lists"])
parts = []
for title, path in SECTIONS:
    md.reset()
    parts.append(f"<section><h1>{title}</h1>{md.convert(Path(path).read_text())}</section>")

fig = base64.b64encode(Path(FIGURE).read_bytes()).decode()
parts.append(f'<figure><img src="data:image/png;base64,{fig}"/></figure>')
Path("report.html").write_text(TEMPLATE.format(body="".join(parts)))
```

```sh
google-chrome --headless --disable-gpu --no-sandbox \
  --print-to-pdf=report.pdf --print-to-pdf-no-header report.html
```

`md.reset()` between sections matters: the `toc` extension accumulates state
across calls, so without it later sections inherit earlier anchors.

## Grounding

- Single-file, self-contained documents as a distribution format → the MHTML
  and `data:` URI approach; RFC 2397, "The 'data' URL scheme" (1998)
  <https://doi.org/10.17487/RFC2397>.
- Literate and reproducible reporting, where the document and the analysis that
  produced it are one artifact → Donald E. Knuth, "Literate Programming,"
  *The Computer Journal* 27(2), 97-111 (1984)
  <https://doi.org/10.1093/comjnl/27.2.97>; Roger D. Peng, "Reproducible
  Research in Computational Science," *Science* 334(6060), 1226-1227 (2011)
  <https://doi.org/10.1126/science.1213847>.
- Delivering a result in the form the reader can act on, rather than the form
  the author worked in: **no known prior art** as a stated principle; it is
  ordinary practice rather than a named result.

Related: [[principle-report-the-disqualifier]] (what the report must contain
before it is worth rendering).

Files in this skill

  • SKILL.md3.9 KB
  • tests/fires_example.md1.3 KB
  • tests/stays_silent_example.md807 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.