A Claude Code skill that accurately transcribes text from long/tall screenshots by splitting them into overlapping segments.
LLMs struggle with very tall images (chat screenshots, long articles, scrolling captures). Text recognition accuracy degrades significantly as image height increases.
This skill:
- Splits the image into small overlapping vertical segments (auto-calculated optimal size)
- Reads each segment individually where OCR accuracy is high
- Merges results intelligently by removing duplicated overlap content
# Clone to your personal skills directory
git clone https://github.com/yytyyf/long-image-ocr-skill.git ~/.claude/skills/long-image-ocrAdd to your .claude/plugins.json:
{
"plugins": [
"https://github.com/yytyyf/long-image-ocr-skill"
]
}Simply paste or reference a long screenshot in your Claude Code conversation. Claude will detect the need and invoke the skill automatically.
/long-image-ocr /path/to/your/long-screenshot.png
With custom output path:
/long-image-ocr /path/to/image.png /path/to/output.md
- Python 3.8+
- Pillow (
pip install Pillow)
The splitting algorithm:
- Auto-calculates optimal segment height based on image dimensions (600-2000px)
- Uses 200px overlap between segments to prevent cutting through text lines
- Wider images get shorter segments to stay within vision model token limits
The merging algorithm:
- Claude reads each segment and transcribes the text
- Adjacent segments share ~200px of overlapping content
- Claude identifies and removes duplicate content from overlap zones
- Result is a clean, continuous transcription
- Chat/messaging screenshots (WeChat, Slack, Discord, etc.)
- Long article screenshots
- Code screenshots
- Document scans
- Any tall/scrolling capture
MIT