preview_cardlisted
Install: claude install-skill zapgun-ai/clawback
# clawback share-card preview
Run `.skills/scripts/preview_card.sh` from the project root. It composes the exact card
the report GUI would let a user download/post for a run, so you can SEE it
without driving the browser.
```bash
.skills/scripts/preview_card.sh runs/<run> # -> charts/share_card.{svg,png}
.skills/scripts/preview_card.sh runs/<run> --out /tmp # write the pair elsewhere
```
## What it does
1. `benchmark/bin/preview_card.js --in <run>` reads `summary.json`
(→ `deriveHeroModel`, the same hero logic the GUI uses) and the bare chart
`charts/tokens_saved.bg.svg`, encodes the chart as a `data:` URL exactly as
the GUI does, and writes the composed **`charts/share_card.svg`**
(chart background → translucent dark scrim → hero headline/sub/tagline).
2. The wrapper then rasterizes that SVG to **`charts/share_card.png`**,
preferring headless Google Chrome (true 1200×630, renders the nested chart),
falling back to macOS `qlmanage` Quick Look (offline, but pads to a square —
the card is the **top 630px**; the white strip below is padding). If neither
is present it leaves just the SVG with a note to open it in a browser.
## Why SVG, then a best-effort PNG
The shipped share PNG is rasterized **browser-side** from this same SVG
(`share_card.js` `svgToPngBlob`, via canvas). Adding a Node rasterizer would
pull a native dependency the product avoids — so the SVG is the source of truth
and the PNG here is only a convenience for eyeballing. If