ocr

Processes documents through case.dev OCR for text and table extraction. Supports PDF and image files up to 500MB with page-level and word-level output. Use when the user mentions "OCR", "text extraction", "scan document", "digitize", "extract text from PDF", or needs word-level positional data from documents.

11 stars

Best use case

ocr is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Processes documents through case.dev OCR for text and table extraction. Supports PDF and image files up to 500MB with page-level and word-level output. Use when the user mentions "OCR", "text extraction", "scan document", "digitize", "extract text from PDF", or needs word-level positional data from documents.

Teams using ocr should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ocr/SKILL.md --create-dirs "https://raw.githubusercontent.com/CaseMark/skills/main/skills/casedev/ocr/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ocr/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ocr Compares

Feature / AgentocrStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Processes documents through case.dev OCR for text and table extraction. Supports PDF and image files up to 500MB with page-level and word-level output. Use when the user mentions "OCR", "text extraction", "scan document", "digitize", "extract text from PDF", or needs word-level positional data from documents.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# case.dev OCR

Production-grade document OCR with table extraction and word-level positional data. Processes PDFs and images (PNG, JPG, TIFF, BMP, WEBP) up to 500MB.

Requires the `casedev` CLI. See `setup` skill for installation and auth.

## Process a Document

```bash
casedev ocr process --document-url "https://example.com/contract.pdf" --json
```

Flags: `--document-url` (required), `--document-id` (optional tag), `--engine` (override).

Returns a job ID and initial status.

## Check Job Status

```bash
casedev ocr status JOB_ID --json
```

Statuses: `queued` -> `processing` -> `completed` or `failed`.

## Watch Until Complete

```bash
casedev ocr watch JOB_ID --json
```

Flags: `--interval` (default: 3s), `--timeout` (default: 900s).

## Word-Level Data

```bash
casedev ocr words --vault VAULT_ID --object OBJECT_ID --json
```

Requires the document to be in a vault with completed OCR ingestion.

Flags: `--page` (specific page), `--word-start`, `--word-end` (index range).

Returns per-page word arrays with text, word index, and confidence scores.

## Common Workflows

### OCR a vault document

```bash
# 1. Upload (triggers automatic ingestion + OCR)
casedev vault object upload ./scanned-contract.pdf --vault VAULT_ID --json

# 2. Check ingestion status
casedev vault object list --vault VAULT_ID --json

# 3. Get word-level data
casedev ocr words --vault VAULT_ID --object OBJECT_ID --json
```

### OCR an external document

```bash
casedev ocr process --document-url "https://storage.example.com/doc.pdf" --json
casedev ocr watch JOB_ID --json
```

## Troubleshooting

**"Invalid file type for OCR"**: Only PDFs and images supported. Check content type with `casedev vault object list`.

**Job stuck in "processing"**: Increase timeout with `--timeout 1800`. Large documents (100+ pages) take longer.

**"OCR job failed"**: Document may be corrupted or unsupported. Re-upload and retry.

Related Skills

We are still matching the closest adjacent skills for this page. In the meantime, continue through the full directory.