Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
thedivergentai avatar

Weasyprint

  • 5 installs
  • 2 repo stars
  • Updated June 11, 2026
  • thedivergentai/divergent-skills

Helps with ai & agent building tasks during AI-assisted development.

About

weasyprint is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • weasyprint
  • AI & Agent Building
  • AI-coding skill

Weasyprint by the numbers

  • 5 all-time installs (skills.sh)
  • Ranked #13,065 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/thedivergentai/divergent-skills --skill weasyprint

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs5
repo stars2
Last updatedJune 11, 2026
Repositorythedivergentai/divergent-skills

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

WeasyPrint

Pagination-first CSS engine (Python + Pango). Not headless Chrome: no JS, no RTL/bidi, print media default.

MANDATORY — read first when scope is unclear: `references/resource-matrix.md`

Load one flat expert lesson from references/ root (e.g. security-untrusted-html.md, css-paged-media.md). Do not open full-docs/ unless the matrix sends you there as last resort.

Before You Act

1. Trust — Untrusted HTML/CSS? → security-untrusted-html.md + security-url-fetcher.md (before code). 2. Runtime — CLI one-off (cli-basics.md), batch, or embedded Python (python-instantiation.md)? 3. Output — Plain PDF, PDF/A/UA/X (pdf-*.md), Factur-X, fillable forms? 4. Wrong tool? — JS layout, RTL, live DOM, pixel-perfect screen CSS → Puppeteer, not WeasyPrint.

Debug Bisect (wrong output)

1. `debug-pipeline.md` — enable logging; unsupported CSS fails silently by default. 2. `css-browser-vs-print.md` — print vs browser gaps? 3. Closest sample from `resource-matrix.md` Examples catalog — ≤120 lines of relevant .css. 4. Still blocked? One matching flat lesson from the matrix. `full-docs/` only as last resort (≤120 lines/§).

NEVER

  • NEVER use positional string HTML or omit base_url on HTML(string=...) — see python-instantiation.md.
  • NEVER enable presentational_hints on untrusted HTML — CVE-2026-49452; see security-untrusted-html.md.
  • NEVER expose untrusted HTML without process limits + fetcher blocking file://.
  • NEVER set page size via imagined CLI flags — only @page or -s; see cli-basics.md.
  • NEVER assume PDF/A validity without image-rendering: crisp-edges + user-side validation — see pdf-a-archival.md.
  • NEVER expect :hover, :focus, :visited to match; NEVER rely on RTL/bidi — see css-browser-vs-print.md.
  • NEVER use zoom != 1 casually — scales all units including cm and A4.
  • NEVER bulk-load full-docs/ or example .pdf files.
  • NEVER load full-docs/contribute.md or full-docs/support.md.

Common Failures → Fix

SymptomLesson
cannot load library 'pango...'install-windows.md or install-macos.md + install-troubleshooting.md
Tofu / blank textcss-fonts.md
Broken relative assetspython-instantiation.md (base_url=)
Styles ≠ browsercss-browser-vs-print.md
Auth assets 404web-flask-django.md
PDF/A rejectedpdf-a-archival.md
SSRF / file readsecurity-url-fetcher.md
Slow batch rendersweb-performance.md

Platform Quick Pointers

PlatformStart here
Linuxinstall-linux.md
Windowsinstall-windows.md
macOSinstall-macos.md
Any install failureinstall-troubleshooting.md

Expert Notes

  • Versions: major bumps change rendering — see debug-version-upgrades.md; visual diff PDFs on upgrade.
  • Performance: cascade cost ∝ selectors × elements; multi-page tables are slow — see web-performance.md.
  • Defaults: presentational_hints=False; finisher(document, pdf) hooks pydyf before trailer.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.