Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add KaimingWan/oh-my-kiro --skill omk-pdf-gengit clone --depth 1 https://github.com/KaimingWan/oh-my-kiroWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kaimingwan/oh-my-kiro/omk-pdf-gen)<a href="https://agentmods.dev/skills/kaimingwan/oh-my-kiro/omk-pdf-gen"><img src="https://agentmods.dev/badge/skills/kaimingwan/oh-my-kiro/omk-pdf-gen/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kaimingwan/oh-my-kiro/omk-pdf-gen"><img src="https://agentmods.dev/badge/skills/kaimingwan/oh-my-kiro/omk-pdf-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.01270 |
| Opus 5.5 | $0.00034 | $0.00508 |
| Sonnet 5.5 | $0.00017 | $0.00254 |
| Haiku 4.5 | $0.00009 | $0.00127 |
Grade A, and why
omk-pdf-gen scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
subprocess.run(['weasyprint', html_tmp, output_path], check=True) How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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
canvasAPI 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
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
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)
| Platform | CSS font-family | Notes |
|---|---|---|
| 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 |
| Fallback | sans-serif |
Always 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:
fc-list :lang=zh family | head -10
Styling Best Practices
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 122 lines · 85 tokens per session scan A 5f60d96e7e11
omk-pdf-gen is a skill published in the GitHub repository KaimingWan/oh-my-kiro (107 stars, last pushed 6mo ago), licensed MIT. It adds 85 tokens to every session and 1,270 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
apify-youtube-transcript-scraper
Get YouTube captions, timestamped quotations, SRT/VTT and translated transcripts for videos, channels and playlists through the harshmaur/youtube-transcript-scraper Apify Actor.
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.
skill-doc-delivery
Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.
meta-web-to-pdf-briefing
Render a topic into a distributable PDF briefing in three steps: web search → bullet summary → styled PDF. Trigger when the user asks for a PDF briefing on a single topic.
chat-complex-documents
Chat with and search your complex documents — ask questions, extract tables and fields, and get answers grounded in the source. Connects the hosted Unstructured Transform MCP server to parse, structure, and enrich PDFs, Word/Excel/PowerPoint, images, scanned files, emails, and 60+ other formats into clean, AI-ready…
pkf-writing
Author, update, convert, validate, persist, and render PKF (.pkf) content through message-inline, Library Asset, or Memory Page carriers. Use for structured reports, knowledge pages, delivery cards, or any .pkf body. NOT for recall, memory-graph placement, or curation decisions — those belong to the memory skill.