Markitdown
ImCa0/just-laws
Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.
将图片或 PDF 页面按 N 张/页编排为标准化 A4 PDF,或将长截图渲染为单张自适应高度 PDF。本技能应在用户需要将截图(手机截图、视频截图)、照片、已有 PDF 页面或长截图(微信聊天、庭审笔录)合并为 PDF 时使用。不要用于:OCR 文字识别、PDF 内容编辑、图片格式转换。
$ npx skills add cat-xierluo/legal-skills --skill img2pdf -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install cat-xierluo/legal-skills img2pdf --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/img2pdf .claude/skills/img2pdf && rm -rf skills-srcUse ~/.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/
Install the "img2pdf" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/img2pdf into .claude/skills/img2pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "img2pdf", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/cat-xierluo/legal-skills/tree/main/skills/img2pdfType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add cat-xierluo/legal-skills --skill img2pdf -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install cat-xierluo/legal-skills img2pdf --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/img2pdf .agents/skills/img2pdf && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "img2pdf" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/img2pdf into .agents/skills/img2pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "img2pdf", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cat-xierluo/legal-skills --skill img2pdf -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install cat-xierluo/legal-skills img2pdf --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/img2pdf .cursor/skills/img2pdf && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "img2pdf" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/img2pdf into .cursor/skills/img2pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "img2pdf", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/cat-xierluo/legal-skills.git --path skills/img2pdf--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add cat-xierluo/legal-skills --skill img2pdf -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install cat-xierluo/legal-skills img2pdf --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/img2pdf .gemini/skills/img2pdf && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "img2pdf" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/img2pdf into .gemini/skills/img2pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "img2pdf", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install cat-xierluo/legal-skills img2pdfInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add cat-xierluo/legal-skills --skill img2pdf -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/img2pdf .github/skills/img2pdf && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "img2pdf" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/img2pdf into .github/skills/img2pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "img2pdf", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add cat-xierluo/legal-skills --skill img2pdf -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install cat-xierluo/legal-skills img2pdf --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/img2pdf .opencode/skills/img2pdf && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "img2pdf" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/img2pdf into .opencode/skills/img2pdf/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "img2pdf", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
img2pdf将图片或 PDF 页面按 N 张/页编排为标准化 A4 PDF,或将长截图渲染为单张自适应高度 PDF。本技能应在用户需要将截图(手机截图、视频截图)、照片、已有 PDF 页面或长截图(微信聊天、庭审笔录)合并为 PDF 时使用。不要用于:OCR 文字识别、PDF 内容编辑、图片格式转换。
Img2pdf is an agent skill from cat-xierluo/legal-skills. 将图片或 PDF 页面按 N 张/页编排为标准化 A4 PDF,或将长截图渲染为单张自适应高度 PDF。本技能应在用户需要将截图(手机截图、视频截图)、照片、已有 PDF 页面或长截图(微信聊天、庭审笔录)合并为 PDF 时使用。不要用于:OCR 文字识别、PDF 内容编辑、图片格式转换。
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `CHANGELOG.md`, `references/layout-examples.md` and `scripts/img_to_pdf.py`).
It sits in Documents & Office, covering PDF. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit db2c58c. It shows what the files ask for, not the result of running them.
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.
Ships 2 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Img2pdf loads about 1.1k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 38 tokens; SKILL.md has 270 words of instructions outside code blocks.
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.
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.
The full file from cat-xierluo/legal-skills at commit db2c58c, republished under its MIT licence (© cat-xierluo). 270 words, ~1,147 tokens.
.claude/skills/img2pdf/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.本技能解决"大量截图/照片需要编排为紧凑 PDF 提交"以及"超长截图(微信聊天、庭审笔录)需要保留上下逻辑转为 PDF"的问题。核心场景是法律证据材料整理。
核心职责:
本技能不做 OCR、不编辑 PDF 内容、不处理视频文件。若需要从视频提取截图,先使用 video-screenshot。
--normalize-a4 只做页面标准化,不做多图编排。无额外系统依赖。
| 包名 | 用途 | 安装命令 |
|---|---|---|
pypdf>=4.0.0 | PDF 页面变换与合并 | python3 -m pip install -r scripts/requirements.txt |
Pillow>=10.0.0 | 图片格式检测 | 同上 |
PyMuPDF>=1.24.0 | 图片转 PDF 页面 | 同上 |
根据 --input 参数收集图片或 PDF 文件。如果是目录,扫描其中所有支持格式的图片。按文件名或修改时间排序。
根据 --per-page 和页面方向计算每张图片的可用区域:
per-page=1:整页减去边距,横竖由图片方向决定。per-page=1:整页减去边距,横竖由图片方向决定。per-page=2:A4 横版,左右两列。per-page=3:A4 横版,三列并排。per-page=4:A4 横版或竖版,2×2 网格。per-page=auto(默认):竖版图多 → 3张/页,横版图多 → 1张/页。每张图片等比缩放适配其可用区域,居中放置。
将编排后的页面写入输出 PDF。不修改任何原始文件。
首次使用时安装依赖:
python3 -m pip install -r scripts/requirements.txtpython3 scripts/img_to_pdf.py \
--input /path/to/screenshots/ \
--output /path/to/output.pdf
# 自动检测:竖版图多 → 3张/页python3 scripts/img_to_pdf.py \
--input /path/to/desktop-screenshots/ \
--output /path/to/output.pdf
# 自动检测:横版图多 → 1张/页(A4横版)python3 scripts/img_to_pdf.py \
--input /path/to/screenshots/ \
--output /path/to/output.pdf \
--per-page 2python3 scripts/img_to_pdf.py \
--input /path/to/frames/ \
--output /path/to/output.pdf \
--per-page 3python3 scripts/img_to_pdf.py \
--input /path/to/original.pdf \
--output /path/to/repacked.pdf \
--per-page 2python3 scripts/img_to_pdf.py \
--input img1.jpg img2.jpg img3.png \
--output /path/to/output.pdf \
--per-page 3python3 scripts/img_to_pdf.py \
--input /path/to/wechat_long.png \
--output /path/to/wechat.pdf \
--split \
--per-page 3
# 1080×6000 → 按 1080×√2≈1527px 切 4 段 → 2 页 A4 横版python3 scripts/img_to_pdf.py \
--input /path/to/wechat_long.png \
--output /path/to/wechat.pdf \
--split \
--split-height 1500 \
--per-page 3python3 scripts/img_to_pdf.py \
--input /path/to/transcript.png \
--output /path/to/transcript.pdf \
--mode vertical
# 不切割,1080×5000 → 1 页 595×2573pt
# 页面高度按图等比缩放,保留上下逻辑python3 scripts/img_to_pdf.py \
--input /path/to/dir/ \
--per-page 2 \
--dry-run| 参数 | 说明 | 默认值 |
|---|---|---|
--input / -i | 图片文件、PDF 文件或目录(必填) | - |
--output / -o | 输出 PDF 路径 | <输入名>_编排.pdf |
--mode | 编排模式:nup(N 张/页)或 vertical(单图一长页) | nup |
--per-page / -n | nup 模式下每页图片数:1/2/3/4,或省略自动 | auto(竖版3张,横版1张) |
--margin / -m | 页边距(pt) | 25 |
--orientation | nup 模式页面方向:auto/landscape/portrait | auto |
--sort | 排序:name/time/none | name |
--split | 启用长截图切割(nup 模式) | 关闭 |
--split-height | 切割段高(px);不传 = 按 A4 比例(图宽 × √2);vertical 模式忽略 | A4 比例 |
--dry-run | 仅预览不输出 | false |
| 维度 | nup | vertical |
|---|---|---|
| 是否切割 | 视 --split 而定 | 不切(强制) |
| 每页图数 | 1/2/3/4 | 必为 1 |
| 页面尺寸 | A4 固定 | 宽度固定 A4 595pt,高度按图等比 |
| 适用场景 | 微信聊天、视频截图、证据照片 | 庭审笔录、单页长截图 |
完成后检查:
--split-height 或 A4 比例默认;vertical 模式页面高度 = 图高 × (A4 宽 - 2×margin) / 图宽 + 2×margin。/tmp/img2pdf-splits-* 不残留)。© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (scripts, references) in skills/img2pdf of cat-xierluo/legal-skills.
Open the folder on GitHubat commit db2c58c
Img2pdf 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Img2pdf this skillcat-xierluo/legal-skills | 720 | — | ~1.1k | Automated safety check: Pass | MIT | |
| MarkitdownImCa0/just-laws | 781 | 14 repos | ~3.2k | Automated safety check: Notes | MIT | |
| Gzh Designisjiamu/gzh-design-skill | 4k | — | ~2.2k | Automated safety check: Pass | AGPL-3.0 | |
| GenOffice Document CLIgenspark-ai/genoffice | 9.2k | — | ~19k | Automated safety check: Pass | Apache-2.0 | |
| Harness Book Best Practicewquguru/harness-books | 3.2k | — | ~4.1k | Automated safety check: Pass | None | |
| Bookforge Korean Ebook PDF Makergongnyang/bookforge | 316 | 1 repos | ~1.7k | Automated safety check: Pass | MIT |
ImCa0/just-laws
Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.
isjiamu/gzh-design-skill
微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…
genspark-ai/genoffice
Creates, converts, reads and edits real pptx, xlsx, docx and PDF files locally through the genoffice command line.
wquguru/harness-books
Best practices for working on the Harness books repo. An agent skill from wquguru/harness-books.
gongnyang/bookforge
Produces book-style Korean ebook PDFs from a topic or finished manuscript, with six design styles, real book parts and quality-check gates before output.
aws-samples/amazon-bedrock-agents-healthcare-lifesciences
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.
cat-xierluo/legal-skills
Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.
cat-xierluo/legal-skills
Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.
cat-xierluo/legal-skills
Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.
cat-xierluo/legal-skills
Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.
cat-xierluo/legal-skills
Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.
cat-xierluo/legal-skills
Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.
Categories
将图片或 PDF 页面按 N 张/页编排为标准化 A4 PDF,或将长截图渲染为单张自适应高度 PDF。本技能应在用户需要将截图(手机截图、视频截图)、照片、已有 PDF 页面或长截图(微信聊天、庭审笔录)合并为 PDF 时使用。不要用于:OCR 文字识别、PDF 内容编辑、图片格式转换。. Img2pdf is an agent skill from cat-xierluo/legal-skills.
Img2pdf fits situations like: tasks that involve PDF.
Run `npx skills add cat-xierluo/legal-skills --skill img2pdf -a claude-code`. Or copy the skill folder (skills/img2pdf in cat-xierluo/legal-skills) into .claude/skills/img2pdf in your project. Claude Code loads it when a task matches its description.
Run `npx skills add cat-xierluo/legal-skills --skill img2pdf -a codex`. Or copy the skill folder (skills/img2pdf in cat-xierluo/legal-skills) into .agents/skills/img2pdf in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill img2pdf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/img2pdf, .gemini/skills/img2pdf, .github/skills/img2pdf and .opencode/skills/img2pdf in your project.
Going by SKILL.md and its folder, Img2pdf needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Img2pdf is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Img2pdf: Markitdown (ImCa0/just-laws, 781 stars), Gzh Design (isjiamu/gzh-design-skill, 4k stars), GenOffice Document CLI (genspark-ai/genoffice, 9.2k 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.
cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 720 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 10, 2026.
Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.