PDF Toolkit
XiaomiMiMo/MiMo-Code
Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.
本技能应在用户需要 OCR、扫描识别、图片文字识别、文档识别,或将 PDF、图片、Office 文档、URL 转换为 Markdown 时使用。检测到法律材料时可进行保守的法律术语与文书结构优化。不要用于法律事实判断、补写缺失内容、语义改写、印章深度识别或图表实体分析。
$ npx skills add cat-xierluo/legal-skills --skill legal-ocr -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install cat-xierluo/legal-skills legal-ocr --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/legal-ocr .claude/skills/legal-ocr && 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 "legal-ocr" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/legal-ocr into .claude/skills/legal-ocr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-ocr", 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/legal-ocrType 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 legal-ocr -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install cat-xierluo/legal-skills legal-ocr --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/legal-ocr .agents/skills/legal-ocr && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "legal-ocr" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/legal-ocr into .agents/skills/legal-ocr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-ocr", 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 legal-ocr -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install cat-xierluo/legal-skills legal-ocr --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/legal-ocr .cursor/skills/legal-ocr && 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 "legal-ocr" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/legal-ocr into .cursor/skills/legal-ocr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-ocr", 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/legal-ocr--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 legal-ocr -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install cat-xierluo/legal-skills legal-ocr --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/legal-ocr .gemini/skills/legal-ocr && 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 "legal-ocr" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/legal-ocr into .gemini/skills/legal-ocr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-ocr", 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 legal-ocrInstalls 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 legal-ocr -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/legal-ocr .github/skills/legal-ocr && 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 "legal-ocr" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/legal-ocr into .github/skills/legal-ocr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-ocr", 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 legal-ocr -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 legal-ocr --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/legal-ocr .opencode/skills/legal-ocr && 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 "legal-ocr" agent skill from https://github.com/cat-xierluo/legal-skills/tree/main/skills/legal-ocr into .opencode/skills/legal-ocr/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "legal-ocr", 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.
legal-ocr本技能应在用户需要 OCR、扫描识别、图片文字识别、文档识别,或将 PDF、图片、Office 文档、URL 转换为 Markdown 时使用。检测到法律材料时可进行保守的法律术语与文书结构优化。不要用于法律事实判断、补写缺失内容、语义改写、印章深度识别或图表实体分析。
Legal OCR is an agent skill from cat-xierluo/legal-skills. 本技能应在用户需要 OCR、扫描识别、图片文字识别、文档识别,或将 PDF、图片、Office 文档、URL 转换为 Markdown 时使用。检测到法律材料时可进行保守的法律术语与文书结构优化。不要用于法律事实判断、补写缺失内容、语义改写、印章深度识别或图表实体分析。
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 27 other files, including scripts and reference files (for example `CHANGELOG.md`, `config/legal_terms.example.json` and `references/legal_terms.md`).
It sits in Documents & Office, covering PDF. It works with Python and ONNX. The licence is MIT.
4 steps, taken from the first numbered list 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 8 files in scripts/ (Python and JavaScript, from the files we listed), which the agent can run.
Shell commands in SKILL.md call:
uvpiposascriptbrewpythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv and pip, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
PADDLEOCR_ACCESS_TOKENMINERU_API_TOKENPADDLE_OCR_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Legal OCR loads about 2.3k tokens when it runs, and up to ~6.6k if it reads all its reference files. Until then it costs about 36 tokens; SKILL.md has 677 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 noted patterns worth knowing about, such as sudo or a known installer.
cp .env.example .envnano .envAutomated 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). 677 words, ~2,305 tokens.
.claude/skills/legal-ocr/SKILL.md (or your agent's skills folder). This skill also uses 23 other files; get the full folder from GitHub.本技能用于 OCR、扫描识别、图片文字识别、文档识别,以及把 PDF、图片、Office 文档和 URL 转换为可继续编辑、分析和归档的 Markdown。它首先是通用 OCR 入口;当结果被识别为法律材料时,再自动启用保守型法律后处理。默认使用配置优先的自动路由:
--backend rapid(本地 onnx 推理,全程不出本机)。旧的 paddle-ocr 和 mineru-ocr 保持可用;本技能是新的统一入口,目标是覆盖两者的常用 OCR/转换场景。
在以下场景使用本技能:
不优先使用本技能的场景:
| 依赖 | 安装方式 |
|---|---|
python3 | macOS 通常已内置 |
uv | macOS: brew install uv |
脚本使用 uv run 执行,依赖写在脚本头部;推荐直接使用 uv run scripts/convert.py,无需单独维护 requirements.txt。
| 包名 | 用途 | 安装命令 |
|---|---|---|
httpx | 调用 PaddleOCR 与 MinerU API | pip install httpx |
pypdfium2 | 读取 PDF 页数与拆分页码范围 | pip install pypdfium2 |
rapidocr + onnxruntime | 可选:本地 RapidOCR 后端(--backend rapid) | uv run --with rapidocr --with onnxruntime scripts/convert.py ... 或 pip install rapidocr |
如直接用 python scripts/convert.py 运行且缺少依赖,脚本会给出安装提示。
LEGAL_OCR_RAPID_DPI 调整;置信度阈值 LEGAL_OCR_RAPID_MIN_SCORE(默认 0.5)。复制配置模板:
cd legal-ocr/config
cp .env.example .env
nano .env可选配置:
PADDLEOCR_DOC_PARSING_API_URL 和 PADDLEOCR_ACCESS_TOKEN。MINERU_API_TOKEN;不填时小文件默认走 MinerU 轻量接口。LEGAL_OCR_BACKEND=auto。LEGAL_OCR_LEGAL_TERMS=auto,只在检测到法律材料时启用;如需强制启用可设为 true,如需关闭可设为 false。LEGAL_OCR_LINE_MERGE=true;如需加载自定义法律术语,设置 LEGAL_OCR_CUSTOM_TERMS_PATH。本技能也会尝试读取环境变量和 ~/.mineru/config.yaml 中的 MinerU Token。
PaddleOCR 也兼容 pdf-processor 使用的 PADDLE_OCR_API_ENDPOINT / PADDLE_OCR_API_KEY,并支持 /api/v2/ocr/jobs 异步任务接口。
在技能根目录运行:
uv run scripts/convert.py "/path/to/file.pdf"
uv run scripts/convert.py "/path/to/file.pdf" --pages "1-20"
uv run scripts/convert.py "/path/to/file.pdf" --backend paddle
uv run scripts/convert.py "/path/to/file.pdf" --backend paddle --paddle-model PaddleOCR-VL-1.5
uv run scripts/convert.py "https://example.com/document.pdf" --backend auto
uv run scripts/convert.py "https://example.com/article" --backend mineru
uv run scripts/convert.py "/path/to/judgment.pdf" --legal-terms always
uv run scripts/convert.py checktoken敏感材料本地识别(不出本机):
uv run --with rapidocr --with onnxruntime scripts/convert.py "/path/to/scan.pdf" --backend rapid兼容 JXA 入口:
/usr/bin/osascript -l JavaScript scripts/convert.js "/path/to/file.pdf"可选参数:
| 参数 | 说明 |
|---|---|
| `--backend auto | paddle |
| `--text-layer auto | never |
--output <path> | 输出 Markdown 路径或目录 |
--pages <spec> | 页码范围,如 1-20、1-5,8,10-12 |
--archive-name <name> | 自定义 archive 目录名 |
--no-archive | 不写入 archive |
--no-post-process | 跳过全部后处理 |
--no-legal-terms | 跳过法律术语优化 |
| `--legal-terms auto | always |
--no-line-merge | 跳过 OCR 硬换行整理 |
| `--model pipeline | vlm` |
| `--paddle-model PP-OCRv5 | PaddleOCR-VL-1.5` |
| `--paddle-api-protocol auto | sync |
--paddle-api-extra-json <path> | 合并额外 PaddleOCR optionalPayload |
PaddleOCR 同步接口会校验后端实际返回页数。若返回页数少于本地 PDF 批次页数,转换会失败并提示降低 PADDLEOCR_BATCH_PAGES 或使用 --pages 重跑,避免缺页结果被误当作成功。
本地 PDF 进入 OCR 后端之前,会先探测是否带可用的原生文本层(v1.5.0+)。这是法律场景里的高频优化:法院电子送达判决书、电子合同、政府公文等 PDF 通常已带可靠文本层,直读比 OCR 更准、更快、不耗 API 额度。
.pdf 触发;图片、Office、URL 不参与。pypdfium2 逐页抽取文字,计算 4 个指标:文本页覆盖率、平均 CJK / 页、乱码比例(PUA + 替换字符 + 非常见字符)、总字符数。--text-layer 或 env LEGAL_OCR_TEXT_LAYER)| 模式 | 行为 |
|---|---|
auto(默认) | 探测后达标走文本层,不达标回退 OCR |
never | 完全禁用文本层,回到旧版纯 OCR 行为 |
always | 强制走文本层;不可用时直接 exit=2 失败,便于排障 |
--backend 的优先级--backend auto + --text-layer auto:最优路径,先文本层、不达标再 OCR。--backend paddle|mineru:视为用户显式想要 OCR,跳过文本层分支(除非同时设 --text-layer always 强制覆盖)。| env | 默认 | 含义 |
|---|---|---|
LEGAL_OCR_TEXT_LAYER_MIN_COVERAGE | 0.8 | 文本页占探测页比例下限 |
LEGAL_OCR_TEXT_LAYER_MIN_CHARS_PER_PAGE | 50 | 文本页平均 CJK 字符下限 |
LEGAL_OCR_TEXT_LAYER_MAX_GARBLE_RATIO | 0.05 | PUA + 替换字符 + 非常见字符占比上限 |
LEGAL_OCR_TEXT_LAYER_MIN_TOTAL_CHARS | 100 | 非空白字符总数下限 |
阈值默认值的理由见 references/text-layer-detection.md 与 DECISIONS.md。如果你拿到一批真实卷宗发现误判(例如应该走 OCR 的 PDF 走了文本层,或反之),把指标和样本反馈给维护者,再调阈值或加新规则。
无论是否走文本层,PDF 输入都会在 metadata.json 留下 text_layer 字段:
enabled=true + probe 全量指标(页数、coverage、garbled_ratio、阈值快照)。enabled=false + probe.reason(如 no_text_layer / high_garbled_ratio),便于复盘为什么回退到 OCR。auto 会先看用户实际配置了哪些 API;只配置一套时尽量统一走这一套,减少用户判断成本。result.json 和 metadata.json 的 route.attempts 中记录失败类别;存在候选后端时自动继续转换。httpx.RequestError(DNS 解析失败、连接失败、连接/读取超时、远端关闭连接、协议错误)。HTTP 4xx 仍立即抛出(鉴权、配额、参数错误),HTTP 5xx 和 429 在轮询路径下会被同样的重试包装覆盖。LEGAL_OCR_RETRY_ATTEMPTS / LEGAL_OCR_RETRY_BASE_DELAY / LEGAL_OCR_RETRY_MAX_DELAY;可用 PADDLEOCR_RETRY_* 与 MINERU_RETRY_* 覆盖单后端。设置为 1 等于关闭重试。PaddleOCR/MinerU 瞬态错误 … 日志,便于排查真实网络问题。auto 模式:先扫描 OCR 原始文本和文件名,只有命中法院、案号、当事人标签、判决/裁定结构等足够信号时,才运行法律术语优化。result.json 和 metadata.json 的 postprocess.legal_context / legal_context 字段。--legal-terms always 或 LEGAL_OCR_LEGAL_TERMS=true 强制启用。--legal-terms never、--no-legal-terms 或 LEGAL_OCR_LEGAL_TERMS=false。postprocess_log.json,并保留 result_raw.md 供复核。references/legal_terms.md。<文件名>_images/。legal-ocr/archive/时间戳_文件名/。checktoken。--backend、--output、--pages、--archive-name、--model 和 PaddleOCR 相关参数。path / sha256 / size_bytes(本地)或原始 URL(远程)通过 metadata.json 的 source 字段记录,不再单独复制输入副本。archive 内包含:
output/result.mdoutput/result_raw.mdoutput/result.jsonbackend_result/metadata.json(输入文件的 path / sha256 / size_bytes 或远程 URL 通过 source 字段记录;不单独保存输入副本)postprocess_log.json详细结构见 references/output_schema.md。
| 问题 | 解决方式 |
|---|---|
| PaddleOCR 未配置 | 补充 PADDLEOCR_DOC_PARSING_API_URL 与 PADDLEOCR_ACCESS_TOKEN,或显式使用 --backend mineru |
| MinerU 轻量接口超限 | 配置 MINERU_API_TOKEN 后重试,或安装 RapidOCR 走本地识别 |
| 敏感材料不允许外传 | uv run --with rapidocr --with onnxruntime scripts/convert.py <文件> --backend rapid |
--backend rapid 提示未安装 | 用 uv run --with rapidocr --with onnxruntime ...,或 pip install rapidocr 后用 python3 直跑 |
| 一个 API 额度用尽 | 同时配置另一套 API,并保持 --backend auto;转换时会自动尝试候选后端 |
| 网页 URL 失败 | 网页 URL 需要 MinerU Token,不支持轻量模式 |
| DOCX/PPTX 走 PaddleOCR 失败 | Office 文档只能走 MinerU,使用 --backend auto 或 --backend mineru |
| PaddleOCR 返回页数不足 | 降低 PADDLEOCR_BATCH_PAGES 或使用 --pages 按较小范围重跑;当前云端接口实测单次稳定返回上限约 100 页 |
| 转换质量需复核 | 查看 archive 中的 result_raw.md、result.json 和 backend_result/ |
修改本技能后,同步更新本目录下的 TASKS.md、DECISIONS.md 和 CHANGELOG.md。
© 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 23 other files (scripts, references) in skills/legal-ocr of cat-xierluo/legal-skills.
Open the folder on GitHubat commit db2c58c
Legal OCR 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 |
|---|---|---|---|---|---|---|
| Legal OCR this skillcat-xierluo/legal-skills | 720 | — | ~2.3k | Automated safety check: Notes | MIT | |
| PDF ToolkitXiaomiMiMo/MiMo-Code | 14k | — | ~1.7k | Automated safety check: Pass | Apache-2.0 | |
| PDF Generation, Forms and Extractionpipeshub-ai/pipeshub-ai | 3.8k | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| MineruNebutra/MinerU-Skill | 123 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Markdown Exporterbowenliang123/markdown-exporter | 272 | 1 repos | ~5.3k | Automated safety check: Pass | Apache-2.0 | |
| Kimi PDFthvroyal/kimi-skills | 238 | — | ~1.9k | Automated safety check: Pass | None |
XiaomiMiMo/MiMo-Code
Reads, transforms, composes and fills PDFs with Python scripts for extraction, merging, watermarking, encryption, OCR and form filling.
pipeshub-ai/pipeshub-ai
Picks the right library for generating a new PDF, filling an existing PDF form, or extracting text and tables, defaulting to Node where possible.
Nebutra/MinerU-Skill
An AI-Native skill for parsing PDF / Office / image files into clean Markdown with MinerU — a fast, zero-config document parser for AI agents.
bowenliang123/markdown-exporter
Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.
thvroyal/kimi-skills
Professional PDF solution. An agent skill from thvroyal/kimi-skills.
NousResearch/hermes-agent
PDF files: create, read, merge, fill, OCR, edit text. An agent skill from NousResearch/hermes-agent.
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
本技能应在用户需要 OCR、扫描识别、图片文字识别、文档识别,或将 PDF、图片、Office 文档、URL 转换为 Markdown 时使用。检测到法律材料时可进行保守的法律术语与文书结构优化。不要用于法律事实判断、补写缺失内容、语义改写、印章深度识别或图表实体分析。. Legal OCR is an agent skill from cat-xierluo/legal-skills.
Legal OCR fits situations like: tasks that involve PDF.
Run `npx skills add cat-xierluo/legal-skills --skill legal-ocr -a claude-code`. Or copy the skill folder (skills/legal-ocr in cat-xierluo/legal-skills) into .claude/skills/legal-ocr in your project. Claude Code loads it when a task matches its description.
Run `npx skills add cat-xierluo/legal-skills --skill legal-ocr -a codex`. Or copy the skill folder (skills/legal-ocr in cat-xierluo/legal-skills) into .agents/skills/legal-ocr 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 legal-ocr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/legal-ocr, .gemini/skills/legal-ocr, .github/skills/legal-ocr and .opencode/skills/legal-ocr in your project.
Going by SKILL.md and its folder, Legal OCR needs Python and JavaScript for the scripts in its folder, the command-line tools its instructions call (uv, pip, osascript, brew and python) and credentials named PADDLEOCR_ACCESS_TOKEN, MINERU_API_TOKEN and PADDLE_OCR_API_KEY. Our summary lists: Python 3; Node.js; A credential in PADDLEOCR_ACCESS_TOKEN; A credential in MINERU_API_TOKEN.
SKILL.md contains no URLs. Its commands use uv and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. 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.
Legal OCR is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.2k 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 4.3k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Legal OCR: PDF Toolkit (XiaomiMiMo/MiMo-Code, 14k stars), PDF Generation, Forms and Extraction (pipeshub-ai/pipeshub-ai, 3.8k stars), Mineru (Nebutra/MinerU-Skill, 123 stars) and Markdown Exporter (bowenliang123/markdown-exporter, 272 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.