img2pdf SKILL.md skillA
img2pdf from cat-xierluo/legal-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add cat-xierluo/legal-skills/img2pdf@v1.3.1Pins v1.3.1 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- cat-xierluo/legal-skills
- Path
skills/img2pdf/SKILL.md- Versions recorded
- 5
- Latest version
- v1.3.1, committed Oct 13, 2026
- First version recorded
- Jun 1, 2026
- Size
- 10,238 bytes
- Repository stars
- 775
- License
- none declared
将图片或 PDF 页面编排为 A4 PDF,按原文页边界裁切文书滚动截图,或将连续长图转为长页 PDF。本技能应在用户需要截图合并为 PDF、庭审笔录截图裁掉手机界面和上下邻页、每页只留当页内容时使用。不要用于:OCR 文字识别、PDF 正文编辑、独立图片格式转换。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# img2pdf ## 定位 本技能解决"大量截图/照片需要编排为紧凑 PDF 提交"以及"超长截图(微信聊天、庭审笔录)需要保留上下逻辑转为 PDF"的问题。核心场景是法律证据材料整理。 核心职责: 1. 将图片目录或多个图片文件编排为 A4 PDF,支持 1/2/3/4 张每页。 2. 将已有 PDF 的每页重新编排为 N 张每页的紧凑布局。 3. 自动检测图片横竖方向,选择合适的 A4 页面方向。 4. 可配置页边距,确保打印效果良好。 5. **v1.2.0** 长截图模式:按 A4 比例自动切割超长图再编排(微信聊天场景),或将整张长图渲染为单张自适应高度 PDF(庭审笔录场景)。 6. 文书滚动截图:先视觉识别完整原文页,裁掉手机界面、页外边框和邻页,再一原文页一 A4 页。 本技能不做 OCR、不编辑 PDF 内容、不处理视频文件。若需要从视频提取截图,先使用 video-screenshot。 ## 先选择页面模式 | 输入与用户目标 | 处理方式 | | --- | --- | | 文书阅读器截图,露出相邻页,要求“每页只有当页” | 先逐图确认完整页四边、原页码和顺序,再按原图像素裁切,显式 `--per-page 1`;读取[文书截图裁切](references/document-page-cropping.md) | | 没有原文分页的连续长截图,希望保留整段上下文 | `--mode vertical`;这是连续长图模式,不因内容叫庭审笔录就自动采用 | | 连续长内容需分段后紧凑排版 | `--split` 配合 `--per-page`;按高度切段,不识别原文页 | | 普通照片、视频截图、已有独立 PDF 页 | 沿用 N 张/页编排 | 文书截图裁切先看每张原图;不能用截图固定坐标、最长白块或 A4 比例代替页身份确认。保留当页正文、页眉、原页码、签字/印章及原有水印,去掉页面外 UI 和邻页。缺失或被遮挡的正文不补写。 执行本模式时按 reference 中的**逐图六步执行卡**操作:取得原尺寸 → 列候选纸页 → 确认完整当页 → 沿四边定原图坐标 → 试裁看结果 → 编排后看 PDF。先试一张再处理整批;候选页不完整或边界看不清时回看局部/同页其他源图,不批量猜坐标。reference 提供靠上/居中/靠下示意、界面与页内内容对照、坐标换算算例和失败修正表。 ## 所需权限与安全说明 脚本需要本地 Python 执行、指定输入的文件读取及指定输出目录的文件写入;不外传。裁切清单/收据包含来源路径和页身份,放在用户私有材料目录。保留原文件,选择新 PDF 输出名。固定高度切段流程只清理自身创建的临时目录。 ## 与其他技能配合 …
Read the whole file at its exact version.
How to install
mdr add cat-xierluo/legal-skills/img2pdf@sha256:f7755aa50703c30aThe line at the top of this page pins the label v1.3.1, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_5hhv33gvapheincp)
1 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between Jun 1, 2026 and Oct 13, 2026, about one every 33 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| v1.3.1 latest | 2026-10-13 | 494689d | 10,238 B | A | view · diff |
| v1.3.0 | 2026-10-12 | 821d94d | 9,795 B | A | view · diff |
| v1.2.0 | 2026-06-11 | 4422cef | 7,292 B | A | view · diff |
| v1.0.0 | 2026-06-11 | e52dc8d | 7,292 B | A | view · diff |
| v1.0.0 | 2026-06-01 | f1dd95d | 5,292 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (10238 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
cat-xierluo/legal-skills · 775 stars · license none declared · pushed 2026-11-01 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_5hhv33gvapheincp GET https://markdownregistry.com/api/v1/resolve?ref=cat-xierluo/legal-skills/img2pdf GET https://markdownregistry.com/api/v1/blob/f7755aa50703c30a938ec97c6b3772cb7b38e73d3e5d6c4a7ad82d9612f42366
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.