s860-pdf-to-html
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "s860-pdf-to-html":https://skillpi.com/zh/skills/deepskill-71df9972446209c6fdb36dbb37f744cb4a6df3f68dd09c1d9dffa47a4697e9a0。安装前核对上游来源和版本:https://skillhub.cn/skills/user_f4fc8899/s860-pdf-to-html。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
skillhub.cn
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
s860-pdf-to-html:使用本地工具完成 PDF 转 HTML 的任务,不依赖业务账号、API Key 或云端服务。
介绍来源: third_party · user_f4fc8899 · 1.0.2 参考来源
SkillPi 解读
- 能完成的任务
- 中文:使用本地工具完成PDF 转 HTML相关任务,不要求业务账号、API Key 或云端服务。 English: Use local tools for PDF to HTML tasks without business accounts, API keys, or cloud services.
- 适合谁
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: s860-pdf-to-html
description: '中文:使用本地工具完成PDF 转 HTML相关任务,不要求业务账号、API Key 或云端服务。 English: Use local tools for PDF to HTML tasks without business accounts, API keys, or cloud services.'
slug: s860-pdf-to-html
version: 1.0.2
displayName: PDF 转 HTML / PDF to HTML
summary: '中文:PDF 转 HTML,提供本地可复用的工作流、输入输出说明和质量检查。 English: PDF to HTML, with reusable local workflows, input/output guidance, and quality checks.'
license: MITPDF 转 HTML / PDF to HTML · 技能 / Skill
交付说明 / Delivery notes
中文:这是一个个人 SkillPay 办公/通用技能包,标题、摘要和交付边界均提供中文与 English 双语版本。它用于本地文件、文本或结构化数据处理,具体输入、输出、限制和质量检查以正文为准。
English: This is a personal SkillPay office/general-purpose package with bilingual metadata and delivery boundaries. It is intended for local file, text, or structured-data workflows; follow the body for exact inputs, outputs, limitations, and quality checks.
- 账号与凭证 / Accounts and credentials:不要求第三方账号、密码、API Key 或 OAuth 凭证。 / No third-party account, password, API key, or OAuth credential is required.
- 外部服务边界 / External-service boundary:不代用户登录、抓取或调用云端服务;正文提到的工具只按本地可用环境执行。 / It does not log in, scrape, or call cloud services on the user's behalf; mentioned tools are used only when available locally.
- 计费档位 / Pricing tier:SkillHub 发布页设置为 0.01 CNY/call(0.01 元/次)。 / Set the SkillHub publishing price to 0.01 CNY/call.
- 许可证 / License:来源清单已确认许可证,当前包将其写入元数据。 / The source manifest confirms the license, which is recorded in the package metadata.
Turn a PDF into a single, self-contained, readable HTML file — images, tables, charts and reading order preserved — and optionally translate it, keeping every figure in place.
The pipeline is extract → look → (translate) → build → verify. The middle "look" and final "verify" steps are where faithfulness actually comes from: a PDF is a layout, not just a text stream, so you read the rendered pages before building and the rendered HTML before delivering.
This skill runs inline (no context: fork): translation orchestrates a
Dynamic Workflow, and a subagent cannot spawn one.
When to use / not use
- Use when the goal is to read a PDF as HTML/web page, to convert a PDF to a styled HTML document, or to translate a PDF into another language while keeping its figures and tables.
- doc-to-markdown instead if they want plain Markdown text (no styling, figures optional).
- pdf-creator instead for the reverse direction (Markdown → PDF).
What it does NOT do
- Scanned/image-only PDFs (no text layer): OCR first (e.g.
ocrmypdf), then use this. - Complex multi-column tables: cell text is preserved and readable, but column alignment can flatten into a text flow — PyMuPDF reads a table as text blocks, not a grid, so the grid lines are gone. Tables that are images in the PDF survive as images. If the table's grid structure is essential, use doc-to-markdown (pandoc rebuilds real tables) or convert that page separately.
- Pixel-perfect facsimile: output is a clean re-flow that keeps images and reading order, not a 1:1 copy of the original page layout.
- Rewriting: it translates and re-lays-out; it does not summarize, add a TL;DR, or editorialize. Faithfulness is the point (see Fidelity below).
Dependencies
uv (runs Python with inline deps), Google Chrome or Chromium (visual
verification). Python packages come via uv run --with: PyMuPDF, Pillow, numpy.
Nothing to pre-install beyond Chrome and uv.
Workflow
Copy this checklist and tick as you go:
- [ ] 1. Extract structure + render pages (extract_pdf.py)
- [ ] 2. Read pages/*.png — SEE the layout, find content vs decorative images
- [ ] 3. (only if translating) run the translation workflow
- [ ] 4. Build the single-file HTML (build_html.py)
- [ ] 5. Verify visually (verify_render.py → Read every segment)
- [ ] 6. Deliver the .html
1. Extract
uv run --with pymupdf python scripts/extract_pdf.py input.pdf
Writes input-build/ with structure.json (text blocks with font sizes + image
blocks flagged decorative), images/, and pages/ (one PNG per page).
2. Look before you build
Read input-build/pages/*.png. This is not optional: you need to see the real
layout, confirm which images are content vs decoration, and spot tables/charts.
For a long PDF, read every page; for a short one it's quick. This is also where
you understand the document well enough to translate it well.
3. Translate (optional)
Only if the user asked for another language. Read
references/translation_workflow.md and
follow it: a Dynamic Workflow translates pages in parallel, captions data charts,
and reconciles terminology. It produces two overlay files (units.json,
caps.json) that step 4 consumes. Do not hand-translate inline for anything
longer than a page — the workflow keeps terminology consistent and is far faster.
4. Build
# original-language HTML
uv run --with Pillow python scripts/build_html.py input-build/structure.json --out output.html
# translated HTML (overlays from step 3)
uv run --with Pillow python scripts/build_html.py input-build/structure.json --out output.html \
--translation input-build/units.json --captions input-build/caps.json --lang zh-CN
build_html.py is data-driven: it infers heading levels from font size (most
common size = body; larger steps up to h3/h2/h1), drops decorative images, and
inlines content images as compressed base64 → one portable file. It is not
hand-tuned to any document. If a particular PDF has an unusual structure (e.g.
multi-column, sidebars, a figure the size heuristic misreads), read the script and
adjust — it's short and meant to be edited per document.
5. Verify visually (mandatory)
uv run --with Pillow --with numpy python scripts/verify_render.py output.html
Then *Read every `seg-.png`** and check: fonts render (no tofu boxes), no clipped tables/figures, headings/lists look right, all expected images present. Text being correct does not mean the render is correct (failure_cases #7). Fix and re-verify until it's clean.
A quick structural cross-check is fine too, but count occurrences correctly:
grep -o '<figure>' output.html | wc -l — not grep -c (failure_cases #1).
6. Deliver
Hand over the single .html. It's self-contained (images inlined), so it opens
with a double-click and nothing can go missing.
Scripts
| Script | Run with | Purpose |
|---|---|---|
scripts/extract_pdf.py |
uv run --with pymupdf |
PDF → structure.json + images/ + page renders |
scripts/build_html.py |
uv run --with Pillow |
structure.json (+ optional translation/captions) → single-file HTML |
scripts/verify_render.py |
uv run --with Pillow --with numpy |
headless-Chrome render → readable PNG segments |
Fidelity (read before translating)
The deliverable looks authoritative, so wrong content is worse than ugly content. The non-negotiable rules — and the specific ways this has gone wrong before — are in references/failure_cases.md. The one that bites hardest: never give a real person an inferred translated name, and copy every number/proper-noun verbatim (failure_cases #6). Read that file before any translation run; skim it before any run.
Next Step
After producing the HTML, suggest the natural follow-up:
Conversion complete: output.html (single self-contained file).
Options:
A) Make a PDF of it — run /daymade-docs:pdf-creator if you want a print/share copy (Recommended if they need to send it)
B) Extract the text as Markdown instead — run /daymade-docs:doc-to-markdown (if they wanted editable text, not a reading page)
C) No thanks — the HTML is what I wanted
支付改造 / Alipay AI usage-based payment
付费调用契约 / Paid invocation contract
Header 名称 / Header names:Payment-Needed Header;支付后使用 Payment-Proof Header。 / Use the Payment-Needed Header before payment and the Payment-Proof Header after payment.
中文:这是一个 Pay Skill 按调用收费技能,不是普通免费 Skill。业务端点在缺少有效付款凭证时必须返回 HTTP 402 Payment Required,并在 Payment-Needed Header 中给出本次调用的账单信息。调用方通过平台提供的 @alipay/agent-payment 完成支付宝 AI 按量付费后获得 Payment-Proof,随后携带 Payment-Proof 重试同一业务请求;x-proof 仅作为兼容转发字段,不替代官方请求头。
English: This is a Pay Skill with usage-based billing, not a free Skill. When a valid payment proof is missing, the business endpoint must return HTTP 402 Payment Required with the bill in the Payment-Needed Header. The caller completes Alipay AI usage-based payment through @alipay/agent-payment, receives a Payment-Proof, and retries the same business request with the official Payment-Proof Header; x-proof may be accepted only as a compatibility forwarding field.
标准流程 / Standard flow
probe/detect:先发送未付款请求;收到402和Payment-NeededHeader 后读取金额、币种、商品、资源和有效期。 / Send an unpaid request first; on402and thePayment-NeededHeader, read amount, currency, product, resource, and expiry.pay:由宿主调用@alipay/agent-payment完成支付宝 AI 按量付费并取得Payment-Proof。支付宝官方辅助接入命令为npx -y @alipay/alipay-aipay@latest install,它用于改造和联调服务端,不把密钥写进 Skill。 / The host performspaythrough@alipay/agent-paymentand obtains aPayment-Proof. Alipay's official assisted-integration command isnpx -y @alipay/alipay-aipay@latest install; it helps adapt and test the server without putting secrets in the Skill.complete:用官方Payment-ProofHeader 重试;业务服务调用alipay.aipay.agent.payment.verify校验active、金额、订单号、资源 ID 和防重复履约状态,验证通过后执行技能并返回200与结果。 / Retry with the officialPayment-ProofHeader; the service callsalipay.aipay.agent.payment.verify, checksactive, amount, order, resource ID, and replay protection, then runs the Skill and returns200with the result.ack:返回资源后异步调用alipay.aipay.agent.fulfillment.confirm发送履约回执,并保存 receipt 与幂等状态;相同的idempotency-key不得重复扣费或重复执行。 / After returning the resource, asynchronously callalipay.aipay.agent.fulfillment.confirmfor the fulfillment receipt and persist the receipt and idempotency state; the sameidempotency-keymust never charge or execute twice.
部署边界 / Deployment boundary
真实收费的业务端点必须由服务提供方独立部署在公网 HTTPS 上,并在服务端校验支付凭证;支付宝密钥、账号凭证和生产环境密钥不得写入 Skill ZIP。沙箱凭证只用于联调,不代表生产收款已经开通。 / The billable business endpoint must be independently deployed on public HTTPS and verify payment proofs server-side; Alipay secrets, account credentials, and production keys must not be put in the Skill ZIP. Sandbox proofs are for integration testing only and do not mean production collection is enabled.
当前收录版本
1.0.2
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供本地 PDF 转 HTML 的完整工作流,解决用户将 PDF 转换为可读网页的实际需求
- 支持翻译功能并保持图表位置,增强实用性
- 明确区分与 doc-to-markdown、pdf-creator 等工具的边界,定位清晰
亮点
- description 明确说明使用本地工具完成 PDF 转 HTML,不依赖账号或云端服务
- 触发词清晰完整,边界明确,无歧义
待提升项
-
缺少 When to Use 独立章节 原报告严重程度:轻微
When to Use 内容已融入正文,但未作为独立章节突出显示
改进建议:建议将 When to Use / not use 部分提取为独立章节,提升可读性
-
文档较长 原报告严重程度:轻微
文档内容详尽但篇幅较长,可能影响快速浏览
改进建议:可考虑添加目录或摘要卡片,帮助用户快速定位关键信息
亮点
- 文档结构完整,包含交付说明、使用场景、限制、依赖、详细工作流、脚本说明、保真度说明、后续建议等
- frontmatter 完整,包含名称、描述、版本、许可证等元数据
- 工作流步骤清晰(6 步骤),每个步骤都有详细说明和命令示例
亮点
- 工具来源明确(uv, PyMuPDF, Pillow, numpy, Chrome),参数正确
- 覆盖主要异常情况(如装饰性图像识别、表格处理限制、视觉验证)
- 不可逆操作有确认机制(verify_render.py 强制视觉检查),确保输出质量
- 提供 failure_cases.md 参考,帮助用户避免常见错误
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
安装或获取外部依赖
使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。
主文档提及 · 第 180 行 -
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 3, 18, 180, 186 行
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。