glmocr

glmocr is a skill for Claude Code, Codex from zai-org/GLM-skills. It costs 70 tokens per session (1,104 once invoked), scanned A, original, Apache-2.0.

An OCR tool for reading text from images and PDF files. OCR means optical character recognition, which converts photographed or scanned text into editable text and structured output.

In plain words
What is it for?
Use it to extract text, recognize tables as Markdown, convert formulas to LaTeX, read handwriting, and process local files or URLs. It requires a ZHIPU_API_KEY.
Why use it?
It removes the need to retype scanned pages, screenshots, handwriting, tables, or mathematical formulas.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to extract text, recognize tables as Markdown, convert formulas to LaTeX, read handwriting, and process local files or URLs. It requires a ZHIPU_API_KEY.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zai-org/glm-skills/glmocr
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.

Any agent
npx skills add zai-org/GLM-skills --skill glmocr
Clone the repo
git clone --depth 1 https://github.com/zai-org/GLM-skills

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/zai-org/glm-skills/glmocr.svg)](https://agentmods.dev/skills/zai-org/glm-skills/glmocr)
Your own site
<a href="https://agentmods.dev/skills/zai-org/glm-skills/glmocr"><img src="https://agentmods.dev/badge/skills/zai-org/glm-skills/glmocr.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,104 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00070 $0.01104
Opus 5 $0.00035 $0.00552
Sonnet 5 $0.00014 $0.00221
Haiku 4.5 $0.00007 $0.00110

Measured 8d ago against content hash da9c5bde74d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/config_setup.py, scripts/glm_ocr_cli.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/glmocr/SKILL.md · 144 lines

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.

GLM-OCR Text Extraction Skill

Extract text from images and PDFs using the GLM-OCR layout parsing API.

When to Use

  • Extract text from images (PNG, JPG, PDF)
  • Convert screenshots to text
  • Process scanned documents
  • OCR photos containing text (including handwritten text)
  • Recognize tables and formulas in documents
  • User mentions "OCR", "文字识别", "文档解析"

Key Features

  • Table recognition: Detects and converts tables to Markdown format
  • Formula extraction: LaTeX format output
  • Handwriting support: Strong recognition for handwritten text
  • Local file & URL: Supports both local files and remote URLs
Resource Link
Get API Key https://www.bigmodel.cn/usercenter/proj-mgmt/apikeys
GitHub https://github.com/zai-org/GLM-OCR

Prerequisites

  • ZHIPU_API_KEY configured (see Setup below)

Security Notes

  • No runtime package installation is performed by the scripts.
  • OCR requests use the fixed official GLM endpoint and do not accept custom API URLs.
  • Only ZHIPU_API_KEY (and optional timeout) is read from environment variables.

⛔ MANDATORY RESTRICTIONS - DO NOT VIOLATE ⛔

  1. ONLY use GLM-OCR API - Execute the script python scripts/glm_ocr_cli.py
  2. NEVER parse documents directly - Do NOT try to extract text yourself
  3. NEVER offer alternatives - Do NOT suggest "I can try to analyze it" or similar
  4. IF API fails - Display the error message and STOP immediately
  5. NO fallback methods - Do NOT attempt text extraction any other way

Setup

  1. Get your API key: https://www.bigmodel.cn/usercenter/proj-mgmt/apikeys
  2. Configure:
    python scripts/config_setup.py setup --api-key YOUR_KEY
    

How to Use

Extract from URL

python scripts/glm_ocr_cli.py --file-url "URL provided by user"

Read the full file on GitHub · 144 lines

Files

What ships with it

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

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. 8d ago First seen · 144 lines · 70 tokens per session scan A da9c5bde74d5

Subscribe to this mod's changes

glmocr is a skill published in the GitHub repository zai-org/GLM-skills (474 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 70 tokens to every session and 1,104 once invoked, about $0.0003 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-30.