Agent skill

Office PDF Generator and Reader

by huiliyi37 in huiliyi37/Tianshu-harness

Generates formal PDFs from structured content blocks with automatic CJK font handling and page numbers, and reads text back out of existing PDFs.

Apache-2.0Auto-check passedDocuments & Office

SKILL.md written in Chinese; this summary is our English description.

Install Office PDF Generator and Reader

skills CLI
$ npx skills add huiliyi37/Tianshu-harness --skill office-pdf -a claude-code

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

GitHub CLI
$ gh skill install huiliyi37/Tianshu-harness office-pdf --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/huiliyi37/Tianshu-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/office-pdf/skills .claude/skills/office-pdf && 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
office-pdf
GitHub stars
1.1k
Token cost
~334 tokens
SKILL.md length
111 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
Apache-2.0

At a glance

Generates formal PDFs from structured content blocks with automatic CJK font handling and page numbers, and reads text back out of existing PDFs.

  • Works in 4 steps: 大文档先列大纲:超过 3 个章节时,先把 heading… → 结构化优先:能用 table 呈现的数据不写成段落;能用 list 的不写成流水句 → 生成后自查:用 pdf_read… → …
  • Producing a formal report or contract as a PDF with Chinese text
  • SKILL.md covers 何时使用, CJK 字体行为(重要), 内容块速查 and 生成纪律
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

The SKILL.md is in Chinese. It targets formal deliverables such as reports, contracts, proposals and invoice-style documents when a PDF is requested, and uses pdf_read to pull text from an existing PDF into context. Documents are rendered natively with pdfkit from content blocks: headings, paragraphs, bordered tables with equal column widths, Courier code blocks and bullet or numbered lists, with a title and optional page numbers in the footer.

For Chinese, Japanese or Korean text the plugin picks a system font from a per-platform candidate list and shows an explicit warning when none is found, so the agent can tell you and suggest installing Noto Sans CJK or delivering in English rather than shipping garbled output. Guidance for the agent: outline documents of more than three sections for your approval first, prefer tables and lists to run-on prose, read the result back with pdf_read to check rendering and leftover placeholders, and include page numbers on formal documents.

When your agent uses it

  • Producing a formal report or contract as a PDF with Chinese text
  • Extracting text from an existing PDF for reading
  • Checking that a generated PDF rendered CJK characters correctly

Example prompts

  • “Generate a project proposal PDF with a title, three sections, a pricing table and page numbers.”
  • “Read the attached PDF contract and summarize the payment terms.”

Requirements

  • The office-pdf plugin with its PDF generation and pdf_read tools
  • A system CJK font for Chinese, Japanese or Korean content

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. 大文档先列大纲:超过 3 个章节时,先把 heading 结构列给用户确认,再一次生成——避免反复重写整个 content 数组
  2. 结构化优先:能用 table 呈现的数据不写成段落;能用 list 的不写成流水句
  3. 生成后自查:用 pdf_read 读回产出,确认中文渲染正常、章节完整、无占位符残留(lorem / xxxx / TODO)
  4. 页码是加分项:正式交付文档默认带 page_numbers: true

What it can do on your machine

Read from SKILL.md and the folder at commit 29bf77c. 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.

    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

Office PDF Generator and Reader loads about 334 tokens when it runs. Until then it costs about 28 tokens; SKILL.md has 111 words of instructions outside code blocks.

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

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 huiliyi37/Tianshu-harness at commit 29bf77c, republished under its Apache-2.0 licence (© huiliyi37). 111 words, ~334 tokens.

Download SKILL.mdSave it as .claude/skills/office-pdf/SKILL.md (or your agent's skills folder).
name
office-pdf
description
生成与读取 PDF 文档(报告、合同、交付文档)——原生 pdfkit 渲染,自动解析系统 CJK 字体支持中文,支持 heading/paragraph/table/code/list 内容块与页码页脚
triggers
pdf, PDF, 报告, 合同, 文档, 导出, 交付, report, contract, document, 白皮书

Office PDF(PDF 生成与读取)

参考 anthropics/skills(Apache 2.0)提炼,适配天枢 office-pdf 插件。

何时使用

  • 需要交付正式文档:报告、合同、方案书、白皮书、发票式单据
  • 用户明确要求 PDF 格式导出
  • 只需快速读内容时用 pdf_read 抽取现有 PDF 文本进上下文

不需要 PDF 时别用——纯 Markdown 交付更轻。

CJK 字体行为(重要)

  • 内容含中文/日文/韩文字符时,插件自动按平台候选列表解析系统字体(macOS PingFang/Hiragino、Windows 雅黑/黑体/宋体、Linux Noto Sans CJK/文泉驿)
  • 找不到任何候选字体时会显式警告("未找到 CJK 字体"),不会静默产出乱码——看到警告要告知用户,并建议安装 Noto Sans CJK 或改用英文交付
  • 代码块始终用 Courier(等宽),CJK 字体只作用于正文/标题/表格/列表

内容块速查

块字段说明
heading / h1text16pt 章节标题
h2 / h3text14/12pt 子标题
paragraph / texttext10pt 正文,两端对齐
tableheaders, rows带边框表格,均分列宽
codetextCourier 8pt 代码块
listitems, ordered?• 或 1. 编号,悬挂缩进

其他参数:title(文档标题)、page_numbers: true(页脚居中页码,中文内容自动用"第 X 页 / 共 Y 页",否则 "Page X of Y")。

生成纪律

  1. 大文档先列大纲:超过 3 个章节时,先把 heading 结构列给用户确认,再一次生成——避免反复重写整个 content 数组
  2. 结构化优先:能用 table 呈现的数据不写成段落;能用 list 的不写成流水句
  3. 生成后自查:用 pdf_read 读回产出,确认中文渲染正常、章节完整、无占位符残留(lorem / xxxx / TODO)
  4. 页码是加分项:正式交付文档默认带 page_numbers: true

© huiliyi37, Apache-2.0. 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 plugins/office-pdf/skills of huiliyi37/Tianshu-harness.

Open the folder on GitHubat commit 29bf77c

Compare with similar skills

Office PDF Generator and Reader 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.

Office PDF Generator and Reader compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Office PDF Generator and Reader this skillhuiliyi37/Tianshu-harness1.1k—~334Automated safety check: PassApache-2.0
Bookforge Korean Ebook PDF Makergongnyang/bookforge3161 repos~1.7kAutomated safety check: PassMIT
Graphic EbookVarnan-Tech/opendirectory674—~5kAutomated safety check: PassMIT
A4 Eight Page Booklettwhsi/skills259—~4.4kAutomated safety check: PassNone
Ky Markdown RebuilderKyrieCheungYep/ky-markdown-rebuilder117—~5.7kAutomated safety check: PassNone
Summarizereysu/ai-life-skills270—~7.7kAutomated safety check: PassMIT

Similar skills

  • Produces book-style Korean ebook PDFs from a topic or finished manuscript, with six design styles, real book parts and quality-check gates before output.

    316 GitHub starsUsed in 1 repo~1.7k tokens
    Documents & OfficeAuto-check passed
  • Graphic Ebook

    Varnan-Tech/opendirectory

    Creates professionally designed B2B SaaS e-books in HTML + CSS, exported as print-ready PDF.

    674 GitHub stars~5k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Compiles notes, outlines, PDFs or BIRD and iMandalArt content into an eight-page mini book, with upright page PDFs, a reading PDF, an editable DOCX and an A4 landscape print sheet.

    259 GitHub stars~4.4k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Ky Markdown Rebuilder

    KyrieCheungYep/ky-markdown-rebuilder

    Rebuild visual documents into reliable Markdown by combining text extraction with page or screenshot alignment.

    117 GitHub stars~5.7k tokensUpdated 3 mo ago
    Documents & OfficeAuto-check passed
  • Summarize

    reysu/ai-life-skills

    Summarize any content (YouTube video, article, whitepaper/PDF, podcast episode, book chapter, etc.) into a rich Obsidian note with section-by-section breakdowns, wikilinks to all technical concepts…

    270 GitHub stars~7.7k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Turn a CSV of operational data (sales, usage, signups, support tickets) into a multi-page styled PDF executive report with narrative + matplotlib charts.

    210 GitHub stars~1.1k tokensUpdated 18 days ago
    Documents & OfficeAuto-check passed

More from huiliyi37/Tianshu-harness

  • Agent Harness Testing Methodology

    huiliyi37/Tianshu-harness

    Guides an agent through probing an unfamiliar project's test setup, then choosing a red-light-first testing strategy matched to the task type.

    1.1k GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Visual Acceptance Review

    huiliyi37/Tianshu-harness

    Chinese-language final-check method for UI visual changes before delivery, using multi-theme screenshot matrices, pixel-level evidence and a CSS cascade checklist.

    1.1k GitHub stars~601 tokensUpdated today
    Auto-check passed
  • Frontend Prototype Workflow

    huiliyi37/Tianshu-harness

    Asks one clarifying question at a time, then builds two or three single-file HTML prototypes checked across phone, tablet, and desktop widths.

    1.1k GitHub stars~415 tokensUpdated today
    Auto-check passed
  • Word Document Generator

    huiliyi37/Tianshu-harness

    Generates and reads Word (.docx) documents such as reports, contracts and bids from heading, paragraph, table, code and list blocks, with a centered title.

    1.1k GitHub stars~252 tokensUpdated today
    Auto-check passed
  • Office Excel

    huiliyi37/Tianshu-harness

    Excel 电子表格读写与编辑最佳实践 — 用 xlsxread/xlsxwrite/xlsxedit 处理 .xlsx 时遵守的公式、数字格式与可维护性纪律

    1.1k GitHub stars~340 tokensUpdated today
    Auto-check passed
  • Office PPT Design Rules

    huiliyi37/Tianshu-harness

    Sets design rules for building PowerPoint decks with the pptx_create and pptx_read tools: a dominant color, varied layouts, readable type and a read-back check.

    1.1k GitHub stars~401 tokensUpdated today
    Auto-check passed

Questions about Office PDF Generator and Reader

What does Office PDF Generator and Reader do?

Generates formal PDFs from structured content blocks with automatic CJK font handling and page numbers, and reads text back out of existing PDFs. md is in Chinese. It targets formal deliverables such as reports, contracts, proposals and invoice-style documents when a PDF is requested, and uses pdf_read to pull text from an existing PDF into context.

When should I use Office PDF Generator and Reader?

Office PDF Generator and Reader fits situations like: producing a formal report or contract as a PDF with Chinese text; extracting text from an existing PDF for reading; checking that a generated PDF rendered CJK characters correctly.

How do I install Office PDF Generator and Reader in Claude Code?

Run `npx skills add huiliyi37/Tianshu-harness --skill office-pdf -a claude-code`. Or copy the skill folder (plugins/office-pdf/skills in huiliyi37/Tianshu-harness) into .claude/skills/office-pdf in your project. Claude Code loads it when a task matches its description.

How do I install Office PDF Generator and Reader in Codex?

Run `npx skills add huiliyi37/Tianshu-harness --skill office-pdf -a codex`. Or copy the skill folder (plugins/office-pdf/skills in huiliyi37/Tianshu-harness) into .agents/skills/office-pdf in your project. Codex loads it when a task matches its description.

Can I use Office PDF Generator and Reader 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 huiliyi37/Tianshu-harness --skill office-pdf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/office-pdf, .gemini/skills/office-pdf, .github/skills/office-pdf and .opencode/skills/office-pdf in your project.

What does Office PDF Generator and Reader need to run?

SKILL.md names no scripts, command-line tools or credentials: Office PDF Generator and Reader is instructions for the agent only. Our summary lists: The office-pdf plugin with its PDF generation and pdf_read tools; A system CJK font for Chinese, Japanese or Korean content.

Does Office PDF Generator and Reader 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 Office PDF Generator and Reader 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 Office PDF Generator and Reader use?

Office PDF Generator and Reader is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Office PDF Generator and Reader use?

About 334 tokens (SKILL.md is roughly 1.3k 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 Office PDF Generator and Reader?

Skills that share tags, products or a category with Office PDF Generator and Reader: Bookforge Korean Ebook PDF Maker (gongnyang/bookforge, 316 stars), Graphic Ebook (Varnan-Tech/opendirectory, 674 stars), A4 Eight Page Booklet (twhsi/skills, 259 stars) and Ky Markdown Rebuilder (KyrieCheungYep/ky-markdown-rebuilder, 117 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Office PDF Generator and Reader?

huiliyi37 (a GitHub user) maintains it in huiliyi37/Tianshu-harness, which has 1,091 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 11, 2026.

Source: huiliyi37/Tianshu-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.