Pdf Report
by @seitzbg
Generate a polished PDF report or summary from findings, data, or tables gathered earlier in the conversation. Use when the user asks to "make a PDF", "gener...
clawhub install skeet-pdf-reportπ About This Skill
name: pdf-report description: | Generate a polished PDF report or summary from findings, data, or tables gathered earlier in the conversation. Use when the user asks to "make a PDF", "generate a report", "export findings", "summarize as a PDF", or similar. Produces Typst source, compiles it with
typst, and reports the output path.
metadata: {"openclaw":{"emoji":"π","requires":{"bins":["typst"]}}}
pdf-report
Turn gathered conversation content (findings, data, tables) into a clean PDF via Typst. Two templates ship with this skill β pick one, fill it in, compile.
When to invoke
Trigger on any of:
If the user says "export" or "deliverable" without specifying format and the context has tabular data or distinct findings, ask once whether they want PDF before invoking.
Inputs to gather
Before writing any Typst, confirm or infer:
1. Title β ask if not obvious. Keep short (β€ 60 chars).
2. Subtitle / author β optional; leave blank or omit if unknown.
3. Content scope β exactly which findings/tables/sections from the
conversation belong in the document. Do not invent data the user did not
provide.
4. Output path β default ./report-YYYY-MM-DD.pdf in cwd. If a file with
that name exists, append -2, -3, etc.
Pick a template
| Template | Use when |
|----------|----------|
| templates/summary.typ | 1β3 sections, executive summary, β€ ~3 pages. Default. |
| templates/report.typ | 3+ distinct sections, title page + TOC desired, or user said "report". |
Both live next to this SKILL.md. Read the chosen one, then write a new
.typ file at (next to the target PDF) with placeholders
replaced and example tables swapped for real data.
Authoring rules
#table() with table.header(...). Right-aligntable.header(repeat: true, ...) repeats headers on page[...] content blocks; escape#, $, @, \ if they appear literally.
Compile
typst compile typst is at /home/linuxbrew/.linuxbrew/bin/typst (linuxbrew). If it's not
on PATH in the current shell, use the full path.
Error handling
If compile fails:
1. Read the error β Typst errors include file, line, and a usually-clear hint.
2. Fix the .typ source and retry once.
3. If it still fails, stop. Show the user:
- the error output,
- the path to the .typ source so they can edit directly.
Do not loop indefinitely on errors.
Reporting back
On success, tell the user:
pdftotext -l 1 or just typst query β or simply state.typ source is kept alongside for future tweaks.Offer to open it (xdg-open ) but do not open without confirmation.
Quick reference: minimal Typst patterns
// Two-column table with numeric right-align
#table(
columns: (auto, auto),
align: (left, right),
stroke: 0.5pt + gray,
inset: 7pt,
table.header([*Name*], [*Count*]),
[alpha], [42],
[beta], [108],
)// Bullet list
one
two
three // Inline emphasis
This is *bold* and this is _italic_ and this is mono.
// Math (inline and block)
The energy is $E = m c^2$.
$ integral_0^infinity e^(-x^2) dif x = sqrt(pi) / 2 $
// Image
#figure(image("plot.png", width: 80%), caption: [A plot.])