pdf-generator

pdf-generator is a skill for Claude Code, Codex from xyva-yuangui/XyvaClaw. It costs 22 tokens per session (423 once invoked), scanned A, original, MIT.

A document tool that turns Markdown, HTML, plain text, or template data into paginated PDF files. It supports A4 pages, page numbers, automatic page breaks, and Chinese text.

In plain words
What is it for?
Use it to create reports and other formatted PDFs from files or text, or to fill the built-in report template with structured data.
Why use it?
It removes the need to manually format documents or export them from a word processor. It also provides a report template for consistent layouts.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to create reports and other formatted PDFs from files or text, or to fill the built-in report template with structured data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xyva-yuangui/xyvaclaw/pdf-generator
Install

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.

Any agent
npx skills add xyva-yuangui/XyvaClaw --skill pdf-generator
Clone the repo
git clone --depth 1 https://github.com/xyva-yuangui/XyvaClaw

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for pdf-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/xyva-yuangui/xyvaclaw/pdf-generator/github.svg)](https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/pdf-generator)
Your own site
<a href="https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/pdf-generator"><img src="https://agentmods.dev/badge/skills/xyva-yuangui/xyvaclaw/pdf-generator/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.

agentmods 80×15 button for pdf-generator

Your own site · 80×15
<a href="https://agentmods.dev/skills/xyva-yuangui/xyvaclaw/pdf-generator"><img src="https://agentmods.dev/badge/skills/xyva-yuangui/xyvaclaw/pdf-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 423 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00423
Opus 5 $0.00011 $0.00211
Sonnet 5 $0.00004 $0.00085
Haiku 4.5 $0.00002 $0.00042

Measured 12d ago against content hash 0f8433cf2cdb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pdf-generator scanned grade A with 0 findings 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 12d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/generate_pdf_fixed.py, scripts/generate_pdf.py, scripts/health_check.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

config-base/workspace/skills/pdf-generator/SKILL.md · 59 lines

What it actually says

PDF Generator

从Markdown/HTML/文本生成专业排版PDF。触发后先确认内容和格式。

Usage

# 从Markdown文件生成
uv run {baseDir}/scripts/generate_pdf.py --input report.md --output report.pdf

# 从文本直接生成
uv run {baseDir}/scripts/generate_pdf.py --text "报告内容..." --output report.pdf --title "标题"

# 使用报告模板
uv run {baseDir}/scripts/generate_pdf.py --template report --data '{"title":"月度分析","sections":[{"title":"概述","content":"<p>...</p>"}]}' --output report.pdf

# 列出模板
uv run {baseDir}/scripts/generate_pdf.py --list-templates

内置模板

模板 用途
report 分析报告(封面+摘要+指标+分节)

依赖

macOS: brew install pango + pip3 install weasyprint jinja2 markdown

Workflow

  1. 执行 generate_pdf.py
  2. 解析输出中 MEDIA: 行获取文件路径
  3. 向用户展示生成结果

Notes

  • 支持中文排版(PingFang SC / Noto Sans CJK)
  • A4页面,自动分页,页码
  • 模板使用Jinja2语法
Changes

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.

  1. 12d ago First seen · 59 lines · 22 tokens per session scan A 0f8433cf2cdb

Subscribe to this mod's changes

pdf-generator is a skill published in the GitHub repository xyva-yuangui/XyvaClaw (21 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 423 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

pdf

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

netease-youdao/LobsterAI · 50 tokens

nano-pdf

Edit PDF slides and pages using natural language with Gemini AI. Supports editing existing pages, adding new slides, and style-matching. Requires GEMINIAPIKEY.

emanueleielo/ciana-parrot · 36 tokens

pdf-toolkit

A command-line toolkit for working with local PDF files, which are fixed-layout documents. It can merge files, split or extract pages, read text, and show page information using available tools or Python’s pypdf library.

dongsheng123132/u-claw · 30 tokens

youdaonote

A command-line skill for managing Youdao Cloud Notes, a Chinese note-taking service. It supports notes, to-do items, saved web pages, searches, and folders.

netease-youdao/LobsterAI · 70 tokens

pdf_convert

Convert between PDF and image formats. Use when: user asks to convert PDF pages to images (PNG/JPEG) or combine images into a PDF. NOT for: text extraction (use pdfreader), PDF editing, or document format conversion (DOCX/HTML).

ericwang915/PythonClaw · 56 tokens

pdf_merge

Merge multiple PDF files into a single PDF. Use when: user asks to combine, join, or concatenate PDFs. Supports page selection and ordering. NOT for: splitting PDFs, editing content, or converting formats.

ericwang915/PythonClaw · 45 tokens