ocr-and-documents
它能做什么
该技能从普通阅读无法处理的扫描件和基于图像的文档中提取文字。适用于需要恢复纸质文档或扫描 PDF 中文字的人。
适用场景
- ✓当你有一份扫描的 PDF,需要把它的文字变成可搜索的文档时。
- ✓当你有一张文档照片,想把其中的文字复制出来时。
- ✓当排版复杂、含有表格或数学公式的文档需要转换为结构化文字时。
技能链接
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/ocr-and-documents/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“这份合同的扫描 PDF 无法选中文字。你能帮我提取文字吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会先尝试普通提取,然后在使用较重的版面工具之前,先使用较轻量的本地 OCR 工具。除非你允许上传,否则它会把文件保留在你的电脑上。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
OCR and scanned documents
Use this Skill when ordinary document extraction fails because the source is scanned, image-based, or layout-heavy.
Start here
Call skill_view for this Skill and use its returned baseDirectory. Helpers live in <baseDirectory>/scripts.
Prefer local processing. Do not upload a private document to an external OCR service unless the user explicitly authorizes that transfer.
Choose the lightest path
- Normal extraction first. For PDFs, try the bundled pdf Skill. For .docx, use docx. Do not OCR born-digital text.
- A few scanned pages. Render pages with the pdf Skill and inspect images using view_image; transcribe only the requested pages.
- Text-oriented scanned PDF. Try extract_pymupdf.py; this is the lighter local path.
- Complex layout, tables, math, or many scanned pages. Use extract_marker.py only after confirming the need and checking resources.
Helpers
python3 <baseDirectory>/scripts/extract_pymupdf.py input.pdf -o extracted.md
python3 <baseDirectory>/scripts/extract_marker.py --check
python3 <baseDirectory>/scripts/extract_marker.py input.pdf -o extracted.md
Run helpers with terminal_exec, using python3 as the command and arguments as an array. Use --help for exact options.
extract_pymupdf.py requires PyMuPDF:
python3 -m pip install pymupdf
Its --markdown mode additionally requires pymupdf4llm.
extract_marker.py uses marker-pdf, which can require several gigabytes of packages and model downloads. Never install it automatically. Check available disk space and ask the user before installing or downloading large models.
URLs
If the source is a URL, first use an available browser or HTTP tool to identify whether it points to HTML or a document. Download only the requested document, respect authentication and access boundaries, and then process the local copy. Do not assume a specific web tool exists.
Verification
- Preserve reading order, page references, headings, tables, footnotes, and confidence caveats.
- Compare extracted text against representative rendered pages with view_image.
- Mark uncertain characters and fields instead of guessing.
- For tables, verify column alignment and numeric values separately.
- Return both the extracted artifact path and the original source/page mapping when possible.
常见问题
我的文档会被发送到在线服务吗?
不会。该技能优先在本地处理,除非你明确允许,否则不会上传私人文档。
什么时候不应该使用 OCR?
对于基于文字的 PDF 或 Word 文件,普通提取已经能工作,因此不需要 OCR。
什么时候会使用较重的工具?
只有在智能体确认需要它,并检查电脑有足够资源之后,才会使用。
详情
作者的原始描述
Extract and structure text from scanned PDFs and document images with a local-first OCR workflow, layout-aware fallbacks, and explicit heavyweight dependency controls.
repo: EKKOLearnAI/ekko-studio
热度
- GitHub 星标
- 12k
- 排名
- #11572
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
1password
12k帮你的智能体使用 1Password CLI 为命令和配置文件获取机密信息,同时不在聊天、日志或已保存的文件中显示这些信息。
apple-notes
12k帮你的智能体在 Mac 上使用 memo 命令行工具创建、搜索、阅读、编辑、移动或删除 Apple 备忘录。
apple-reminders
12k帮你的智能体在 Mac 上使用 remindctl 工具列出、创建、编辑、完成或删除 Apple 提醒事项及提醒列表。
document-to-action-items
12k帮你的智能体把文档、会议记录或一组笔记,整理成一张清晰的任务、负责人、截止日期和决定的表格。