Atlas / Skills / jiawood2006 / doc-ocr

doc-ocrSAFE

skills/jiawood2006/doc-ocr

Local OCR for PDFs/scans/images using macOS Vision. 本地OCR文档识别。

Verdict
SAFE
Grade
B
Trust score
89 /100
Version
1.0.0
Hosts
1 documented
License
MIT
Stars
0
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

Turn PDFs, scans and photos into editable text with local macOS Vision OCR — nothing is uploaded.

PDF / 扫描件 / 图片 → 可编辑文字。有文字层的 PDF 直接抽取,扫描件走 macOS Vision 自带 OCR(中英文),文件不出本机。

[](LICENSE) [](#install) [](https://github.com/jiawood2006/hermes-skills)

Install

# 1) Agent Skills CLI (works with 50+ agent hosts)
npx skills add jiawood2006/doc-ocr

# 2) Claude Code / any host that reads ~/.claude/skills
git clone https://github.com/jiawood2006/doc-ocr.git ~/.claude/skills/doc-ocr

# 3) Hermes Agent
git clone https://github.com/jiawood2006/doc-ocr.git ~/.hermes/skills/utilities/doc-ocr

No build step, no account, no telemetry.

Usage

python3 scripts/dococr.py 合同.pdf                 # single file → text
python3 scripts/dococr.py 发票.jpg                 # image / scan
python3 scripts/dococr.py 书.pdf --md              # Markdown output
python3 scripts/dococr.py ./扫描件/ -o 全部.txt     # batch a folder

Ask your agent: "把这份扫描合同转成文字" and it runs the OCR for you.

Requirements

macOS (Vision framework) + Python 3.9+

pip3 install pymupdf pyobjc-framework-Vision

Notes

Text-layer PDFs are extracted directly (fast, exact); only scanned pages go through OCR. Chinese and English are handled out of the box.

License

MIT — see LICENSE. Issues and PRs welcome. Part of the hermes-skills collection.

Read from source at commit 0bc229da2302OBSERVED · 2026-10-13
02

Install

Commands as the repository documents them. They are shown, not run.

npx skills add jiawood2006/doc-ocr
git clone https://github.com/jiawood2006/doc-ocr.git ~/.claude/skills/doc-ocr
git clone https://github.com/jiawood2006/doc-ocr.git ~/.hermes/skills/utilities/doc-ocr
03

Host compatibility

What the documentation claims. We have not run a compatibility test.

HostStatusNotes
claude-codementioned
04

What it tells the agent

The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.

---
name: doc-ocr
description: "文档文字识别。用户提供 PDF/扫描件/图片(合同、发票、书页、截图),需要提取文字、转成可编辑文本时使用。扫描件自动 OCR(macOS Vision,中英文)。Document OCR: extract editable text from PDFs, scans, and images (contracts, invoices, book pages, screenshots) via macOS Vision."
version: 1.0.0
author: 涛哥
license: MIT
metadata:
  hermes:
    tags: [ocr, pdf, document, text-extraction, scan]
    category: utilities
    homepage: https://gitee.com/tao6677/useful-tools
---

# Doc-OCR 文档文字识别

PDF / 扫描件 / 图片 → 可编辑文字。有文字层的 PDF 直接提取,扫描件自动 OCR(macOS Vision 自带,中英文)。

## 触发条件

用户提供 PDF/图片文件,要求:
- "提取文字""转文字""OCR"
- 处理扫描件、合同、发票、书页、截图

## 使用步骤

### 1. 单个文件

```bash
python3 ~/.hermes/skills/utilities/doc-ocr/scripts/dococr.py 合同.pdf
python3 ~/.hermes/skills/utilities/doc-ocr/scripts/dococr.py 发票.jpg
```

输出保存为 `<输入名>_ocr.txt`。

### 2. 批量目录

```bash
python3 ~/.hermes/skills/utilities/doc-ocr/scripts/dococr.py ./扫描件/ -o 全部.txt
```

### 3. Markdown 输出

```bash
python3 ~/.hermes/skills/utilities/doc-ocr/scripts/dococr.py 书.pdf --md
```

## 依赖(首次使用时安装)

```bash
pip3 install pymupdf pyobjc-framework-Vision
```

**注意**:OCR 依赖 macOS Vision(仅 macOS 可用)。Linux 需另装 tesseract 等引擎。

## 已知陷阱

- **扫描件判定**:PDF 文字层 <20 字自动走 OCR,正常 PDF 直接提取。
- **手写体**:Vision 对印刷体/清晰手写效果好,潦草手写不保证。
- **隐私卖点**:文件在本机处理,不上传第三方。
05

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (1 observation(s))
Network
none-observed
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (0)

No findings outside the package's declared scope.

Gates applied: no_behavioural_pass.

Audited 2026-10-13 · audit v0.4.1 · source sha 0bc229da2302full audit observations/trust-audit/skill/jiawood2006__doc-ocr.json · Report an issue / request a re-scan
06

Audit history

Every audit this skill has had.

DateSourceVerdictGradeScoreChange
2026-10-130bc229da2302SAFEB89first audit
07

Questions

What does the doc-ocr skill do?

Local OCR for PDFs/scans/images using macOS Vision. 本地OCR文档识别。

Is doc-ocr safe to install?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.

What can doc-ocr access on my machine?

The audit observed that it reads or writes files. Each of those is consistent with what it says it does. Secrets in the source: none found.

Which assistants does doc-ocr work with?

Its documentation mentions claude-code. That is what the text claims, not a compatibility test we ran.

How current is this page?

The grade is for one exact copy of the source (0bc229da2302), read on 2026-10-13. The repository is watched, and a new audit runs when it changes — this is the first audit.

Advertisement