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 Bwkyd/wps-skills --skill wps-pdf-extractgit clone --depth 1 https://github.com/Bwkyd/wps-skillsWrote 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/bwkyd/wps-skills/wps-pdf-extract)<a href="https://agentmods.dev/skills/bwkyd/wps-skills/wps-pdf-extract"><img src="https://agentmods.dev/badge/skills/bwkyd/wps-skills/wps-pdf-extract/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/bwkyd/wps-skills/wps-pdf-extract"><img src="https://agentmods.dev/badge/skills/bwkyd/wps-skills/wps-pdf-extract.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.00096 | $0.01583 |
| Opus 5 | $0.00048 | $0.00792 |
| Sonnet 5 | $0.00019 | $0.00317 |
| Haiku 4.5 | $0.00010 | $0.00158 |
Grade A, and why
wps-pdf-extract 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 11d 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.
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.
How it starts
The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PDF内容提取工具
PDF → 提取文字/表格/图片 → 转为可编辑的Word/Excel。
告别"PDF里的表格复制不出来"的痛苦。
When to Use
- 从PDF中提取文字内容
- 提取PDF中的表格到Excel
- 提取PDF中的图片
- PDF转可编辑Word
- 用户说"PDF里的表格怎么弄出来""PDF转Word"
When NOT to Use
- PDF合并/拆分 → 使用
wps-pdf-merge-split - PDF加水印 → 使用
wps-watermark
工作流程
Step 1: 诊断PDF类型
PDF类型判断:
├─ 文字型PDF(可选中文字)→ 直接提取
├─ 扫描型PDF(图片)→ 需要OCR → 提示用户
└─ 混合型(部分文字部分图片)→ 分别处理
Step 2: 提取内容
# 安装依赖
# pip install PyMuPDF pdfplumber python-docx openpyxl
import fitz # PyMuPDF
import pdfplumber
from docx import Document
from openpyxl import Workbook
import os
class PDFExtractor:
"""PDF内容提取器"""
def __init__(self, pdf_path):
self.pdf_path = pdf_path
self.doc = fitz.open(pdf_path)
def extract_text(self, pages=None):
"""提取全部文字"""
text = []
page_range = pages or range(len(self.doc))
for i in page_range:
page = self.doc[i]
text.append(page.get_text())
return '\n'.join(text)
def extract_tables(self, pages=None):
"""提取表格(使用pdfplumber)"""
tables = []
with pdfplumber.open(self.pdf_path) as pdf:
page_range = pages or range(len(pdf.pages))
for i in page_range:
page_tables = pdf.pages[i].extract_tables()
for t in page_tables:
tables.append({
'page': i + 1,
'data': t,
})
return tables
def extract_images(self, output_dir):
"""提取图片"""
os.makedirs(output_dir, exist_ok=True)
images = []
for i, page in enumerate(self.doc):
for j, img in enumerate(page.get_images(full=True)):
xref = img[0]
pix = fitz.Pixmap(self.doc, xref)
if pix.n < 5: # GRAY or RGB
img_path = os.path.join(output_dir, f'page{i+1}_img{j+1}.png')
pix.save(img_path)
else: # CMYK
pix = fitz.Pixmap(fitz.csRGB, pix)
img_path = os.path.join(output_dir, f'page{i+1}_img{j+1}.png')
pix.save(img_path)
images.append(img_path)
return images
def to_word(self, output_path):
"""转换为Word文档"""
doc = Document()
for i, page in enumerate(self.doc):
if i > 0:
doc.add_page_break()
text = page.get_text("blocks")
for block in sorted(text, key=lambda b: (b[1], b[0])):
if block[6] == 0: # text block
para = doc.add_paragraph(block[4].strip())
doc.save(output_path)
return os.path.abspath(output_path)
def tables_to_excel(self, output_path):
"""表格导出为Excel"""
tables = self.extract_tables()
if not tables:
return None
wb = Workbook()
for idx, table in enumerate(tables):
ws = wb.active if idx == 0 else wb.create_sheet()
ws.title = f"表格{idx+1}_P{table['page']}"
for row_idx, row in enumerate(table['data'], 1):
for col_idx, cell in enumerate(row, 1):
ws.cell(row=row_idx, column=col_idx,
value=cell if cell else '')
wb.save(output_path)
return os.path.abspath(output_path)
def close(self):
self.doc.close()
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 198 lines · 96 tokens per session scan A 7df6b0523175
wps-pdf-extract is a skill published in the GitHub repository Bwkyd/wps-skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 96 tokens to every session and 1,583 once invoked, about $0.0005 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-31.
Other skills, from other repositories
note-organizer
Use this skill whenever the user wants to organize course materials, lecture notes, PPT/PDF/DOCX files, textbooks, personal notes, senior-student notes, historical exams, review questions, standards, manuals, or scattered study resources into a structured Markdown note library. Use it even when the user only says…
tender-analysis
A workflow for reviewing tender documents, which are formal project requests that describe requirements and bidding rules. It extracts project details, technical and business conditions, deadlines, scoring rules, risks, and questions for clarification.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and…
liteparse
Local document and PDF parsing that returns spatial text with bounding boxes. Use for extracting text from PDFs, DOCX, Office files, and images; running OCR on scans; producing layout-preserved JSON for RAG; batch-ingesting folders of papers; or rendering pages to PNG for multimodal agents. Distinguishing capabilities…
markitdown
Convert heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.
open-notebook
Self-hosted, open-source alternative to Google NotebookLM for AI-powered research and document analysis. Use when organizing research materials into notebooks, ingesting diverse content sources (PDFs, videos, audio, web pages, Office documents), generating AI-powered notes and summaries, creating multi-speaker…