GOD is a control room for observing and directing societies of language-model agents running in simulated worlds. It lets researchers inspect replays, question individual agents, alter future events, reset simulations, and export experiments for reuse. The catalogue entries are skills and agents for operating and investigating these simulations.
Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/XiaoLuoLYG/GODnpx agentmods add skills/xiaoluolyg/god/local-doc-ocrWrote 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/xiaoluolyg/god/local-doc-ocr)<a href="https://agentmods.dev/skills/xiaoluolyg/god/local-doc-ocr"><img src="https://agentmods.dev/badge/skills/xiaoluolyg/god/local-doc-ocr/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/xiaoluolyg/god/local-doc-ocr"><img src="https://agentmods.dev/badge/skills/xiaoluolyg/god/local-doc-ocr.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.00221 | $0.03307 |
| Opus 5.5 | $0.00088 | $0.01323 |
| Sonnet 5.5 | $0.00044 | $0.00661 |
| Haiku 4.5 | $0.00022 | $0.00331 |
Grade A, and why
local-doc-ocr 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 17d 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 — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
本地文档 OCR(扫描件 / 图片 → 文字)
30 秒快速开始
- 准备一份扫描件 PDF 或图片(技能包内已附
examples/sample_scan.png/sample_scan.pdf可直接试跑)。 - 终端运行(首次会自动装好依赖,需联网一次):
python scripts/ocr_offline.py "examples/sample_scan.png" - 同目录生成
sample_scan_OCR.md,即为识别结果;examples/sample_scan_OCR_example.md是预期效果示意,可对照。 - 含表格 / 手写 / 印章、想要更高质量?走「路线 B:多模态读图」。
- 涉密资料?全程用「路线 A(RapidOCR)」即可,数据不出本机。
运行环境要求
- Python 3.8+:本技能无法替你安装 Python 解释器,请先确保本机已安装。
- 能执行本地脚本的 Agent:本技能由 Python 脚本驱动,需运行环境支持调用
python/bash(如 WorkBuddy、Claude Code、Cursor)。纯对话型 Agent(不能运行本地脚本)不适用。 - **引擎 B(多模态读图)**额外需要 Agent 支持图片输入(如 WorkBuddy 的 Read 工具);不支持多模态时自动退回引擎 A。
依赖自动配置(首次使用)
⚠️ 透明说明:本技能首次运行会联网一次,仅安装声明过的 4 个白名单依赖(
rapidocr-onnxruntime/pymupdf/pillow/numpy),装好之后全程离线、不再联网,绝不安装任何未知包。如环境不允许自动安装,可手动pip install -r requirements.txt预装(效果等价)。
本技能带环境自检 + 自动安装机制(A 档):
- 首次运行脚本时,
setup.py会检测rapidocr-onnxruntime / pymupdf / pillow / numpy四个依赖,缺失哪个自动从 PyPI 安装哪个(优先清华镜像,PyPI 官方兜底)。 - ⚠️ 首次自动安装需联网一次(仅安装声明过的白名单依赖,不装任何未知包,透明可控);装好之后全程离线、不再联网。
- 也可手动预装(等价效果):
pip install -r requirements.txt
依赖清单(详见 requirements.txt):
rapidocr-onnxruntime:引擎 A 的离线 OCR 核心(ONNX,纯 CPU)pymupdf:PDF 渲染为图片pillow、numpy:图像处理与计算- 若自动安装失败,按上方命令手动安装即可。
何时使用
- 用户发来一份 PDF,但 markitdown / pdfplumber 提取为 0 字(扫描件 / 图片型 PDF)。
- 用户发来照片、截图、扫描图片,需要提取其中文字(含手写体、表格、印章)。
- 用户用「识别」「读一下这份」「把这个读出来」「转成文字」等模糊说法要求处理 PDF / 图片时(⚠️ 若明确要求「识别隐患 / 安全隐患」则属安全检查类技能,本技能只做文字提取,不判安全)。
- 任何「读取这个文件/图片里的字」「OCR 一下」「把扫描件变成可编辑文字」类请求。
- 用户要将扫描件 PDF / 图片(文字提取为 0 字)整理进知识库时,本技能可作为预处理自动介入。
- 涉密 / 敏感或隐私资料,要求本地处理、不联网、不外传。
核心原理
扫描件 PDF 本质是「一页页图片打包」,传统文本提取工具读不到字。本技能用双引擎解决:
- 引擎 A · RapidOCR(离线保底):PyMuPDF 渲染 → RapidOCR(ONNX, 纯 CPU) 逐页识别 → 自动拼
.md落盘。不依赖多模态、不联网、不占 token、可批量,是默认与涉密首选路线。 - 引擎 B · 多模态读图(高质量):PDF 渲染为 PNG → 由支持多模态读图能力的 Agent 逐张读取(如 WorkBuddy 的 Read 工具),模型「看图识字」。擅长表格还原、手写签名、印章、模糊图,质量高于引擎 A,但消耗多模态额度。注意:引擎 B 的隐私性取决于 Agent 的多模态实现是否本地运行;敏感资料请优先走引擎 A。
两步均在本机完成;图片与文字不上传任何外部服务,满足涉密与隐私要求。
What ships with it
8 files 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.
- 17d ago First seen · 144 lines · 221 tokens per session scan A a2c9422fad7b
local-doc-ocr is a skill published in the GitHub repository XiaoLuoLYG/GOD (1,292 stars, last pushed 5d ago), licensed Apache-2.0. It adds 221 tokens to every session and 3,307 once invoked, about $0.0009 per session on Opus 5.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-11-13.
local-doc-ocr compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| local-doc-ocrXiaoLuoLYG/GOD | Skill | 1.3k | 5d ago | Apache-2.0 | A | 221 | Claude Code, Codex |
| paddleocr-doc-parsingPaddlePaddle/PaddleOCR | Skill | 93k | 2mo ago | Apache-2.0 | A | 140 | Claude Code, Codex |
| paddleocr-text-recognitionPaddlePaddle/PaddleOCR | Skill | 93k | 2mo ago | Apache-2.0 | A | 125 | Claude Code, Codex |
| adelanding-ai/ade-cli | Skill | 2.4k | 1mo ago | Apache-2.0 | A | 65 | Claude Code, Codex |
| mineruopendatalab/MinerU | Skill | 85k | yesterday | none | A | 147 | Claude Code, Codex |
| document-processingericrisco/rsc-harness | Skill | 682 | 5d ago | MIT | A | 84 | Claude Code, Codex |
| bank-statement-parsingjohnsonhk88/AI-Bank-Statement-Document-Automation-By-LLM-And-Personal-Finanical-Analysis-Prediction | Skill | 638 | 3d ago | Apache-2.0 | A | 23 | Claude Code, Codex |