obra

Comic OCR — Development skill for Claude Code

Development community

OCR comic strips on macOS using Apple Vision, then clean up transcripts with Claude.

How to install Comic OCR

This entry records only its repository, not the path inside it, so there is no exact command to give. Open obra/comic-ocr and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Comic OCR does

OCR comic strips on macOS using Apple Vision, then clean up transcripts with Claude.

Alternatives in Development

  • Product Vision — Brainstorm inspiring, achievable product vision statements 7.8k ★
  • Setup Video Vision — Interactive setup wizard for claude-video-vision — configure backend, whisper, frames, and verify dependencies 1.3k ★
  • Device Control Agent — You are an autonomous macOS agent with full control of this device via two CLI tools: - steer — GUI automation 250 ★

README

comic-ocr

OCR comic strips on macOS using Apple's Vision framework, then clean up the transcripts with Claude.

Two scripts, meant to be run in sequence:

  1. **`ocr.swift`** — Extracts text from a directory of comic strip images using Apple Vision's highest-accuracy recognition mode. Outputs a JSON file with one entry per image.

  2. **`clean.py`** — Sends the raw OCR through Claude (via `claude -p`) to fix the usual OCR mess: garbled characters, ALL-CAPS normalization, metadata stripping, dialogue structure cleanup. Processes in parallel batches and writes results incrementally.

Requirements

  • macOS (uses Apple's Vision framework — no cloud OCR, everything runs locally)
  • Swift (comes with Xcode or Xcode Command Line Tools)
  • Python 3
  • Claude Code CLI (claude on your PATH)

Usage

Step 1: OCR

# Compile (one-time)
swiftc ocr.swift -o ocr -framework Vision -framework AppKit

# Run
./ocr /path/to/strips transcripts.json

Progress is logged to `ocr_progress.log` in the output directory. You can `tail -f` it.

The output JSON looks like:

[
  {
    "filename": "0.gif",
    "text": "SOMETHING POSITIVE R*K NICHOLLAND\nKNIFE GOES\nIN...\nOKAY, DAVAN, WE\nOUT FOR METE..."
  },
  {
    "filename": "1.gif",
    "text": "..."
  }
]

Raw OCR is noisy — comic strips typically come through as ALL-CAPS with the title, copyright, and URL baked into every image. The text may have broken words and garbled characters.

Step 2: Clean up with Claude

python3 clean.py transcripts.json transcripts_clean.json

Or just `python3 clean.py` if your files are named `transcripts.json` (output defaults to `transcripts_clean.json`).

This sends batches of 50 strips at a time to Claude Haiku, 4 batches in parallel. Progress is logged to `transcripts_clean.log`. Results are written to the output file incrementally as each batch completes.

The cleanup fixes:

  • Strips comic title headers, author bylines