glmocr

glmocr is a skill for Claude Code, Codex from djblack1209-coder/OpenClaw-Bot. It costs 87 tokens per session (1,510 once invoked), scanned A, original, Apache-2.0.

An optical character recognition tool that extracts printed text, tables, mathematical formulas, and handwriting from images or PDFs.

In plain words
What is it for?
Use it to extract ordinary text as Markdown, convert tables to Markdown tables, return formulas as LaTeX, recognize handwriting, and process local files or web URLs.
Why use it?
It turns visual documents into usable text and structured data instead of requiring manual transcription.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/djblack1209-coder/openclaw-bot/glmocr
Any agent
npx skills add djblack1209-coder/OpenClaw-Bot --skill glmocr
Clone the repo
git clone --depth 1 https://github.com/djblack1209-coder/OpenClaw-Bot

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for glmocr

README.md
[![agentmods](https://agentmods.dev/badge/skills/djblack1209-coder/openclaw-bot/glmocr.svg)](https://agentmods.dev/skills/djblack1209-coder/openclaw-bot/glmocr)
Your own site
<a href="https://agentmods.dev/skills/djblack1209-coder/openclaw-bot/glmocr"><img src="https://agentmods.dev/badge/skills/djblack1209-coder/openclaw-bot/glmocr.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,510 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00087 $0.01510
Opus 5 $0.00044 $0.00755
Sonnet 5 $0.00017 $0.00302
Haiku 4.5 $0.00009 $0.00151

Measured 4d ago against content hash d91bdca0364c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

glmocr 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 4d 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.

apps/openclaw/skills/glmocr/SKILL.md · 171 lines

How it starts

The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GLM-OCR 统一文字识别技能

智谱 GLM-OCR(OmniDocBench V1.5 第一名),支持 4 种识别模式。

识别模式

模式 说明 输出格式
general 通用文字提取(默认) Markdown
table 表格识别 Markdown 表格
formula 数学公式识别 LaTeX
handwriting 手写体识别 Markdown

ClawBot 自动集成(已内置)

直接在 Telegram 发图片或 PDF,ClawBot 自动:

  1. OCR 识别文字
  2. 智能场景路由(交易/电商/通用)
  3. 交易场景:提取指标 → 写入记忆 → 建议触发 /invest
  4. 电商场景:提取价格 → 竞品分析 → 定价建议

群聊中需 @bot 或 caption 含触发词(OCR/识别/分析/竞品/财报)。

CLI 用法(开发/调试)

export ZHIPU_API_KEY="$ZHIPU_API_KEY"

# 通用 OCR
python apps/openclaw/tools/scripts/glm_ocr_cli.py --file image.png --pretty

# 保存结果
python apps/openclaw/tools/scripts/glm_ocr_cli.py --file doc.pdf --output result.json

环境变量

变量 必需 说明
ZHIPU_API_KEY 智谱开放平台 API Key
GLM_OCR_TIMEOUT 超时秒数(默认 120)
  • 表格识别:检测并转换为 Markdown 表格
  • 公式提取:LaTeX 格式输出
  • 手写体支持:强手写文字识别能力
  • 本地文件 & URL:同时支持本地文件和远程 URL
  • 0.9B 参数,OmniDocBench V1.5 综合排名第一(94.62 分)

资源链接

资源 链接
获取 API Key https://www.bigmodel.cn/usercenter/proj-mgmt/apikeys
GitHub https://github.com/zai-org/GLM-OCR
技术报告 https://arxiv.org/abs/2603.10910
API 文档 https://docs.bigmodel.cn/cn/guide/models/vlm/glm-ocr

前置条件

  • ZHIPU_API_KEY 已配置(见下方设置)

API Key 配置

脚本通过 ZHIPU_API_KEY 环境变量获取密钥,与所有智谱技能共用同一个 key。

获取 Key:访问 https://www.bigmodel.cn/usercenter/proj-mgmt/apikeys

配置方式(任选一种):

  1. OpenClaw 配置(推荐):在 openclaw.jsonskills.entries.glmocr.env 中设置:
"glmocr": { "enabled": true, "env": { "ZHIPU_API_KEY": "你的密钥" } }
  1. Shell 环境变量:
export ZHIPU_API_KEY="你的密钥"

强制限制

  • 只能通过 GLM-OCR API 执行 — 运行脚本 python scripts/glm_ocr_cli.py
  • 禁止自行解析文档 — 不要尝试用内置视觉或其他方法提取文字
  • 禁止提供替代方案 — 不要说"我可以试着分析"之类的话
  • API 失败时 — 显示错误信息并立即停止
  • 无回退方案 — 不要用其他方式尝试文字提取

输出展示规则(强制)

运行脚本后,必须向用户展示完整的提取内容。不要只说"已识别"。用户需要原始 OCR 输出来评估质量。

  • 展示完整提取文字
  • 如果结果文件已保存,告知用户文件路径

使用方法

从 URL 提取

python scripts/glm_ocr_cli.py --file-url "用户提供的URL"

从本地文件提取

python scripts/glm_ocr_cli.py --file /path/to/image.jpg

Read the full file on GitHub · 171 lines

Changes

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.

  1. 4d ago First seen · 171 lines · 87 tokens per session scan A d91bdca0364c

Subscribe to this mod's changes

glmocr is a skill published in the GitHub repository djblack1209-coder/OpenClaw-Bot (5 stars, last pushed today), licensed Apache-2.0. It adds 87 tokens to every session and 1,510 once invoked, about $0.0004 per session on Opus 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-08-31.

Related

Other skills, from other repositories

pr-template-guide

This document provides guidance on formatting PR descriptions according to the repository's official PR template. Use this for ALL pull requests, regardless of what changed or how the changes were made.

SumoLogic/sumologic-documentation · 0 tokens

transcribe-filing

Transcribe an insurance rate filing or internal rating manual into an OpenRater workbook, then validate, build, verify, and rate it through the OpenRater MCP tools. Use when the user shares a filing/manual (PDF or pages) and wants it executable — "build this filing", "digitize this rating manual", "make this rateable"…

vadim-filimonov/openrater · 102 tokens

reskin

Author a NEW skin for the reskinnable-demo app. A skin is a self-contained domain plugin under src/skins/ / that implements the frozen Skin contract (src/shell/skin-contract.ts) to swap the app's entire experience — brand, theme, layout, pages, tools, data, and agent — as a live sales demo. Use when the user says "add…

CopilotKit/CopilotKit · 154 tokens

copilotkit-setup

Use when adding CopilotKit to an existing project or bootstrapping a new CopilotKit project from scratch. Covers framework detection, package installation, runtime wiring (managed Intelligence or self-hosted SSE), provider setup, and first working chat integration.

CopilotKit/CopilotKit · 56 tokens

setup-slack-channel

Use for the PROVIDER half of getting a locally running CopilotKit Channels agent to answer in Slack, when no Slack app exists yet — setting up a Channels bot in Slack for the first time, creating the Slack app and its tokens, attaching it to a managed Intelligence Channel, or when a Channel reports setuprequired, sits…

CopilotKit/CopilotKit · 206 tokens

copilotkit-channels

Use for the CODE half of a managed Intelligence Channel with Slack or Microsoft Teams: customising the Channel a CLI-scaffolded project already ships, or — for a project the CLI did not generate — writing the Channel declaration, the long-running host, and the awaited activation call. Teams provider setup is in scope…

CopilotKit/CopilotKit · 112 tokens