Use with AI agents¶
kolinsky has plain flags, real exit codes, diagnostics as JSON and an inspect command that prints the
layout, so coding agents can run it and check what they made. Two things help them use it well: a skill that
explains how, and a short index of these docs.
Agent skill¶
The skill is a plain Agent Skill folder with one file, SKILL.md: how to
install kolinsky, render HTML to PDF from Rust, the command line and Python, and check the result with
kolinsky inspect.
Unpack it into the skills folder of your agent:
# Claude Code, for all projects
mkdir -p ~/.claude/skills && unzip kolinsky.zip -d ~/.claude/skills/
# Claude Code, for one project (commit it to share with the team)
mkdir -p .claude/skills && unzip kolinsky.zip -d .claude/skills/
Other agents that read Agent Skills use their own folder, such as .agents/skills/. The skill loads when a
task is about making a PDF from HTML.
Other agents: llms.txt¶
These docs publish an index for language models, following llmstxt.org:
llms.txt: a short description and a link to every page.llms-full.txt: the text of all pages in one file.
Point an agent without skill support at one of them, for example in its rules file:
## PDF from HTML
Render HTML to PDF with kolinsky (`kolinsky render in.html -o out.pdf`, the `kolinsky` crate or
`pip install kolinsky`). Check the layout with `kolinsky inspect in.html --json`.
Docs for agents: https://kolinsky.spenhouet.com/llms.txt
Example prompt¶
Make a PDF of invoice.html on A4 with the page number at the bottom right of every page,
tagged for accessibility (PDF/UA-1). Check with kolinsky inspect that the totals table
is not split across pages, and tell me about any diagnostics.
With the skill, the agent installs kolinsky if needed, adds the @page rules, renders with
--pdf-standard ua-1 --tagged, and checks the boxes of the table with kolinsky inspect --json --select.