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.
npx skills add darellchua2/opencode-config-template --skill zai-ocr-skillgit clone --depth 1 https://github.com/darellchua2/opencode-config-templateWrote 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/darellchua2/opencode-config-template/zai-ocr-skill)<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/zai-ocr-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/zai-ocr-skill/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/darellchua2/opencode-config-template/zai-ocr-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/zai-ocr-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 6 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Supply Chain · line 46 Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
- high Supply Chain · line 75 Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.Fix: Avoid downloading and executing remote scripts. Use trusted packages from PyPI/npm. If remote fetch is required, verify checksums and use HTTPS.
- medium Data Exfiltration · line 46 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 75 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 44 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
- medium Data Exfiltration · line 72 Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00052 | $0.01498 |
| Opus 5.5 | $0.00021 | $0.00599 |
| Sonnet 5.5 | $0.00010 | $0.00300 |
| Haiku 4.5 | $0.00005 | $0.00150 |
Grade A, and why
zai-ocr-skill scanned grade A with 1 finding 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 2mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
> Harness binding (§Portability contract): the `ZAI_API_KEY` env var is the portable credential row — it alone works on every harness. The `~/.local/share/opencode/auth.json` fallback reads OpenCode's credential store (b How it starts
The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
What I do
I provide the exact recipe for an agent to extract text with layout structure
from an image or PDF via the Z.AI GLM-OCR layout_parsing API. Unlike a
vision-chat description, the dedicated endpoint returns the document's text
organized by detected layout (blocks, reading order, tables).
Why a skill (not vision chat)
POST /layout_parsingis a dedicated document-extraction endpoint — richer and more faithful for dense/structured documents than asking a chat model to describe an image.- Input is an http(s) URL. Base64 is documented in the API schema but every
base64 form is rejected server-side with code
1214(verified 2026-08-30: png/jpeg/pdf × raw/data-URI/padded/unpadded) — local files use the vision fallback in Path B.
Prerequisite — API key resolution
Harness binding (§Portability contract): the
ZAI_API_KEYenv var is the portable credential row — it alone works on every harness. The~/.local/share/opencode/auth.jsonfallback reads OpenCode's credential store (bonus row; ignore elsewhere — export the env var). Other/none (no auth.json store): exportZAI_API_KEY— the env var alone is sufficient. Recipe execution needs bash + curl + jq (any harness with a shell tool).
KEY="${ZAI_API_KEY:-$(jq -r '.["zai"].key // .["zai-coding-plan"].key // empty' \
~/.local/share/opencode/auth.json 2>/dev/null)}"
[ -z "$KEY" ] && { echo "ZAI_API_KEY not found — set it (export ZAI_API_KEY) or run \`opencode auth login\` (Z.AI)."; exit 1; }
If neither source has the key, stop and report — do not proceed.
Recipe
Path A — file already has a public URL (full layout result)
FILE_URL="https://example.com/document.png" # REQUIRED — public http(s) URL, png/jpg/pdf
BASE="${ZAI_MEDIA_ENDPOINT:-https://api.z.ai/api/paas/v4}" # pay-as-you-go ONLY
RESP=$(curl -sS --max-time 180 -X POST "$BASE/layout_parsing" \
-H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d "{\"model\":\"glm-ocr\",\"file\":\"$FILE_URL\"}")
printf '%s' "$RESP" | python3 -c '
import sys, json
d = json.load(sys.stdin)
if d.get("error"):
sys.stderr.write("API error: " + json.dumps(d["error"]) + "\n"); sys.exit(1)
print(d.get("md_results") or "(empty md_results)")
for page in d.get("layout_details", []):
for el in page:
print("[" + str(el.get("label", "")) + "] " + str(el.get("content", "")))'
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.
- 2mo ago Changed · +2 lines a28c19bd3516
- 3mo ago First seen · 117 lines · 52 tokens per session scan A 193810735cb6
zai-ocr-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 52 tokens to every session and 1,498 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
zai-ocr-skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| zai-ocr-skilldarellchua2/opencode-config-template | Skill | 6 | 2mo ago | Apache-2.0 | A | 52 | Claude Code, Codex |
| apify-youtube-transcript-scrapersickn33/agentic-awesome-skills | Skill | 51k | today | MIT | A | 48 | Claude Code |
| report-to-pdfasgeirtj/system_prompts_leaks | Skill | 74k | yesterday | CC0-1.0 | A | 17 | Claude Code, Codex |
| skill-doc-deliverynyldn/claude-octopus | Skill | 4.5k | today | MIT | A | 29 | Claude Code |
| pdf-extract-create-workflowHKUDS/OpenSpace | Skill | 8.1k | 23d ago | MIT | A | 22 | Claude Code, Codex |
| document-direct-pythonHKUDS/OpenSpace | Skill | 8.1k | 23d ago | MIT | A | 20 | Claude Code, Codex |
| pdf-verification-cliHKUDS/OpenSpace | Skill | 8.1k | 23d ago | MIT | A | 19 | Claude Code, Codex |