/bidi2pdf:pdf-recipefrom bidi2pdf
Writes and runs a bidi2pdf recipe YAML for multi-step PDF rendering: waiting for elements, clicking, running scripts, switching viewports, and validating output (page count, text, no failed requests).
Ships in bidi2pdf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A recipe is a rendering contract: the steps a page needs before it is printed, and what the PDF must
be like afterwards. It is not a general automation script. The source of truth for its shape is
bidi2pdf schema recipe; read it once before writing one.
Does not: log in through forms, follow links across pages, or extract data. One page, prepared
and printed. For a plain page without steps, render is enough (the render-pdf skill).
error.code, error.hint and exit code;
never make the PDF or screenshot another way (Chrome's own print-to-PDF, another PDF engine).render-pdf skill's
preflight); run nothing that changes the system without the user's yes.--json result instead of inspecting the PDF with other
tools.version: 1
source:
url: https://example.com/invoice/123
actions:
- wait_for:
selector: "#invoice"
timeout: 10
- click:
selector: "#show-details"
- wait_network_idle:
timeout: 10
assert:
- selector_exists:
selector: "#total"
- no_console_errors: true
- page_count: 2
- pdf_text_present:
text: "Invoice #123"
output:
pdf: invoice.pdf
manifest: invoice.manifest.json
url, file, stdin.wait_for takes exactly one of selector, paged_js: true (a Paged.js page exists) or script
(a JS expression that becomes truthy), plus an optional timeout (default 10 s).click, evaluate (a script, optionally assign: its result), inject_script/inject_style
(content: or url:).set_viewport (width, height, optional device_pixel_ratio).wait_network_idle (timeout).emulate_media (media: screen|print, color_scheme: light|dark, reduced_motion) - from the
0.1.23 or later.selector_exists, text_present,
no_console_errors, no_network_failures, fonts_loaded. PDF checks: page_count,
pdf_text_present, pdf_not_blank - these need the pdf-reader gem.pdf, manifest, screenshot.Two rules people trip over:
no_console_errors, no_network_failures, fonts_loaded and pdf_not_blank are presence-only:
write them as true. false is rejected - leave the assertion out instead.no_network_failures fails on any failed request, a missing favicon or a 404 image included.
Check bidi2pdf diagnose --json first and fix the page, or leave that assertion out.bidi2pdf run invoice.yml --validate --json
This checks the shape, every action and assertion name and every value, and that pdf-reader is
there when a PDF assertion needs it - no browser starts. Iterate until ok is true; on failure
error.details.path names the step (assert[0].no_console_errors).
bidi2pdf run invoice.yml --json --remote-browser-url http://chrome:3000/session
The result lists every action and assertion with its own ok. A failed step stops the run with
error.code PAGE_NOT_AS_EXPECTED (or SELECTOR_NOT_FOUND for a wait_for that never matched),
exit code 4, and error.details says which check failed and why (for no_network_failures the
failed requests). Exit 2 is a recipe the validator refused; exit 3 is the browser or the page not
loading. --json-stream reports progress on stderr while it runs.
What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/diagnose-pdfThis skill should be used when a PDF made with bidi2pdf (CLI, Ruby API or bidi2pdf-rails) is blank, half empty, unstyled, missing images or fonts, cut off, on the wrong number of pages, shows dates in the wrong format, or breaks words badly. A checklist from the cheapest check to the most expensive, using bidi2pdf diagnose./page-screenshotsThis skill should be used when pages of a web site or app need screenshots for a design, UX or accessibility review - at phone and desktop width, in light and dark mode - or when one screenshot shows what Chrome rendered for a PDF. Uses bidi2pdf's browser (local or a shared chromedriver), not Playwright or Puppeteer./pdf-specsnpx claudepluginhub dieter-medium/bidi2pdf --plugin bidi2pdfOther plugins' skills for the same job