PDF/이미지를 Claude vision으로 OCR하여 마크다운 변환. MUST use this skill when user: (1) asks to convert PDF/image to markdown, (2) asks to OCR any file, (3) sends PDF/image file and asks to extract/read/변환/추출, (4) mentions 'OCR', 'PDF 변환', '이미지 변환', '텍스트 추출'. This skill uses Task agent to protect main context - NEVER process files directly in main context.
View on GitHubplugins/utils/skills/ocr/SKILL.md
February 4, 2026
Select agents to install to:
npx add-skill https://github.com/Bae-ChangHyun/cc-plugins-bch/blob/main/plugins/utils/skills/ocr/SKILL.md -a claude-code --skill ocrInstallation paths:
.claude/skills/ocr/# OCR (PDF + Image)
PDF 및 이미지 파일을 Claude의 vision 기능으로 읽어 마크다운으로 변환합니다.
## Supported Formats
| 타입 | 확장자 |
|------|--------|
| PDF | `.pdf` |
| 이미지 | `.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`, `.bmp`, `.tiff` |
## Quick Start
```bash
# 단일 파일 (PDF 또는 이미지)
/ocr /path/to/document.pdf
/ocr /path/to/image.png
# 커스텀 지침과 함께
/ocr /path/to/document.pdf "표만 추출해줘"
/ocr /path/to/screenshot.png "코드만 추출해줘"
# 폴더 내 모든 PDF/이미지 (병렬 처리)
/ocr /path/to/folder/
```
## Core Workflow
### Step 1: 경로 및 파일 타입 확인
```bash
# 파일인지 폴더인지 확인
ls -la <path>
```
**파일 타입 분류:**
- `.pdf` → PDF 모드
- `.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`, `.bmp`, `.tiff` → 이미지 모드
- 폴더 → [Batch Mode](#batch-mode-폴더-처리)로 진행
### Step 2: 저장 방식 선택 (PDF만 해당)
**PDF 파일인 경우에만** 사용자에게 저장 방식을 질문:
```
AskUserQuestion:
question: "PDF 변환 결과를 어떻게 저장할까요?"
header: "저장 방식"
options:
- label: "통합 저장 (Recommended)"
description: "모든 페이지를 하나의 마크다운 파일로 저장"
- label: "페이지별 저장"
description: "각 페이지를 개별 마크다운 파일로 저장 (document_p1.md, document_p2.md, ...)"
```
**저장 방식 변수:**
- `unified`: 통합 저장 → `document.pdf` → `document.md`
- `per_page`: 페이지별 저장 → `document.pdf` → `document_p1.md`, `document_p2.md`, ...
**이미지 파일**: 저장 방식 질문 없이 바로 `image.png` → `image.md`로 변환
---
## Single File Mode - Image
단일 이미지 파일 처리 워크플로우.
**IMPORTANT**: 단일 파일도 Task 에이전트를 사용하여 메인 컨텍스트를 보호합니다.
```
Task(subagent_type="general-purpose"):
프롬프트: |
이미지 파일을 OCR하여 마크다운으로 변환하고 저장해주세요.
파일: [이미지 절대경로]
커스텀 지침: [사용자 지침 있으면 포함]
**수행 작업:**
1. Read 도구로 이미지 읽기
2. 이미지 내용을 마크다운으로 변환
3. Write 도구로 [파일명].md 파일 저장
4. 저장 완료 확인
**에러 핸들링:**
- 413 에러: "⚠️ 파일 크기 초과 (413 에러)"
- 기타 에러: "⚠️ [에러 메시지]"
**반환 형식 (내용 제외, 상태만):**
✅ 성공: [파일명] → [출력파일명].md
또는
⚠️ 실패: [파일명] - [사유]
```
---
## Single File Mode - PDF
단일 PDF 파일 처리 워크플로우.
**IMPORTANT**: 단일 파일도 Task 에이전트를 사용하여 메인 컨텍스트를 보호합니다.
### 통합 저장 모드 (unified)
```
Task(subagent_type="general-purpose"):
프롬프트: |
PDF 파일을 OCR하여 마크다운으로 변환하고 저장해주세요.
파일: