Example Validation
aspose-pdf/Aspose.PDF-for-Java
Validate Aspose.PDF Java example changes by compiling, running example runners, and checking expected output files.
Optimizes mica-ppocr Java parsers via batch run, failure diagnosis, and LabelMatcher/regex fixes.
$ npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install lets-mica/mica-ppocr ocr-parser-optimizer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/lets-mica/mica-ppocr.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ocr-parser-optimizer .claude/skills/ocr-parser-optimizer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ocr-parser-optimizer" agent skill from https://github.com/lets-mica/mica-ppocr/tree/master/.agents/skills/ocr-parser-optimizer into .claude/skills/ocr-parser-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ocr-parser-optimizer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/lets-mica/mica-ppocr/tree/master/.agents/skills/ocr-parser-optimizerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install lets-mica/mica-ppocr ocr-parser-optimizer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lets-mica/mica-ppocr.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/ocr-parser-optimizer .agents/skills/ocr-parser-optimizer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ocr-parser-optimizer" agent skill from https://github.com/lets-mica/mica-ppocr/tree/master/.agents/skills/ocr-parser-optimizer into .agents/skills/ocr-parser-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ocr-parser-optimizer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install lets-mica/mica-ppocr ocr-parser-optimizer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lets-mica/mica-ppocr.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/ocr-parser-optimizer .cursor/skills/ocr-parser-optimizer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ocr-parser-optimizer" agent skill from https://github.com/lets-mica/mica-ppocr/tree/master/.agents/skills/ocr-parser-optimizer into .cursor/skills/ocr-parser-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ocr-parser-optimizer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/lets-mica/mica-ppocr.git --path .agents/skills/ocr-parser-optimizer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install lets-mica/mica-ppocr ocr-parser-optimizer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lets-mica/mica-ppocr.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/ocr-parser-optimizer .gemini/skills/ocr-parser-optimizer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ocr-parser-optimizer" agent skill from https://github.com/lets-mica/mica-ppocr/tree/master/.agents/skills/ocr-parser-optimizer into .gemini/skills/ocr-parser-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ocr-parser-optimizer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install lets-mica/mica-ppocr ocr-parser-optimizerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/lets-mica/mica-ppocr.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/ocr-parser-optimizer .github/skills/ocr-parser-optimizer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ocr-parser-optimizer" agent skill from https://github.com/lets-mica/mica-ppocr/tree/master/.agents/skills/ocr-parser-optimizer into .github/skills/ocr-parser-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ocr-parser-optimizer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install lets-mica/mica-ppocr ocr-parser-optimizer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lets-mica/mica-ppocr.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/ocr-parser-optimizer .opencode/skills/ocr-parser-optimizer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ocr-parser-optimizer" agent skill from https://github.com/lets-mica/mica-ppocr/tree/master/.agents/skills/ocr-parser-optimizer into .opencode/skills/ocr-parser-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ocr-parser-optimizer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ocr-parser-optimizerOptimizes mica-ppocr Java parsers via batch run, failure diagnosis, and LabelMatcher/regex fixes.
OCR Parser Optimizer is an agent skill from lets-mica/mica-ppocr. Optimizes mica-ppocr Java parsers via batch run, failure diagnosis, and LabelMatcher/regex fixes. Invoke when user provides image/PDF batches to improve a parser's accuracy or fix OCR-corrupted labels.
Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Documents & Office, covering PDF. It works with Java. The repository describes itself as: PP-OCRv6 纯 Java 图片 OCR(ONNX Runtime,零 PaddlePaddle 依赖,bit-exact 对位 Python,Spring Boot Starter,结构化识别行驶证/身份证/银行卡/驾驶证/营业执照等). The licence is Apache-2.0.
8 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 17f7bd0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are java).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
OCR Parser Optimizer loads about 3.2k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 1,250 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from lets-mica/mica-ppocr at commit 17f7bd0, republished under its Apache-2.0 licence (© lets-mica). 1,250 words, ~3,193 tokens.
.claude/skills/ocr-parser-optimizer/SKILL.md (or your agent's skills folder).Iterative, batch-driven optimization loop for the 10 built-in mica-ppocr-structured parsers. The
skill is not a metric calculator (use ocr-accuracy-checker for that) and not a parser
authoring kit (use mica-ppocr-custom-parser for new types). It sits between the two: given a
real batch of samples, it diagnoses why a field-level check fails, proposes a minimal,
localized fix, and re-verifies until the target is met.
Do not invoke for: one-off single-image debugging (use BaseTest directly), pure metric
calculation on labeled data (ocr-accuracy-checker), or building a brand-new parser from scratch
(mica-ppocr-custom-parser).
| Slot | Required | Default |
|---|---|---|
| parser key | yes | one of idcard vehicle driver bankcard business invoice train taxi household pdd |
| input kind | yes | image-dir (png/jpg/jpeg/bmp/webp) or pdf-dir (recursively walked) |
| input path | yes | absolute path to the directory |
| ground truth | no | path to a *.json / *.jsonl map {filename: {field: value}}; if absent, run in diagnosis-only mode (visual diff only) |
| model tier | no | tiny (default) / small / medium |
| target field | no | if set, optimize only this field; otherwise optimize all fields |
Always confirm these slots in one round with AskUserQuestion before doing any work.
1. prepare -- collect input, ground truth, model tier
2. baseline -- run BatchOcrMain-style batch, compute per-field pass-rate
3. diagnose -- classify each failure into a Failure Pattern (see taxonomy)
4. propose -- emit minimal fix proposal (LabelMatcher / regex / heuristic)
5. apply -- edit the parser file in-place; preserve Java 8 + Lombok @Value constraints
6. re-verify -- re-run baseline; compare; record metrics
7. iterate -- loop 3-6 until target hit or no fix improves metrics
8. report -- write optimization-reports/<parser>-<timestamp>.mdCollUtil.listOf("png","jpg","jpeg","bmp","webp")*.pdf; remind the user that PDF is a dual channel
(text layer + OCR fallback) and tuning the parser only affects the OCR fallback path.test_images/<parser>/ if not already present so
BaseTest<Parser, Result> single-image debug is available.Map<String, Map<String,String>>.BatchOcrMain
entry. Either invoke it as a subprocess (Maven exec:java) or, in agent mode, replicate its
core loop using PPOcrV6Engine.run(Path) / run(byte[]) and a
ParserSpec
instance.PPOcrV6Engine.run(Path) directly (it auto-sniffs %PDF- and flattens all
pages). One file may produce N per-page results; the diagnosis needs to be page-aware.optimization-reports/<parser>-<timestamp>/raw/<file>.txt so each
iteration diffs cleanly.ocr-accuracy-checker conventions (string equality + whitespace-trimmed compare).Always classify every failure into exactly one of these buckets before proposing a fix. The mapping is the heart of this skill.
| # | Pattern | Symptom | Typical cause |
|---|---|---|---|
| F1 | label-not-found | matchValue returns null for a field that exists | OCR corrupted the label; need findLabelBox fallback or label variants |
| F2 | label-value-row-split | value is on a different row / far below | wrong y-overlap threshold; multi-line label handling |
| F3 | value-truncated | regex matched only a prefix, e.g. 1\*\*\*0 | regex too strict; missing optional chars / spacing |
| F4 | wrong-candidate-picked | value is from a similar label nearby (e.g. 登记 vs 抵押) | missing disambiguation; need nearest-right + y-overlap combo |
| F5 | value-merged-in-label | label and value are in a single OCR box | use matchValueFromPrefix instead of matchValue |
| F6 | value-absent-in-ocr | the field is genuinely missing from OCR output | detection failure; try small/medium tier, or add a region pre-crop |
| F7 | garbled-value | value present but unreadable (¥ -> 羊, 1 -> l) | model tier too low; switch to small / medium |
| F8 | side-mis-routed | e.g. idcard 正面字段跑到反面 | IdCardSide logic bug; usually cross-line bleed |
| F9 | field-box-wrong | field extracted correctly but getFieldBoxes() points to a nearby box | re-use of LabeledMatch.box after position math |
When in doubt, render the failure sample with BaseTest.saveVis (green boxes for OCR regions;
overlay the field's matched box) and look at the picture. Most F1/F4/F5 cases are obvious
once visualized.
Always emit a minimal, localized fix proposal. Match the pattern to one of these templates:
F1 → add the OCR-mangled form to the label variant list:
// was: matchValue(results, "号牌号码")
// after:
findLabelBox(results, "号牌号码", "号牌编码", "号牌号吗") // if such helper existsor relax the matcher. If the parser uses a literal string, list all observed OCR variants seen in the raw output of step 2 and feed them as alternates.
F2 → widen the right-overlap tolerance:
matchValue(results, label, LabelMatcher.DEFAULT_RIGHT_OVERLAP_TOLERANCE) // 5 -> 8or add a manual y-bias when the label and value rows are visually adjacent.
F3 → loosen the regex: [\\d\\s-]{6,} instead of \\d{6,8}; add optional spaces /
dashes that OCR inserts; allow · for * masking.
F4 → prefer the value box with the largest y-overlap to the label box, not the leftmost. If two labels are visually adjacent, anchor on the label's y-center and pick the value box whose y-center is closest within ±N px.
F5 → swap matchValue → matchValueFromPrefix.
F6 → not a parser bug; recommend tier bump or region pre-crop. Do not change the parser for this.
F7 → recommend tier bump. Do not change the parser for this.
F8 → re-think IdCardSide / InvoiceVersion heuristics. Common fix: tighten
top-region keyword list (e.g. add 中华人民共和国 for the 户口本 cover side).
F9 → preserve the matched box from matchValueWithBox / matchSubstringWithBox instead
of re-deriving it from text. Use the box the matcher actually returned.
Output the proposal as a unified diff against the parser file. Never rewrite the whole parser; only the failing field's match site.
record, no List.of, no instanceof pattern, no String.strip).
Use CollUtil.listOf / CollUtil.repeat / CollUtil.stripTrailing etc.@Value + @Accessors(fluent = true) for value objects; @UtilityClass for
static helpers; @Slf4j for logging.BaseStructuredParser SPI intact: parseResults(List<PPOcrV6Result>) -> R.CollUtil.listOf(...)
if single-use. Do not introduce new helper classes unless two fields share the same fix.diff -ru shows exactly which samples flipped.Stop when any of:
Do not loop blindly; if 3 consecutive iterations have no metric gain, switch diagnosis to visualization review and ask the user for a hint.
Write a single Markdown report to
optimization-reports/<parser>-<timestamp>.md with this structure:
# Parser Optimization Report — <parser> @ <tier>
## Summary
- Baseline: P=…, R=…, F1=…
- Final: P=…, R=…, F1=…
- Iterations: N, Net Δ: …
## Per-field metrics
| field | baseline F1 | final F1 | Δ | dominant pattern |
| ------ | ----------- | -------- | ------ | ---------------- |
| … | … | … | … | F1 / F3 / F6 … |
## Applied fixes (chronological)
### Iteration 1 — F3 on `plateNo`
- Diff: `parser/vehicle/VehicleLicenseParser.java` L412-L418
- Rationale: …
- Impact: F1 0.81 → 0.93 on 12 samples
## Regressions
- (none / list)
## Remaining failures
| sample | field | pattern | next step |
| ------ | ----- | ------- | --------- |
| … | … | … | tier bump |Delete the per-iteration raw directories on completion (keep only the final baseline + final raw snapshot inside the report folder).
BaseStructuredParser — SPI entry, do not breakLabelMatcher — matchValue* / matchSubstring* / matchPattern / geometry helpersBaseTest — single-image debug + visBatchOcrMain — batch run baselineParserSpec — parser registry (key → class)ocr-accuracy-checkermica-ppocr-custom-parserBatchOcrMain directlymica-ppocr-structured.List<PPOcrV6Result>.record, no List.of. Use CollUtil
shims and Lombok @Value style.Co-Authored-By: trailer to any commit the skill may produce (project
memory rule).© lets-mica, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/ocr-parser-optimizer of lets-mica/mica-ppocr.
Open the folder on GitHubat commit 17f7bd0
OCR Parser Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| OCR Parser Optimizer this skilllets-mica/mica-ppocr | 110 | — | ~3.2k | Automated safety check: Pass | Apache-2.0 | |
| Example Validationaspose-pdf/Aspose.PDF-for-Java | 144 | — | ~628 | Automated safety check: Pass | MIT | |
| Canvas Ics33X-isdoingreat/canvas-pilot | 125 | — | ~8.8k | Automated safety check: Notes | AGPL-3.0 | |
| MarkitdownImCa0/just-laws | 781 | 14 repos | ~3.2k | Automated safety check: Notes | MIT | |
| Gzh Designisjiamu/gzh-design-skill | 3.9k | 1 repos | ~2.2k | Automated safety check: Pass | AGPL-3.0 | |
| GenOffice Document CLIgenspark-ai/genoffice | 8.9k | — | ~19k | Automated safety check: Pass | Apache-2.0 |
aspose-pdf/Aspose.PDF-for-Java
Validate Aspose.PDF Java example changes by compiling, running example runners, and checking expected output files.
X-isdoingreat/canvas-pilot
Generic code-course handler — programming assignments where the spec lives outside Canvas (instructor's external site, attached PDF, or referenced textbook), starter code is downloaded as a…
ImCa0/just-laws
Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.
isjiamu/gzh-design-skill
微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…
genspark-ai/genoffice
Creates, converts, reads and edits real pptx, xlsx, docx and PDF files locally through the genoffice command line.
wquguru/harness-books
Best practices for working on the Harness books repo. An agent skill from wquguru/harness-books.
lets-mica/mica-ppocr
在 mica-ppocr 项目中新增自定义结构化解析器(证件 / 票据 / 卡证 OCR → 业务字段)时加载本 skill。
Works with
Categories
Optimizes mica-ppocr Java parsers via batch run, failure diagnosis, and LabelMatcher/regex fixes. OCR Parser Optimizer is an agent skill from lets-mica/mica-ppocr. Optimizes mica-ppocr Java parsers via batch run, failure diagnosis, and LabelMatcher/regex fixes.
OCR Parser Optimizer fits situations like: provides image/PDF batches to improve a parsers accuracy; fix OCR-corrupted labels.
Run `npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a claude-code`. Or copy the skill folder (.agents/skills/ocr-parser-optimizer in lets-mica/mica-ppocr) into .claude/skills/ocr-parser-optimizer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a codex`. Or copy the skill folder (.agents/skills/ocr-parser-optimizer in lets-mica/mica-ppocr) into .agents/skills/ocr-parser-optimizer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lets-mica/mica-ppocr --skill ocr-parser-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ocr-parser-optimizer, .gemini/skills/ocr-parser-optimizer, .github/skills/ocr-parser-optimizer and .opencode/skills/ocr-parser-optimizer in your project.
SKILL.md names no scripts, command-line tools or credentials: OCR Parser Optimizer is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
OCR Parser Optimizer is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with OCR Parser Optimizer: Example Validation (aspose-pdf/Aspose.PDF-for-Java, 144 stars), Canvas Ics33 (X-isdoingreat/canvas-pilot, 125 stars), Markitdown (ImCa0/just-laws, 781 stars) and Gzh Design (isjiamu/gzh-design-skill, 3.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
lets-mica (a GitHub organization) maintains it in lets-mica/mica-ppocr, which has 110 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 1, 2026.
Source: lets-mica/mica-ppocr on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.