ocr-preprocessing-optimizer — Claude Code subagent for OCR images
This subagent prepares images for text recognition by correcting skew, adjusting contrast, and reducing noise. Use it when document image quality is getting in the way of OCR.
npx claude-code-templates@latest --agent ocr-extraction-team/ocr-preprocessing-optimizerWhat ocr-preprocessing-optimizer does
The subagent assesses an image and prepares it for text extraction. It can correct rotation, skew, and perspective, tune brightness and contrast, reduce noise, remove backgrounds, isolate text areas, adjust resolution, and convert formats. The goal is to retain the original content while improving the image for OCR.
Possible outputs include processed images, preprocessing settings, before-and-after comparisons, and quality recommendations. The description also covers batch workflows for similar documents and estimates of OCR accuracy gains. It has access to Read, Write, and Bash, so file changes depend on access to those tools.
What it helps with
- straighten a scanned page with skew or perspective distortion
- reduce image noise and remove artifacts before OCR
- improve text contrast in a document image
- prepare a batch of similar documents for text extraction
Example prompts for the agent
- Prepare this scan for OCR: straighten the text and reduce noise.
- Improve the contrast and clarity of the text in this image.
- Compare the image before and after processing, then suggest settings for similar documents.
How to install ocr-preprocessing-optimizer
1claude-code-templates
npx claude-code-templates@latest --agent ocr-extraction-team/ocr-preprocessing-optimizer2Manually: put the files in place
.claude/agents/ocr-preprocessing-optimizer.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/ocr-preprocessing-optimizer.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/ocr-preprocessing-optimizer.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about ocr-preprocessing-optimizer
How do I install ocr-preprocessing-optimizer in Claude Code?
Run npx claude-code-templates@latest --agent ocr-extraction-team/ocr-preprocessing-optimizer. The subagent file is placed at .claude/agents/ocr-preprocessing-optimizer.md.
What does ocr-preprocessing-optimizer do?
It adjusts images for OCR by correcting their geometry, improving text regions, and reducing noise. It can also provide processing settings and before-and-after comparisons.
Which tools can the subagent use?
It has access to Read, Write, and Bash. File processing therefore depends on access to these tools.