Agent skill

Omk PDF Gen

by KaimingWan in KaimingWan/oh-my-kiro

Generate professional PDF documents with correct CJK (Chinese/Japanese/Korean) rendering.

MITAuto-check passedDocuments & Office

Install Omk PDF Gen

skills CLI
$ npx skills add KaimingWan/oh-my-kiro --skill omk-pdf-gen -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install KaimingWan/oh-my-kiro omk-pdf-gen --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/KaimingWan/oh-my-kiro.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/omk-pdf-gen .claude/skills/omk-pdf-gen && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
omk-pdf-gen
GitHub stars
107
Token cost
~1.1k tokens
SKILL.md length
376 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Generate professional PDF documents with correct CJK (Chinese/Japanese/Korean) rendering.

  • Works in 2 steps: Write HTML string in Python → Write to temp HTML, convert, clean up
  • User says generate PDF
  • SKILL.md covers Trigger Examples, Approach: HTML + weasyprint, Workflow and Font Rules (Critical), plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Omk PDF Gen is an agent skill from KaimingWan/oh-my-kiro. Generate professional PDF documents with correct CJK (Chinese/Japanese/Korean) rendering. Trigger when user says 'generate PDF', 'create PDF', 'export PDF', '生成 PDF', '导出 PDF', '做个 PDF', 'make a PDF', or when any task requires producing a PDF file. Also trigger when user mentions PDF formatting issues, garbled text, or font problems.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering PDF. It works with pypdf and macOS. The licence is MIT.

When your agent uses it

  • User says generate PDF
  • Any task requires producing a PDF file
  • User mentions PDF formatting issues

Example prompts

  • “generate PDF”
  • “create PDF”
  • “export PDF”
  • “/omk-pdf-gen”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Write HTML string in Python
  2. Write to temp HTML, convert, clean up

What it can do on your machine

Read from SKILL.md and the folder at commit ba228be. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python, bash and css).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Omk PDF Gen loads about 1.1k tokens when it runs. Until then it costs about 87 tokens; SKILL.md has 376 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from KaimingWan/oh-my-kiro at commit ba228be, republished under its MIT licence (© KaimingWan). 376 words, ~1,117 tokens.

Download SKILL.mdSave it as .claude/skills/omk-pdf-gen/SKILL.md (or your agent's skills folder).
name
omk-pdf-gen
description
Generate professional PDF documents with correct CJK (Chinese/Japanese/Korean) rendering. Trigger when user says 'generate PDF', 'create PDF', 'export PDF', '生成 PDF', '导出 PDF', '做个 PDF', 'make a PDF', or when any task requires producing a PDF file. Also trigger when user mentions PDF formatting issues, garbled text, or font problems.

PDF Generation Skill

Trigger Examples

  • "帮我生成一个报价 PDF"
  • "把这个内容导出成 PDF"
  • "PDF 中文乱码怎么办"
  • "generate a comparison PDF for this customer"
  • "create a budget proposal PDF"

Approach: HTML + weasyprint

Use HTML + CSS → weasyprint pipeline. Do NOT use reportlab for documents containing CJK text.

Why:

  • reportlab CID fonts (STSong-Light) have incomplete glyph coverage — symbols like • render as garbage (e.g. "煉")
  • reportlab cannot read macOS SIP-protected TTC fonts (PingFang etc.)
  • reportlab canvas API requires manual coordinate positioning — fragile and ugly
  • weasyprint uses system fontconfig — correct font resolution out of the box

Workflow

Step 1: Write HTML string in Python
python
HTML = """\
<!DOCTYPE html>
<html lang="zh">
<head><meta charset="utf-8">
<style>
@page { size: A4; margin: 2cm 2.2cm; }
body { font-family: "Hiragino Sans GB", "Heiti SC", "Noto Sans CJK SC", sans-serif; ... }
</style></head>
<body>...</body></html>
"""
Step 2: Write to temp HTML, convert, clean up
python
import subprocess, os
html_tmp = output_path.replace('.pdf', '.html')
with open(html_tmp, 'w', encoding='utf-8') as f:
    f.write(HTML)
subprocess.run(['weasyprint', html_tmp, output_path], check=True)
os.remove(html_tmp)

Font Rules (Critical)

PlatformCSS font-familyNotes
macOS"Hiragino Sans GB", "Heiti SC"Verified via fc-list :lang=zh
Linux"Noto Sans CJK SC", "WenQuanYi Micro Hei"Install fonts-noto-cjk if missing
Fallbacksans-serifAlways include as last resort

Never use these in weasyprint CSS:

  • -apple-system — weasyprint doesn't understand Apple system font aliases
  • "PingFang SC" — fontconfig often can't resolve it even though macOS has it
  • "STSong-Light" — CID font name, not a real font family for CSS

Before generating, verify CJK fonts are available:

bash
fc-list :lang=zh family | head -10

Styling Best Practices

Use standard HTML elements — weasyprint handles them well:

  • <table> with CSS border-collapse: collapse for data tables
  • <ul>/<li> for bullet lists (no manual bullet symbols needed)
  • <h1>-<h3> for headings
  • <hr> for dividers
  • CSS @page for margins and page size
css
@page { size: A4; margin: 2cm 2.2cm; }
body { font-family: "Hiragino Sans GB", "Heiti SC", "Noto Sans CJK SC", sans-serif;
       font-size: 11pt; color: #1a1a2e; line-height: 1.7; }
h1 { font-size: 22pt; text-align: center; }
h3 { font-size: 13pt; color: #1a73e8; }
table { width: 100%; border-collapse: collapse; font-size: 10pt; }
th { background: #1a73e8; color: #fff; padding: 7pt 10pt; text-align: left; }
td { padding: 6pt 10pt; border-bottom: 1px solid #e5e7eb; }
tr:nth-child(even) td { background: #f8f9fa; }
Show full SKILL.md (149 more words)Show less

When reportlab IS acceptable

English-only documents where you need precise programmatic layout (charts, diagrams, pixel-perfect positioning). Use platypus (SimpleDocTemplate + Paragraph + Table), never raw canvas API.

Reference: tools/gen-73strings-pdfs.py — good example of reportlab platypus for English PDFs.

Anti-Patterns (from real incidents)

Don'tWhyDo Instead
reportlab + STSong-Light for CJK• → "煉", incomplete glyphsweasyprint + system fonts
reportlab canvas manual positioningFragile coordinates, misaligned textweasyprint or reportlab platypus
CSS font-family: -apple-systemweasyprint can't resolve itUse "Hiragino Sans GB"
CSS font-family: "PingFang SC"fontconfig often fails to find itUse "Hiragino Sans GB"
Helvetica-Bold for table headers with CJKCJK chars render as ■■■Use CJK font + font-weight: bold
Hardcode font without checkingFails on different OSRun fc-list :lang=zh first

Output

Place generated script in tools/gen-<name>-pdf.py. The script should:

  1. Define HTML as a string constant
  2. Write temp HTML → call weasyprint → remove temp HTML
  3. Print the output path on success

© KaimingWan, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/omk-pdf-gen of KaimingWan/oh-my-kiro.

Open the folder on GitHubat commit ba228be

Compare with similar skills

Omk PDF Gen next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Omk PDF Gen compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Omk PDF Gen this skillKaimingWan/oh-my-kiro107—~1.1kAutomated safety check: PassMIT
Lov Any2pdflovstudio/any2pdf211—~2.4kAutomated safety check: NotesMIT
PDF ToolkitXiaomiMiMo/MiMo-Code14k—~1.7kAutomated safety check: PassApache-2.0
PDF Generation, Forms and Extractionpipeshub-ai/pipeshub-ai3.8k—~2.9kAutomated safety check: PassApache-2.0
Scanned PDF To Epublonghaiqwe/scanned-pdf-to-epub161—~1.9kAutomated safety check: PassMIT
PDFNousResearch/hermes-agent253k—~3.1kAutomated safety check: PassMIT

Similar skills

  • Lov Any2pdf

    lovstudio/any2pdf

    Convert Markdown documents to professionally typeset PDF files with reportlab.

    211 GitHub stars~2.4k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • PDF Toolkit

    XiaomiMiMo/MiMo-Code

    Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.

    14k GitHub stars~1.7k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Picks the right library for generating a new PDF, filling an existing PDF form, or extracting text and tables, defaulting to Node where possible.

    3.8k GitHub stars~2.9k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Scanned PDF To Epub

    longhaiqwe/scanned-pdf-to-epub

    A skill your agent uses when scanned Chinese PDFs or image-only books need text EPUB conversion on macOS, Windows, or Linux, especially when OCR text, original underlined proper names, 专名号, or…

    161 GitHub stars~1.9k tokensUpdated 26 days ago
    Documents & OfficeAuto-check passed
  • PDF

    NousResearch/hermes-agent

    PDF files: create, read, merge, fill, OCR, edit text. An agent skill from NousResearch/hermes-agent.

    253k GitHub stars~3.1k tokensUpdated today
    Documents & OfficeAuto-check passed
  • PDF Explore

    HughYau/AcademicForge

    A skill your agent uses when the user has attached a PDF, paper, report, or other document and the answer needs content from more than one place in it: summarize the methods or any other section…

    2.6k GitHub stars~3.1k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed

More from KaimingWan/oh-my-kiro

All 15 skills in this repo
  • Omk Research

    KaimingWan/oh-my-kiro

    Multi-level research: built-in knowledge → web search → Tavily deep research API.

    107 GitHub stars~827 tokensUpdated 6 mo ago
    Auto-check passed
  • Omk Reviewing

    KaimingWan/oh-my-kiro

    Code and plan review with multi-angle dispatch. An agent skill from KaimingWan/oh-my-kiro.

    107 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • Omk Skill Creation

    KaimingWan/oh-my-kiro

    Create high-quality, production-ready skills from scratch. An agent skill from KaimingWan/oh-my-kiro.

    107 GitHub stars~2k tokensUpdated 6 mo ago
    Auto-check passed
  • Omk Youtube

    KaimingWan/oh-my-kiro

    Extract and summarize YouTube video content via subtitle extraction.

    107 GitHub stars~381 tokensUpdated 6 mo ago
    Auto-check passed
  • Documentation Lookup

    KaimingWan/oh-my-kiro

    Fetch current library/framework documentation via Context7. An agent skill from KaimingWan/oh-my-kiro.

    107 GitHub stars~616 tokensUpdated 6 mo ago
    Auto-check passed
  • Omk Coding

    KaimingWan/oh-my-kiro

    Enforces coding best practices: deep-read before modify, LSP-first navigation, TDD red-green-refactor, minimal changes, self-review, verification.

    107 GitHub stars~2.4k tokensUpdated 6 mo ago
    Auto-check passed

Works with

Questions about Omk PDF Gen

What does Omk PDF Gen do?

Generate professional PDF documents with correct CJK (Chinese/Japanese/Korean) rendering. Omk PDF Gen is an agent skill from KaimingWan/oh-my-kiro. Generate professional PDF documents with correct CJK (Chinese/Japanese/Korean) rendering.

When should I use Omk PDF Gen?

Omk PDF Gen fits situations like: user says generate PDF; any task requires producing a PDF file; user mentions PDF formatting issues.

How do I install Omk PDF Gen in Claude Code?

Run `npx skills add KaimingWan/oh-my-kiro --skill omk-pdf-gen -a claude-code`. Or copy the skill folder (skills/omk-pdf-gen in KaimingWan/oh-my-kiro) into .claude/skills/omk-pdf-gen in your project. Claude Code loads it when a task matches its description.

How do I install Omk PDF Gen in Codex?

Run `npx skills add KaimingWan/oh-my-kiro --skill omk-pdf-gen -a codex`. Or copy the skill folder (skills/omk-pdf-gen in KaimingWan/oh-my-kiro) into .agents/skills/omk-pdf-gen in your project. Codex loads it when a task matches its description.

Can I use Omk PDF Gen in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add KaimingWan/oh-my-kiro --skill omk-pdf-gen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/omk-pdf-gen, .gemini/skills/omk-pdf-gen, .github/skills/omk-pdf-gen and .opencode/skills/omk-pdf-gen in your project.

What does Omk PDF Gen need to run?

SKILL.md names no scripts, command-line tools or credentials: Omk PDF Gen is instructions for the agent only. Our summary lists: Python 3.

Does Omk PDF Gen access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Omk PDF Gen safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Omk PDF Gen use?

Omk PDF Gen is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Omk PDF Gen use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Omk PDF Gen?

Skills that share tags, products or a category with Omk PDF Gen: Lov Any2pdf (lovstudio/any2pdf, 211 stars), PDF Toolkit (XiaomiMiMo/MiMo-Code, 14k stars), PDF Generation, Forms and Extraction (pipeshub-ai/pipeshub-ai, 3.8k stars) and Scanned PDF To Epub (longhaiqwe/scanned-pdf-to-epub, 161 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Omk PDF Gen?

KaimingWan (a GitHub user) maintains it in KaimingWan/oh-my-kiro, which has 107 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on April 2, 2026.

Source: KaimingWan/oh-my-kiro on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.