Token导航 LogoToken导航

Agent Skill · 开发

pdf-toolkit(PDF toolkit 文档)

pdf-toolkit 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

pdf-toolkit 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 18,535。

总安装 329周安装 14GitHub Stars 4下载 115核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pdf-toolkit(PDF toolkit 文档)
来源仓库:https://github.com/accolver/skill-maker
仓库路径:skills/pdf-toolkit
安装命令:
npx skills add https://github.com/accolver/skill-maker --skill pdf-toolkit
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/accolver/skill-maker --skill pdf-toolkit

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

pdf-toolkit 用于提取、创建和操作 PDF 文档,支持文本、表格、图像和 OCR 处理。适用于需要从 PDF 生成结构化数据或创建 PDF 文件的自动化任务。通过 Bun TypeScript 脚本执行操作,输出为 JSON 格式结果。

安装命令:npx skills add https://github.com/accolver/skill-maker --skill pdf-toolkit。注意权限范围和维护状态,避免对非 PDF 文件进行误操作。

来源仓库内路径:skills/pdf-toolkit

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/accolver/skill-maker --skill pdf-toolkit;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

pdf-toolkit 怎么安装?

在终端执行 npx skills add https://github.com/accolver/skill-maker --skill pdf-toolkit。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

pdf-toolkit 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

pdf-toolkit 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

pdf-toolkit 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

pdf-toolkit 用的人多吗?

公开数据是累计安装 329 次,近一周安装 14 次,下载 115 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

pdf-toolkit 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
pdf-toolkit

PDF toolkit 文档 · 本页

3294只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

PDF Toolkit

Extract data from PDFs (text, tables, images, OCR), create new PDFs, and manipulate existing ones (merge, split). All operations use bundled Bun TypeScript scripts that produce structured JSON output.

When to use

  • The task explicitly involves PDF extraction, OCR, creation, merging, splitting, or conversion using the bundled scripts.
  • The user needs machine-processable output from PDF documents or wants to generate PDF artifacts.
  • The request is document-processing work on .pdf inputs or outputs, not general office-file editing.
  • The workflow should run through the toolkit’s existing Bun/TypeScript utilities.

Do NOT use when:

  • The files are primarily DOCX, XLSX, PPTX, or another non-PDF format.
  • The task requires interactive AcroForm filling, digital signing, or PDF encryption features the toolkit does not cover.
  • The request is general OCR with no PDF input or output requirement.

Response format

Always structure the final response with these top-level sections, in this order:

  1. Summary — state the task, scope, and main conclusion in 1-3 sentences.
  2. Decision / Approach — state the key classification, assumptions, or chosen path.
  3. Artifacts — provide the primary deliverable(s) for this skill. Use clear subheadings for multiple files, commands, JSON payloads, queries, or documents.
  4. Validation — state checks performed, important risks, caveats, or unresolved questions.
  5. Next steps — list concrete follow-up actions, or write None if nothing remains.

Rules:

  • Do not omit a section; write None when a section does not apply.
  • If files are produced, list each file path under Artifacts before its contents.
  • If commands, JSON, SQL, YAML, or code are produced, put each artifact in fenced code blocks with the correct language tag when possible.
  • Keep section names exactly as written above so output stays predictable across skills.

Workflow

1. Identify the operation

Determine which script to use based on what the user needs:

NeedScript
Extract text from PDFscripts/extract-text.ts
Extract tables as structured datascripts/extract-tables.ts
Extract images from PDFscripts/extract-images.ts
OCR a scanned/image-based PDFscripts/ocr-pdf.ts
Create a new PDFscripts/create-pdf.ts
Merge multiple PDFsscripts/merge-pdf.ts
Split a PDF into partsscripts/split-pdf.ts

How to choose between extract-text and ocr-pdf: If the PDF contains selectable text (you can copy-paste from it), use extract-text.ts. If the PDF is a scan or image (text is embedded in images), use ocr-pdf.ts. When unsure, try extract-text.ts first — if it returns empty or garbled text, fall back to ocr-pdf.ts.

2. Run the script

All scripts follow the same conventions:

bun run scripts/<script>.ts [options] <input-file>
  • JSON output goes to stdout (parseable by agents)
  • Progress and diagnostics go to stderr
  • Exit code 0 = success, 1 = error
  • All scripts support --help for full usage

3. Process the output

Parse the JSON output for downstream use. All scripts return structured JSON with consistent patterns (file metadata, page-level results, summary counts).

Script Reference

extract-text.ts — Text extraction

# All text from a PDF
bun run scripts/extract-text.ts document.pdf

# Specific pages as JSON
bun run scripts/extract-text.ts --pages 1,3,5-7 --format json report.pdf

# Per-page text to a file
bun run scripts/extract-text.ts --per-page --output out.txt slides.pdf
FlagDefaultDescription
--pagesallPage selection (e.g., 1,3,5-7)
--formattextOutput format: text or json
--per-pageoffSeparate output by page
--outputstdoutOutput file path

Uses unpdf for text extraction. Works with PDFs that have embedded text layers. For scanned PDFs, use ocr-pdf.ts instead.

extract-tables.ts — Table extraction

# Extract all tables as JSON
bun run scripts/extract-tables.ts report.pdf

# Extract tables from specific pages as CSV
bun run scripts/extract-tables.ts --pages 2,3 --format csv data.pdf
FlagDefaultDescription
--pagesallPage selection
--formatjsonOutput format: json, csv, or tsv
--outputstdoutOutput file path

Detects tables by delimiter patterns: tab-separated, pipe-separated (|), and multi-space-separated. Returns structured data with headers and rows.

extract-images.ts — Image extraction

# Extract all images as PNG
bun run scripts/extract-images.ts document.pdf

# Extract from pages 1-3 as JPEG, min 100px
bun run scripts/extract-images.ts --pages 1-3 --format jpeg --min-size 100 brochure.pdf

# List images without saving
bun run scripts/extract-images.ts --list-only slides.pdf
FlagDefaultDescription
--pagesallPage selection
--output-dir./extracted-images/Where to save images
--formatpngImage format: png or jpeg
--min-size50Min dimension in pixels
--list-onlyoffList without saving

Uses mupdf WASM to extract image XObjects. Falls back to full-page rendering at 288 DPI when discrete images can't be extracted.

ocr-pdf.ts — OCR for scanned PDFs

# OCR a scanned PDF
bun run scripts/ocr-pdf.ts scanned-doc.pdf

# OCR specific pages in German at high DPI
bun run scripts/ocr-pdf.ts --pages 1-5 --lang deu --dpi 600 scan.pdf

# JSON output with confidence scores
bun run scripts/ocr-pdf.ts --format json --output result.json scanned.pdf
FlagDefaultDescription
--pagesallPage selection
--formattextOutput format: text or json
--langengTesseract language code
--dpi300Rendering DPI (higher = better OCR)
--confidence-threshold30Min word confidence (0-100)
--outputstdoutOutput file path

Renders pages via mupdf, then OCRs with tesseract.js. JSON output includes per-page confidence scores and low-confidence word lists. Common language codes: eng, fra, deu, spa, jpn, chi_sim.

create-pdf.ts — PDF creation

# From plain text
bun run scripts/create-pdf.ts --from-text input.txt --output out.pdf

# From images (one per page)
bun run scripts/create-pdf.ts --from-images "photos/*.png" --output album.pdf

# From markdown
bun run scripts/create-pdf.ts --from-markdown doc.md --output report.pdf --page-size a4
FlagDefaultDescription
--from-text—Create from plain text file
--from-images—Create from image files (glob pattern)
--from-markdown—Create from markdown file
--outputrequiredOutput PDF path
--page-sizeletterPage size: letter, a4, legal
--margin72Margin in points (72pt = 1 inch)
--font-size12Base font size in points
--title—Document title metadata
--author—Document author metadata

Exactly one of --from-text, --from-images, or --from-markdown must be specified. Uses pdf-lib for PDF generation.

merge-pdf.ts — Merge PDFs

# Merge two PDFs
bun run scripts/merge-pdf.ts --output merged.pdf chapter1.pdf chapter2.pdf

# Merge with page selections (semicolon-separated, one per input)
bun run scripts/merge-pdf.ts --output out.pdf --page-ranges "1-3;all;2-5" a.pdf b.pdf c.pdf
FlagDefaultDescription
--outputrequiredOutput PDF path
--page-rangesallPer-input page selections (;-separated)
--bookmarkoffAdd source filenames to metadata

Pass two or more input PDFs as positional arguments. They are merged in order. Page ranges use semicolons between inputs: "1-3;all;2-5" means pages 1-3 from the first PDF, all from the second, pages 2-5 from the third.

split-pdf.ts — Split PDF

# One file per page
bun run scripts/split-pdf.ts report.pdf

# Split into 5-page chunks
bun run scripts/split-pdf.ts report.pdf --mode chunks --chunk-size 5 --output-dir ./split/

# Split by custom ranges
bun run scripts/split-pdf.ts report.pdf --mode ranges --ranges "1-3;4-6;7-10"
FlagDefaultDescription
--modepagesSplit mode: pages, ranges, chunks
--output-dir.Output directory
--ranges—Page ranges for ranges mode
--chunk-size—Pages per chunk for chunks mode
--prefixinput nameFilename prefix for outputs

Checklist

  • Identified the correct script for the operation
  • Checked if PDF has selectable text (extract-text) or is scanned (ocr-pdf)
  • Used --format json when structured output is needed downstream
  • Verified output file exists and has expected content
  • For merges: inputs provided in correct order
  • For splits: verified all output files are present

Common Mistakes

MistakeFix
Using extract-text on a scanned PDFUse ocr-pdf.ts instead — extract-text returns empty
Forgetting --output on merge-pdf--output is required, not optional
Page ranges in merge use commas between inputsUse semicolons between inputs: "1-3;all;2-5"
OCR returns garbled textIncrease --dpi (try 600) or check --lang matches source
extract-images returns nothingIncrease --min-size or check pages have actual images
split in ranges mode without --ranges flag--ranges is required when --mode is ranges
Passing glob pattern unquoted to from-imagesQuote the glob: --from-images "*.png" not *.png

Key Principles

  1. Text before OCR — Always try extract-text.ts first. It's faster and more accurate for PDFs with embedded text. Only use ocr-pdf.ts when extract-text returns empty or garbled output.
  2. JSON for pipelines — Use --format json when the output will be processed by another script or the agent. Use --format text when the output is for human reading.
  3. Page ranges are 1-indexed — All scripts use 1-indexed page numbers in their --pages and --ranges flags. Internally they convert to 0-indexed for the PDF libraries.
  4. Stderr for progress, stdout for data — Never mix diagnostics with output. All scripts write progress to stderr and data to stdout.

平台分布

Codex

34.31%
按下载量换算39

Claude

31.51%
按下载量换算36

Cursor

18.7%
按下载量换算22

Gemini CLI

8.89%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills