Agent skill

PDF

by guyi-a in guyi-a/pi-ling

PDF 相关的所有操作:从零生成(reportlab / pypdf)、格式转化(md/html → PDF)、修改(合并 / 拆分 / 旋转 / 加水印 / 提图片 / 元数据)、读内容(pdfplumber / extractdocumenttext)、OCR 扫描件、加密解密。触发场景:用户说"生成 PDF" / "做份 PDF 简历" / "合并这几份 PDF" / "给 PDF…

MITAuto-check passedDocuments & Office

Install PDF

skills CLI
$ npx skills add guyi-a/pi-ling --skill pdf -a claude-code

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

GitHub CLI
$ gh skill install guyi-a/pi-ling 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/guyi-a/pi-ling.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pdf .claude/skills/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
pdf
GitHub stars
106
Token cost
~3.3k tokens
SKILL.md length
558 words
Files
5 (incl. scripts)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

PDF 相关的所有操作:从零生成(reportlab / pypdf)、格式转化(md/html → PDF)、修改(合并 / 拆分 / 旋转 / 加水印 / 提图片 / 元数据)、读内容(pdfplumber / extractdocumenttext)、OCR 扫描件、加密解密。触发场景:用户说"生成 PDF" / "做份 PDF 简历" / "合并这几份 PDF" / "给 PDF…

  • Works in 3 steps: read_file 看 md 内容和结构 → write_file 写一份完整的 html(内嵌 + @page 规则 +… → run_command uv run /html_to_pdf.py…
  • Tasks that involve PDF
  • SKILL.md covers Quick Reference(任务 → 路径), 转化:md/html → PDF(我们的核心能力), 从零 draw PDF(reportlab) and Python 操作 PDF(pypdf), plus 7 more sections
  • Runs Python scripts from its folder; calls pandoc, qpdf and brew; reaches google.com

What it does

PDF is an agent skill from guyi-a/pi-ling. PDF 相关的所有操作:从零生成(reportlab / pypdf)、格式转化(md/html → PDF)、修改(合并 / 拆分 / 旋转 / 加水印 / 提图片 / 元数据)、读内容(pdfplumber / extractdocumenttext)、OCR 扫描件、加密解密。触发场景:用户说"生成 PDF" / "做份 PDF 简历" / "合并这几份 PDF" / "给 PDF 加水印" / "这份扫描 PDF 转文字" / "提取 PDF 表格" / "精调 PDF 样式"等一切跟 .pdf 文件相关的活。这个 skill 是工具箱:说明书 + 预置可执行脚本 + 命令模板。冷门场景看 REFERENCE.md。

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts (for example `REFERENCE.md`, `scripts/html_to_pdf.py` and `scripts/merge_pdfs.py`).

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

When your agent uses it

  • Tasks that involve PDF

Example prompts

  • “生成 PDF”
  • “做份 PDF 简历”
  • “合并这几份 PDF”
  • “/pdf”

Requirements

  • Python 3

Workflow steps

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

  1. read_file 看 md 内容和结构
  2. write_file 写一份完整的 html(内嵌 + @page 规则 + 中文字体 + 精调 layout),md 内容手动搬进 / / 等
  3. run_command uv run /html_to_pdf.py --input a.html --output a.pdf

What it can do on your machine

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

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pandoc
    • qpdf
    • brew
    • uv
    • pdftotext

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • google.com

    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

PDF loads about 3.3k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 558 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from guyi-a/pi-ling at commit 17a71f6, republished under its MIT licence (© guyi-a). 558 words, ~3,270 tokens.

Download SKILL.mdSave it as .claude/skills/pdf/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
pdf
description
PDF 相关的所有操作:从零生成(reportlab / pypdf)、格式转化(md/html → PDF)、修改(合并 / 拆分 / 旋转 / 加水印 / 提图片 / 元数据)、读内容(pdfplumber / extract_document_text)、OCR 扫描件、加密解密。触发场景:用户说"生成 PDF" / "做份 PDF 简历" / "合并这几份 PDF" / "给 PDF 加水印" / "这份扫描 PDF 转文字" / "提取 PDF 表格" / "精调 PDF 样式"等一切跟 .pdf 文件相关的活。这个 skill 是工具箱:说明书 + 预置可执行脚本 + 命令模板。冷门场景看 REFERENCE.md。

Skill: pdf (PDF 全能工具箱)

skill 目录布局:

  • SKILL.md(本文档)—— 日常够用的核心
  • REFERENCE.md —— 进阶:详细库用法、复杂场景、性能优化。遇冷门需求时 read_file <skill_path>/REFERENCE.md
  • scripts/ —— 预置可执行脚本,用 run_command uv run <scripts_path>/xxx.py <args> 调用
  • 不要修改本目录里的脚本。要定制先 cp 到 workspace/scripts/ 再改

Quick Reference(任务 → 路径)

任务首选路径备注
md → PDF(快速,样式默认)pandoc a.md -o a.pdf --pdf-engine=xelatex -V CJKmainfont='PingFang SC' -V fontsize=12pt -V linestretch=1.4 -V geometry:margin=2cm需 pandoc + xelatex/typst
md/html → PDF(精调,重视觉)agent 写完整 html(内嵌 CSS)→ uv run <scripts_path>/html_to_pdf.py --input a.html --output a.pdfChromium headless
从零画 PDF(发票/证书/精确布局)reportlab(下方"从零 draw"章节)Canvas 或 Platypus
读 PDF 内容(提文字)用 agent 已有的 extract_document_text 工具不走脚本
提取表格pdfplumber(下方"提取内容"章节)保留结构
合并多个 PDFuv run <scripts_path>/merge_pdfs.py --output merged.pdf a.pdf b.pdf c.pdfpypdf
PDF 拆成图片uv run <scripts_path>/pdf_to_images.py --input a.pdf --output-dir images/pypdfium2
PDF 按页拆分qpdf --split-pages=1 input.pdf out_%d.pdf一条命令
旋转某页qpdf input.pdf output.pdf --rotate=+90:1一条命令
加水印reportlab 造水印 PDF + pypdf 叠加(下方"加水印"章节)需要写点脚本
提元数据pypdf reader.metadata(下方"元数据"章节)
加密/解密pypdf writer.encrypt / qpdf --decrypt见下方
OCR 扫描 PDFpytesseract + pdf2image(下方"OCR"章节)brew install tesseract tesseract-lang
提取内嵌图片pdfimages -all input.pdf images/imgpoppler-utils
复杂/冷门场景看 REFERENCE.mdJS 库、pypdfium2 高级、qpdf 高级、性能

转化:md/html → PDF(我们的核心能力)

决定走哪条路:必须先用 ask_user 问一次

md/html → PDF 总是有"快速一发"和"精调 HTML"两种走法,agent 无法从技术层面替用户决定 —— 必须调 ask_user 让用户挑一次,除非用户已经明说了偏好。

ask_user(questions=[{
  "question": "PDF 样式偏好?",
  "options": [
    "精调样式,走 HTML 渲染,排版最好 (Recommended)",
    "快速一发,pandoc 默认样式就够"
  ]
}])

推荐项是精调:HTML → Chromium 的排版质量明显高于 pandoc 默认(CSS 精调空间大、字体渲染细腻、可控 layout),除非用户明确要"快速临时看看",都应该默认走 HTML。

选"精调" → 路径 B(html→Chromium) 选"快速" → 路径 A(pandoc)

不能跳过 ask_user:即使你觉得"根据上下文能猜到用户想要精调",也要问一次 —— PDF 是要交付的产物,用户对排版预期比 agent 猜测准。唯一可跳过的情况是用户在这条消息里已经写明了"快速一发 / 就要好看 / 用于投递 / 用于打印"这类明确信号,直接按信号走对应路径。

路径 A:pandoc 快速(默认样式)

适用:agent 判断"用户只是快速看看,不在意视觉设计"。

pandoc INPUT.md -o OUTPUT.pdf \
    --pdf-engine=xelatex \
    -V CJKmainfont='PingFang SC' \
    -V fontsize=12pt \
    -V linestretch=1.4 \
    -V geometry:margin=2cm

依赖:brew install pandoc && brew install --cask basictex(或 brew install typst 换 --pdf-engine=typst)。

路径 B:html → Chromium(精调)

适用:用户在意视觉设计。简历自评报告分享、演讲讲义、需要"设计感"的产物。

流程:

  1. read_file 看 md 内容和结构
  2. write_file 写一份完整的 html(内嵌 <style> + @page 规则 + 中文字体 + 精调 layout),md 内容手动搬进 <h1> / <p> / <table> 等
  3. run_command uv run <scripts_path>/html_to_pdf.py --input a.html --output a.pdf

关键:不要走 pandoc a.md -o a.html 再转 PDF。pandoc 的默认 html template 没有精调样式,跟直接 pandoc→PDF 一样素。html 必须是agent 亲手编排的。

html 骨架模板(agent 起点):

html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>标题</title>
<style>
  @page { size: A4; margin: 2cm; }
  body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
    font-size: 12pt; line-height: 1.7; color: #222;
  }
  h1 { color: #1e3c78; border-bottom: 2px solid #1e3c78; padding-bottom: 0.3em; margin-top: 1.5em; }
  h2 { color: #2c5aa0; margin-top: 1.2em; padding-left: 8px; border-left: 4px solid #2c5aa0; }
  code { background: #f4f7fa; padding: 2px 6px; border-radius: 3px; font-family: 'SF Mono', Menlo, monospace; }
  pre { background: #f4f7fa; padding: 12px 16px; border-radius: 6px; overflow-x: auto; }
  table { border-collapse: collapse; width: 100%; margin: 1em 0; }
  th, td { border: 1px solid #ddd; padding: 8px 12px; text-align: left; }
  th { background: #f4f7fa; font-weight: 600; }
  blockquote { border-left: 4px solid #ccc; padding-left: 1em; color: #666; margin-left: 0; }
  .page-break { page-break-before: always; }
</style>
</head>
<body>
  <!-- 内容 -->
</body>
</html>

依赖:用户装了 Chrome(macOS 几乎必装)。没装引导 https://www.google.com/chrome/。


从零 draw PDF(reportlab)

适用:发票 / 证书 / 结业通知 / 精确布局的表单——需要 pixel-精确定位的产物。

依赖 PEP 723 声明:"reportlab>=4.0"

Canvas 简单版(低层 API,控制精细)
python
# /// script
# dependencies = ["reportlab>=4.0"]
# ///
from reportlab.lib.pagesizes import A4
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont

# 注册 CJK 字体(macOS)
pdfmetrics.registerFont(TTFont('CN', '/System/Library/Fonts/STHeiti Light.ttc'))

c = canvas.Canvas("out.pdf", pagesize=A4)
w, h = A4  # 595 x 842 pt

c.setFont('CN', 24)
c.drawString(50, h - 80, "标题")

c.setFont('CN', 12)
c.drawString(50, h - 120, "正文段落 —— 靠 drawString 精确定位")

# 画线 / 矩形 / 圆
c.line(50, h - 140, w - 50, h - 140)
c.rect(50, h - 200, 200, 40, stroke=1, fill=0)
c.setFillColorRGB(0.9, 0.9, 0.9)
c.rect(50, h - 260, 200, 40, stroke=0, fill=1)

c.showPage()  # 结束当前页
c.save()
Platypus 组件流(高层 API,自动分页)
python
# /// script
# dependencies = ["reportlab>=4.0"]
# ///
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak, Table, TableStyle
from reportlab.lib import colors
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont

pdfmetrics.registerFont(TTFont('CN', '/System/Library/Fonts/STHeiti Light.ttc'))

doc = SimpleDocTemplate("report.pdf", pagesize=A4,
                        leftMargin=50, rightMargin=50, topMargin=60, bottomMargin=60)

# 自定义中文样式(默认样式没设 CJK 字体)
styles = getSampleStyleSheet()
cn_title = ParagraphStyle('CNTitle', parent=styles['Title'], fontName='CN', fontSize=22)
cn_body = ParagraphStyle('CNBody', parent=styles['Normal'], fontName='CN', fontSize=11, leading=18)

story = []
story.append(Paragraph("报告标题", cn_title))
story.append(Spacer(1, 20))
story.append(Paragraph("这是正文内容 —— Platypus 会自动分页、换行、对齐。" * 5, cn_body))
story.append(PageBreak())

# 表格
data = [
    ['项目', 'Q1', 'Q2', 'Q3', 'Q4'],
    ['营收', '100', '120', '135', '160'],
    ['利润', '20', '25', '30', '40'],
]
table = Table(data)
table.setStyle(TableStyle([
    ('BACKGROUND', (0, 0), (-1, 0), colors.HexColor('#1e3c78')),
    ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
    ('FONTNAME', (0, 0), (-1, -1), 'CN'),
    ('FONTSIZE', (0, 0), (-1, 0), 13),
    ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
    ('GRID', (0, 0), (-1, -1), 0.5, colors.grey),
    ('BACKGROUND', (0, 1), (-1, -1), colors.HexColor('#f4f7fa')),
]))
story.append(table)

doc.build(story)

Never 在 reportlab 里用 Unicode 上下标(x²、H₂O 的 ² ₂)—— 内置字体没有这些 glyph,会渲染成黑色实心方块。用 <sub> / <super> Paragraph 标签:

python
Paragraph("H<sub>2</sub>O 和 x<super>2</super>", cn_body)

Python 操作 PDF(pypdf)

合并 PDF

用预置脚本:

uv run <scripts_path>/merge_pdfs.py --output merged.pdf a.pdf b.pdf c.pdf

即席代码:

python
# /// script
# dependencies = ["pypdf>=4.0"]
# ///
from pypdf import PdfReader, PdfWriter

writer = PdfWriter()
for path in ["a.pdf", "b.pdf", "c.pdf"]:
    for page in PdfReader(path).pages:
        writer.add_page(page)
with open("merged.pdf", "wb") as f:
    writer.write(f)
按页拆分
python
reader = PdfReader("input.pdf")
for i, page in enumerate(reader.pages):
    w = PdfWriter()
    w.add_page(page)
    with open(f"page_{i+1}.pdf", "wb") as f:
        w.write(f)

或者命令行:qpdf --split-pages=1 input.pdf out_%d.pdf

旋转
python
reader = PdfReader("input.pdf")
writer = PdfWriter()
for page in reader.pages:
    page.rotate(90)  # 90 / 180 / 270
    writer.add_page(page)
with open("rotated.pdf", "wb") as f:
    writer.write(f)

或命令行:qpdf input.pdf out.pdf --rotate=+90:1-3(1-3 页转 90 度)

提元数据
python
reader = PdfReader("input.pdf")
m = reader.metadata
print(m.title, m.author, m.subject, m.creator)
print(f"页数: {len(reader.pages)}")
加密 / 解密
python
# 加密
writer = PdfWriter()
for page in PdfReader("input.pdf").pages:
    writer.add_page(page)
writer.encrypt(user_password="user", owner_password="owner")
with open("encrypted.pdf", "wb") as f:
    writer.write(f)

# 解密
reader = PdfReader("encrypted.pdf")
if reader.is_encrypted:
    reader.decrypt("user")
# 之后正常读

命令行解密:qpdf --password=secret --decrypt encrypted.pdf out.pdf


加水印

两步:用 reportlab 造一张透明水印 PDF,再用 pypdf 叠加。

python
# /// script
# dependencies = ["reportlab>=4.0", "pypdf>=4.0"]
# ///
from reportlab.lib.pagesizes import A4
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from pypdf import PdfReader, PdfWriter

# Step 1: 造水印 PDF
pdfmetrics.registerFont(TTFont('CN', '/System/Library/Fonts/STHeiti Light.ttc'))
c = canvas.Canvas("_wm.pdf", pagesize=A4)
w, h = A4
c.saveState()
c.translate(w / 2, h / 2)
c.rotate(45)
c.setFillColorRGB(0.6, 0.6, 0.6, alpha=0.25)  # 灰色 25% 透明
c.setFont('CN', 60)
c.drawCentredString(0, 0, "CONFIDENTIAL")
c.restoreState()
c.save()

# Step 2: 叠加到每一页
watermark = PdfReader("_wm.pdf").pages[0]
reader = PdfReader("input.pdf")
writer = PdfWriter()
for page in reader.pages:
    page.merge_page(watermark)
    writer.add_page(page)
with open("watermarked.pdf", "wb") as f:
    writer.write(f)

提取内容

Show full SKILL.md (224 more words)Show less
提文字(简单)

用 agent 已有的 extract_document_text 工具(不走本 skill)。

提文字(保 layout)
python
# /// script
# dependencies = ["pdfplumber>=0.11"]
# ///
import pdfplumber

with pdfplumber.open("input.pdf") as pdf:
    for i, page in enumerate(pdf.pages):
        print(f"--- Page {i+1} ---")
        print(page.extract_text())

命令行版:pdftotext -layout input.pdf output.txt

提表格
python
# /// script
# dependencies = ["pdfplumber>=0.11", "pandas>=2.0"]
# ///
import pdfplumber
import pandas as pd

with pdfplumber.open("input.pdf") as pdf:
    all_tables = []
    for page in pdf.pages:
        for table in page.extract_tables():
            if table and len(table) > 1:
                df = pd.DataFrame(table[1:], columns=table[0])
                all_tables.append(df)

if all_tables:
    combined = pd.concat(all_tables, ignore_index=True)
    combined.to_excel("tables.xlsx", index=False)
提图片

命令行:pdfimages -all input.pdf images/img(poppler-utils,最快)


OCR 扫描 PDF

依赖:brew install tesseract tesseract-lang poppler。中文语言包(chi_sim)在 tesseract-lang 里。

python
# /// script
# dependencies = ["pytesseract", "pdf2image"]
# ///
from pytesseract import image_to_string
from pdf2image import convert_from_path

for i, img in enumerate(convert_from_path("scanned.pdf")):
    print(f"--- Page {i+1} ---")
    print(image_to_string(img, lang="chi_sim+eng"))

CJK 字体(生成含中文 PDF 必读)

⚠️ reportlab 独家坑:PingFang.ttc 内部是 PostScript CFF outlines 格式, reportlab 的 TTFont 只支持 TrueType,加载 PingFang 会失败(报 not a supported TrueType font file 或类似错误)。给 reportlab 用 CJK 字体时不要选 PingFang, 用 STHeiti 或 Songti。

reportlab 能用的 macOS 系统 CJK 字体路径(都是 TrueType):

  • /System/Library/Fonts/STHeiti Light.ttc — 华文黑体细体,推荐
  • /System/Library/Fonts/STHeiti Medium.ttc — 华文黑体中等
  • /System/Library/Fonts/Supplemental/Songti.ttc — 宋体(可能不在,视系统版本)

pandoc / html→Chromium 场景没这个限制(xelatex 走 fontspec 支持 PS,Chromium 直接用系统渲染),可以直接用 PingFang SC。

各场景字体传法总表:

场景字体名 / 传法说明
pandoc-V CJKmainfont='PingFang SC'系统字体名,PS 也行
html + ChromiumCSS font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;系统字体名,PS 也行
reportlabpdfmetrics.registerFont(TTFont('CN', '/System/Library/Fonts/STHeiti Light.ttc')) 再 setFont('CN', 12)绝对路径,且必须 TrueType,不能用 PingFang.ttc
PillowImageFont.truetype('/System/Library/Fonts/STHeiti Light.ttc', 24)绝对路径,Pillow 也不支持 PS outlines

macOS 默认可用字体名(pandoc / CSS 场景直接叫名字,不用路径):

  • PingFang SC — 苹方,推荐
  • Heiti SC — 黑体
  • Songti SC — 宋体
  • STHeiti — 华文黑体

Never(红线)

  • Never 用 fpdf2 或类似库自己实现 markdown → PDF 渲染器 —— pandoc / reportlab / Chromium 是本职
  • Never 走 pandoc md → html → chromium PDF —— pandoc 默认 html template 没精调样式,等于白转
  • Never 修改本 skill 目录里的脚本 —— 要定制先 cp 到 workspace 再改
  • Never 在没跑自检的情况下告诉用户"PDF 做好了"
  • Never 在 reportlab 里直接写 Unicode 上下标(用 <sub> / <super>)

自检 SOP

生成完必跑:

ls -lh <output.pdf> && file <output.pdf>
  • ls -lh 看文件存在 + 大小合理(<1KB 是空文件)
  • file 看 magic 是否 PDF document

装了 poppler 可以 pdfinfo <output.pdf> 拿页数。

交付时给用户看的内容

  • 产物文件的绝对路径
  • 大小 + 页数
  • 用到的路径(pandoc xelatex / html + Chromium / reportlab Canvas / 具体脚本名)
  • 可调参数提示(字号 / 行距 / 边距 / CSS 变量)—— 让用户能进一步调

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

Files

SKILL.md and 4 other files (scripts) in .agents/skills/pdf of guyi-a/pi-ling.

  • SKILL.md
  • REFERENCE.md
  • scripts/html_to_pdf.py
  • scripts/merge_pdfs.py
  • scripts/pdf_to_images.py

Open the folder on GitHubat commit 17a71f6

Compare with similar skills

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

PDF compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PDF this skillguyi-a/pi-ling106—~3.3kAutomated safety check: PassMIT
Document Gen Dual BackendHKUDS/OpenSpace7.7k—~4.6kAutomated safety check: PassMIT
Document Gen Resilient MultiformatHKUDS/OpenSpace7.7k—~3.5kAutomated safety check: PassMIT
PDF Generation TroubleshootingHKUDS/OpenSpace7.7k—~926Automated safety check: PassMIT
Harness Book Best Practicewquguru/harness-books3.2k—~4.1kAutomated safety check: PassNone
Huashu Markdown Publishing Pipelinealchaincyf/huashu-md-html908—~4.8kAutomated safety check: PassMIT

Similar skills

  • Document generation with direct pandoc/ReportLab execution (lightweight default) and optional shellagent fallback for complex scenarios

    7.7k GitHub stars~4.6k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Resilient multi-format document generation with environment checks, auto-sanitization, and fallback engines

    7.7k GitHub stars~3.5k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Systematic fallback workflow for PDF generation through pandoc, reportlab, and fpdf2 with installation verification

    7.7k GitHub stars~926 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Harness Book Best Practice

    wquguru/harness-books

    Best practices for working on the Harness books repo. An agent skill from wquguru/harness-books.

    3.2k GitHub stars~4.1k tokensUpdated 5 mo ago
    Documents & OfficeAuto-check passed
  • Huashu Markdown Publishing Pipeline

    alchaincyf/huashu-md-html

    Converts files and web pages into clean Markdown, then turns Markdown into polished HTML, Word, PDF and EPUB using four templates.

    908 GitHub stars~4.8k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • PDF

    nuoyimanaituling/manus-x

    Process PDF files - extract text, read content, create PDFs, merge or split documents.

    830 GitHub stars~985 tokensUpdated 8 mo ago
    Documents & OfficeAuto-check passed

More from guyi-a/pi-ling

  • PPTX

    guyi-a/pi-ling

    PowerPoint 幻灯片(.pptx / .potx)的所有操作:从零生成(pptxgenjs Node 库)、基于模板编辑(unpack XML → 改 → clean → pack)、格式转化(pptx → PDF / 图片、.ppt → .pptx)、读取分析。触发场景:用户说"做份 PPT" / "生成幻灯片" / "演讲 slide" / "培训材料" / "项目汇报" /…

    106 GitHub stars~2.3k tokensUpdated 21 days ago
    Auto-check passed
  • Bosszp

    guyi-a/pi-ling

    Boss 直聘岗位搜索的完整操作手册。触发场景:用户说"找工作"/"看岗位"/"搜招聘"/"投简历"/"跳槽"/"Boss 直聘"/"看看有什么工作"/"帮我看下 XX 岗位"等。前提:必须走 browserbridge(Boss 需要用户 Chrome 登录态;browseruse 独立环境登不上)。包含 URL 模板、城市编码表、Vue data 抽取…

    106 GitHub stars~2.4k tokensUpdated 21 days ago
    Auto-check passed
  • DOCX

    guyi-a/pi-ling

    Word 文档(.docx)的日常处理:md → docx(生成简历/报告)、docx → PDF/图片(分享预览)、.doc → .docx(老格式升级)。触发场景:用户说"生成 Word 版" / "做份 Word 简历" / "把这份报告转 Word" / "这份 .doc 打不开" / "docx 转 PDF" 等。读 docx 内容走 agent 已有的…

    106 GitHub stars~1.1k tokensUpdated 21 days ago
    Auto-check passed
  • Inline Visualization

    guyi-a/pi-ling

    当回答涉及流程、架构、机制、因果、对比、时间线、状态机、层级关系,或用户明确要求画图 / 图解 / 示意图时使用。把内容画成对话内直接渲染的图(自包含 HTML/SVG),而不是用文字罗列。不承接数值图表(折线/柱状/饼图,当前无图表库)、海报、头像、写实插画、地图。

    106 GitHub stars~555 tokensUpdated 21 days ago
    Auto-check passed

Works with

Questions about PDF

What does PDF do?

PDF 相关的所有操作:从零生成(reportlab / pypdf)、格式转化(md/html → PDF)、修改(合并 / 拆分 / 旋转 / 加水印 / 提图片 / 元数据)、读内容(pdfplumber / extractdocumenttext)、OCR 扫描件、加密解密。触发场景:用户说"生成 PDF" / "做份 PDF 简历" / "合并这几份 PDF" / "给 PDF…. PDF is an agent skill from guyi-a/pi-ling.

When should I use PDF?

PDF fits situations like: tasks that involve PDF.

How do I install PDF in Claude Code?

Run `npx skills add guyi-a/pi-ling --skill pdf -a claude-code`. Or copy the skill folder (.agents/skills/pdf in guyi-a/pi-ling) into .claude/skills/pdf in your project. Claude Code loads it when a task matches its description.

How do I install PDF in Codex?

Run `npx skills add guyi-a/pi-ling --skill pdf -a codex`. Or copy the skill folder (.agents/skills/pdf in guyi-a/pi-ling) into .agents/skills/pdf in your project. Codex loads it when a task matches its description.

Can I use PDF 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 guyi-a/pi-ling --skill 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/pdf, .gemini/skills/pdf, .github/skills/pdf and .opencode/skills/pdf in your project.

What does PDF need to run?

Going by SKILL.md and its folder, PDF needs Python for the scripts in its folder and the command-line tools its instructions call (pandoc, qpdf, brew, uv and pdftotext). Our summary lists: Python 3.

Does PDF access the network?

SKILL.md names 1 domain. In commands or code: google.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is PDF 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does PDF use?

PDF 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 PDF use?

About 3.3k tokens (SKILL.md is roughly 13k 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 PDF?

Skills that share tags, products or a category with PDF: Document Gen Dual Backend (HKUDS/OpenSpace, 7.7k stars), Document Gen Resilient Multiformat (HKUDS/OpenSpace, 7.7k stars), PDF Generation Troubleshooting (HKUDS/OpenSpace, 7.7k stars) and Harness Book Best Practice (wquguru/harness-books, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PDF?

guyi-a (a GitHub user) maintains it in guyi-a/pi-ling, which has 106 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 16, 2026.

Source: guyi-a/pi-ling on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.