kagen

Convert Kami HTML templates to PDFs using Chromium via Playwright.

110|14|Updated May 12, 2026
One-click install
npx skills add https://github.com/EliasOulkadi/shokunin --skill kagen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kagen
Source: https://github.com/EliasOulkadi/shokunin/tree/main/.pack/skills/kagen
Command: npx skills add https://github.com/EliasOulkadi/shokunin --skill kagen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

kagen solves the problem of turning Kami-designed HTML templates into reliable, production-grade PDFs that preserve styling, pagination, fonts, and dynamic content.

Core Features & Use Cases

  • Convert HTML-to-PDF with Chromium/Playwright: Render Kami HTML output to PDF using Playwright so PDFs work consistently across environments (including Windows).
  • Production pagination & print CSS patterns: Apply robust print-ready CSS rules (like @page, printBackground, widows/orphans, and page-break controls) to avoid near-empty pages and broken layouts.
  • Dynamic/JS-capable rendering: Use Chromium so the final PDF reflects fully rendered content (charts, scripts, and JS-driven elements) instead of plain static HTML.

Use it when you need to export documents from Kami (design) to PDFs (shipping), especially for documents with strict layout requirements (reports, white papers, one-pagers, letters, resumes).

Quick Start

Ask the agent to render your Kami HTML output to a PDF using Playwright/Chromium and produce the final file.

Frequently Asked Questions about kagen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert Kami HTML templates to PDF using Playwright?

To convert Kami HTML templates to PDF, the Skill uses Chromium via Playwright for reliable print rendering, ensuring dynamic JS content and print CSS are accurately reflected in the final document.

What print CSS rules are needed for reliable HTML-to-PDF generation?

Reliable HTML-to-PDF generation requires setting `printBackground: true`, robust `@page` CSS rules for size and margins, and `-webkit-print-color-adjust: exact` to prevent broken layouts and match the design.

Does HTML-to-PDF rendering with Chromium support JavaScript-driven content?

Yes, using Chromium via Playwright ensures the final PDF reflects fully rendered content, including charts, scripts, and JS-driven elements, rather than just plain static HTML output.

Do I need Node.js 20+ to export documents from HTML to PDF?

Yes, you need Node.js 20+ to use this HTML-to-PDF export process, ensuring the Playwright and Chromium environment functions consistently across different operating systems including Windows.

Why do my exported PDFs have near-empty pages or broken layouts?

Near-empty pages and broken layouts in PDF exports often occur when lacking proper print-ready CSS patterns like `@page`, widows/orphans control, and page-break rules to manage pagination.