confluence-publishlisted
Install: claude install-skill vanducng/skills
# confluence-publish
A report that looks right in a browser loses its look on Confluence: class-based styling is dropped, `<b>` and inline SVG do not survive, tables split columns evenly, and an image with a percentage width shows as a small thumbnail. The scripts here produce a body that keeps the layout. `S=<this skill dir>/scripts`.
## Rules
1. **Read the HTML contract once per session:** `twg confluence content body-formats html`. The update flag `--ack-body-formats` stands for having read it.
2. **Never hand-convert the report.** Run `$S/to_confluence.py`; it applies every markup rule and lints its own output (exit 1 on a problem). After editing a body by hand, run `$S/to_confluence.py --lint body.html`.
3. **Read twg JSON with `$S/twgj.sh <twg args>`**, not by parsing stdout. twg may print a YAML summary whose `output_files.stdout` is a file holding the JSON; the helper handles both shapes.
4. **Every chart is an attachment.** Render SVG and Mermaid to PNG first (`references/charts.md`: text size math, 2x export). Upload, then map the `fileId` in `media.json`.
5. **A re-upload under the same file name gets a new `fileId`.** Update `media.json`, rebuild the body and update the page, or the page keeps the old picture.
6. **Full-width page:** pass `--content-width max` on create and on every update.
7. **Updates need a fresh `snapshotToken`** from `get` right before the update. A rename is `update --title` alone: do not resend the body.
8. **A write is not proof.** Meas