FC Branded PDF
Use this skill to produce local FC / Poker Skill branded PDFs from Markdown or
document-like content.
What it covers:
- a reusable Markdown report template
- local Markdown -> branded PDF rendering
- FC / Poker Skill letterhead styling through bundled CSS and logo assets
- verification before the PDF is shared or attached
When to use
Use when:
- you are producing a report-like artifact for FC / Fun Country / Poker Skill
- the deliverable should be a polished branded PDF
- the user asks for an FC-branded PDF, FC letterhead, or a PDF packet
- you want a durable local Markdown source plus a rendered local PDF
Typical outputs:
- analysis packet
- memo
- experiment readout
- QA summary
- postmortem
- investor or operator brief
Do not use when:
- a normal chat reply is enough
- the deliverable is primarily slides, images, or video
- the task is to archive or upload a file to Drive
Linked files in this skill
templates/report_template.md
scripts/render_markdown_to_pdf.sh
assets/pokerskill.css
assets/logo_web.png
Core workflow
- Identify the source content and decide whether it is already Markdown.
- If the source is a Google Doc export,
.docx, .html, notes, pasted text,
or multiple files, make a clean Markdown staging file first. Preserve the
source order, headings, links, tables, and important images.
- Start from
templates/report_template.md when creating a new report from
scratch. Use an existing Markdown artifact when the content already exists.
- Render the Markdown with
scripts/render_markdown_to_pdf.sh.
- Verify page count, extracted text, and visual preview for layout-sensitive
PDFs before reporting the result.
- Return the local PDF path. If the host supports file attachments, attach the
rendered PDF from that path.
Render command
bash "{baseDir}/scripts/render_markdown_to_pdf.sh" \
"/abs/path/to/report.md" \
--title "Human-readable report title"
Default behavior:
- renders a branded FC / Poker Skill PDF
- outputs next to the source Markdown file unless
--out is provided
- uses the local bundled CSS/logo inside this skill
Theme notes:
- preferred env var:
FC_BRANDED_PDF_THEME
- legacy fallback env vars:
HERMES_PDF_THEME, then AGENTS_PDF_THEME
- bundled branded theme:
fc (alias: pokerskill)
- fallback minimal theme:
plain
Source conversion notes
- For
.md input, render directly.
- For
.docx, use pandoc source.docx -t gfm -o source.md first, then render
the Markdown.
- For
.html, use pandoc source.html -t gfm -o source.md first, then render.
- For pasted content, write a local Markdown source file first.
- For multiple inputs, combine them into one ordered Markdown packet before
rendering.
- Do not use this skill to upload, archive, or move the PDF to Drive.
QA before shipping
Preview the PDF as images before sending if layout matters, and verify text
extraction for important headings/sections.
pdfinfo "/abs/path/to/report.pdf" | grep '^Pages'
OUT_DIR="/tmp/fc-branded-pdf-preview"
mkdir -p "$OUT_DIR"
pdftoppm -png -r 300 -f 1 -l 3 \
"/abs/path/to/report.pdf" \
"$OUT_DIR/report_page"
pdftotext "/abs/path/to/report.pdf" "$OUT_DIR/report_text.txt"
rg "Executive Summary|TL;DR|Appendix" "$OUT_DIR/report_text.txt"
Check for:
- clipped wide tables
- broken headers
- missing images
- ugly wrapping
- raw Markdown syntax leaking into the PDF
Layout rules
- prefer fewer columns
- shorten headers aggressively
- split wide tables if needed
- move very wide data to an appendix or image
- keep tables readable in preview, not just locally
- Mermaid/code-fenced diagrams render as raw code with the stock Markdown ->
HTML -> PDF path. If a visual diagram matters, pre-render it to an image or
HTML before PDF generation; otherwise accept the readable code block.
Wide-table fallback learned from FC audit PDFs
When combining long Markdown packets into a letter-size PDF, normal pipe tables with 5+ columns can render technically unclipped but still unreadable: headers split mid-word and long identifiers wrap across many arbitrary line breaks.
Reusable fallback:
- before rendering, convert Markdown pipe tables with 5+ columns into compact “row cards” / nested bullet blocks
- preserve every cell, but represent each row as:
- **<first column header>:** <first cell>
- nested bullets for the remaining columns
- add CSS to prevent card-like bullets from splitting mid-row:
<style>
.page-break { page-break-before: always; break-before: page; }
li { break-inside: avoid; page-break-inside: avoid; }
code { white-space: pre-wrap; }
</style>
Verification discipline:
- do not only check page count and first pages
- use
pdftotext to find pages containing wide sections such as Routing table, Metrics, or summary table
- render those pages with
pdftoppm
- inspect with vision; if a row is cut off or a table is cramped, regenerate with row-card fallback and re-preview the affected pages
Good outcome
A good report has:
- durable Markdown source
- branded PDF that looks like the shared Poker Skill theme
- clean table handling
- a local absolute PDF path
- no Drive archive or upload side effect
Notes
- The branded asset bundle stays inside the skill itself:
assets/pokerskill.css
assets/logo_web.png
scripts/render_markdown_to_pdf.sh
- If the renderer or theme drifts, update this skill bundle instead of inventing a parallel PDF workflow.
1---2name: fc-branded-pdf3description: Convert Markdown or document content into FC / Poker Skill branded PDF artifacts using the bundled letterhead CSS, logo, and local renderer. Use for reports, memos, briefs, packets, audits, summaries, exported document tabs, or any ask for an FC-branded PDF / FC letterhead PDF. Not for Drive archival, slide decks, image/video generation, or ordinary chat answers.4license: MIT5---67# FC Branded PDF89Use this skill to produce local FC / Poker Skill branded PDFs from Markdown or10document-like content.1112What it covers:13- a reusable Markdown report template14- local Markdown -> branded PDF rendering15- FC / Poker Skill letterhead styling through bundled CSS and logo assets16- verification before the PDF is shared or attached1718## When to use1920Use when:21- you are producing a report-like artifact for FC / Fun Country / Poker Skill22- the deliverable should be a polished branded PDF23- the user asks for an FC-branded PDF, FC letterhead, or a PDF packet24- you want a durable local Markdown source plus a rendered local PDF2526Typical outputs:27- analysis packet28- memo29- experiment readout30- QA summary31- postmortem32- investor or operator brief3334Do not use when:35- a normal chat reply is enough36- the deliverable is primarily slides, images, or video37- the task is to archive or upload a file to Drive3839## Linked files in this skill4041- `templates/report_template.md`42- `scripts/render_markdown_to_pdf.sh`43- `assets/pokerskill.css`44- `assets/logo_web.png`4546## Core workflow47481. Identify the source content and decide whether it is already Markdown.492. If the source is a Google Doc export, `.docx`, `.html`, notes, pasted text,50 or multiple files, make a clean Markdown staging file first. Preserve the51 source order, headings, links, tables, and important images.523. Start from `templates/report_template.md` when creating a new report from53 scratch. Use an existing Markdown artifact when the content already exists.544. Render the Markdown with `scripts/render_markdown_to_pdf.sh`.555. Verify page count, extracted text, and visual preview for layout-sensitive56 PDFs before reporting the result.576. Return the local PDF path. If the host supports file attachments, attach the58 rendered PDF from that path.5960## Render command6162```bash63bash "{baseDir}/scripts/render_markdown_to_pdf.sh" \64 "/abs/path/to/report.md" \65 --title "Human-readable report title"66```6768Default behavior:69- renders a branded FC / Poker Skill PDF70- outputs next to the source Markdown file unless `--out` is provided71- uses the local bundled CSS/logo inside this skill7273Theme notes:74- preferred env var: `FC_BRANDED_PDF_THEME`75- legacy fallback env vars: `HERMES_PDF_THEME`, then `AGENTS_PDF_THEME`76- bundled branded theme: `fc` (alias: `pokerskill`)77- fallback minimal theme: `plain`7879## Source conversion notes8081- For `.md` input, render directly.82- For `.docx`, use `pandoc source.docx -t gfm -o source.md` first, then render83 the Markdown.84- For `.html`, use `pandoc source.html -t gfm -o source.md` first, then render.85- For pasted content, write a local Markdown source file first.86- For multiple inputs, combine them into one ordered Markdown packet before87 rendering.88- Do not use this skill to upload, archive, or move the PDF to Drive.8990## QA before shipping9192Preview the PDF as images before sending if layout matters, and verify text93extraction for important headings/sections.9495```bash96pdfinfo "/abs/path/to/report.pdf" | grep '^Pages'9798OUT_DIR="/tmp/fc-branded-pdf-preview"99mkdir -p "$OUT_DIR"100101pdftoppm -png -r 300 -f 1 -l 3 \102 "/abs/path/to/report.pdf" \103 "$OUT_DIR/report_page"104105pdftotext "/abs/path/to/report.pdf" "$OUT_DIR/report_text.txt"106rg "Executive Summary|TL;DR|Appendix" "$OUT_DIR/report_text.txt"107```108109Check for:110- clipped wide tables111- broken headers112- missing images113- ugly wrapping114- raw Markdown syntax leaking into the PDF115116## Layout rules117118- prefer fewer columns119- shorten headers aggressively120- split wide tables if needed121- move very wide data to an appendix or image122- keep tables readable in preview, not just locally123- Mermaid/code-fenced diagrams render as raw code with the stock Markdown ->124 HTML -> PDF path. If a visual diagram matters, pre-render it to an image or125 HTML before PDF generation; otherwise accept the readable code block.126127## Wide-table fallback learned from FC audit PDFs128129When combining long Markdown packets into a letter-size PDF, normal pipe tables with 5+ columns can render technically unclipped but still unreadable: headers split mid-word and long identifiers wrap across many arbitrary line breaks.130131Reusable fallback:132- before rendering, convert Markdown pipe tables with 5+ columns into compact “row cards” / nested bullet blocks133- preserve every cell, but represent each row as:134 - `- **<first column header>:** <first cell>`135 - nested bullets for the remaining columns136- add CSS to prevent card-like bullets from splitting mid-row:137138```html139<style>140.page-break { page-break-before: always; break-before: page; }141li { break-inside: avoid; page-break-inside: avoid; }142code { white-space: pre-wrap; }143</style>144```145146Verification discipline:147- do not only check page count and first pages148- use `pdftotext` to find pages containing wide sections such as `Routing table`, `Metrics`, or `summary table`149- render those pages with `pdftoppm`150- inspect with vision; if a row is cut off or a table is cramped, regenerate with row-card fallback and re-preview the affected pages151152## Good outcome153154A good report has:155- durable Markdown source156- branded PDF that looks like the shared Poker Skill theme157- clean table handling158- a local absolute PDF path159- no Drive archive or upload side effect160161## Notes162163- The branded asset bundle stays inside the skill itself:164 - `assets/pokerskill.css`165 - `assets/logo_web.png`166 - `scripts/render_markdown_to_pdf.sh`167- If the renderer or theme drifts, update this skill bundle instead of inventing a parallel PDF workflow.