Community程式設計與開發github.com

claude-office-skills/smart-ocr

智慧文字識別,從圖片和文件中提取文字與資料,支援多平台使用。

smart-ocr 是什麼?

Smart OCR 是一個專為 AI 代理(如 Claude Code、Cursor、Codex)設計的技能,能夠從圖片、掃描文件或 PDF 中自動提取文字與結構化資料。它支援多種 OCR 引擎(如 Tesseract 或雲端 API),使用者只需提供文件路徑,技能就會處理圖像預處理、文字辨識,並輸出結構化結果(如 JSON 或表格)。此技能特別適合需要大量文件數位化的開發者或辦公室流程自動化。它易於整合,可跨平台運作,大幅減少手動資料輸入的錯誤與時間成本。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/claude-office-skills/skills/tree/main/skills/smart-ocr

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

smart-ocr 是做什麼的?

智慧文字識別技能,從圖片和文件中提取文字與資料。

功能概述

此技能讓 AI 代理(例如 Claude Code、Cursor、Codex)能夠從圖片檔案、掃描文件或 PDF 中辨識並提取文字。它會處理常見的圖像格式(如 PNG、JPG、TIFF),可以透過本地 OCR 引擎(例如 Tesseract)或雲端 OCR API(如 Google Cloud Vision、AWS Textract)來執行。輸出結果支援結構化格式(例如 JSON、CSV),方便後續處理或整合至其他系統。

使用方式

要使用此技能,以支援的格式提供文件路徑即可。AI 代理會自動偵測檔案類型,套用適當的 OCR 流程,並回傳提取的文字與資料。

範例

# 使用 CLI 指令掃描圖片中的文字
ocr-skill extract --file ./document.png

輸出格式

成功執行後,技能會回傳類似以下的 JSON 結構:

{
  "text": "辨識出的完整文字區塊...",
  "data": [
    {
      "type": "line",
      "text": "第一行文字",
      "bbox": {"x": 10, "y": 20, "width": 100, "height": 15}
    }
  ],
  "confidence": 0.95
}

平台支援

此技能設計為跨平台可用,支援在 macOS、Linux、Windows 上整合以下 AI 代理:

  • Claude Code (Anthropic)
  • Cursor (AI 程式碼編輯器)
  • Codex (OpenAI)
  • 其他基於命令列的 AI 代理

環境變數

  • OCR_ENGINE:指定要使用的 OCR 引擎(預設為 tesseract)
  • OCR_API_KEY:若使用雲端 OCR API 時,需要設定相關金鑰
  • OCR_LANGUAGE:指定辨識語言(例如 eng、chi_sim、jpn)

安裝與設定

  1. 確保已安裝 Tesseract OCR(若使用本地引擎):
    # macOS
    brew install tesseract
    # Ubuntu/Debian
    sudo apt-get install tesseract-ocr
    # Windows
    choco install tesseract
    
  2. 設定必要的環境變數(參考上方"環境變數"一節)。
  3. 將技能檔案放入 AI 代理的技能目錄中。

常見問題 (FAQ)

  • Q: 支援哪些圖片格式? A: 支援 PNG、JPG、TIFF、BMP,以及部分 PDF 檔案。
  • Q: 辨識準確度如何? A: 準確度取決於圖片品質與文字清晰度;建議預先裁剪或增強圖片以獲得最佳結果。
  • Q: 可以離線使用嗎? A: 若使用本地 Tesseract 引擎則可離線使用;若使用雲端 API 則需要網路連線。

授權條款

此技能遵循 MIT 授權條款,詳情請參閱 LICENSE 檔案。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

claude-office-skills/academic-search

Search and analyze academic literature. Find papers, understand research methodologies, and synthesize academic findings for research projects.

claude-office-skills/ads-copywriter

Multi-platform ad copy generation for Google Ads, Meta/Facebook, TikTok, LinkedIn with A/B testing variants

claude-office-skills/ai-agent-builder

Build AI agents with tools, memory, and multi-step reasoning - ChatGPT, Claude, Gemini integration patterns

claude-office-skills/airtable-automation

Airtable database automation - views, automations, integrations, and workflow triggers

claude-office-skills/ai-slides

Generate complete presentations with AI - from outline to polished slides

claude-office-skills/amazon-seller

Automate Amazon seller operations including inventory, orders, pricing, and advertising management

claude-office-skills/apple-shortcuts-integration

Create and trigger Apple Shortcuts for iOS/macOS automation and cross-platform workflows

claude-office-skills/applicant-screening

Screen job applications against requirements and score candidates

claude-office-skills/asana-automation

Automate Asana project management workflows, task tracking, team collaboration, and reporting

claude-office-skills/batch-convert

Batch convert documents between multiple formats using a unified pipeline

claude-office-skills/batch-processor

Process multiple documents in bulk with parallel execution

claude-office-skills/brand-guidelines-generator

Create and maintain brand style guides for consistent visual identity

claude-office-skills/browser-automation

Automate web browser interactions, scraping, testing, and workflow automation with Puppeteer/Playwright

claude-office-skills/calendar-automation

Google Calendar and Outlook automation - scheduling optimization, meeting workflows, time blocking, and Slack/Sheets integration

claude-office-skills/changelog-generator

Generate release notes from git commits, updates, or feature lists

claude-office-skills/chart-designer

Design effective data visualizations and charts. Generate chart configurations for ECharts, Chart.js, and other libraries. Create dashboards and reports.

claude-office-skills/chat-with-pdf

Answer questions about PDF content, summarize, and extract information

claude-office-skills/clickup-automation

Automate ClickUp workspace management, task workflows, time tracking, and team productivity

claude-office-skills/company-research

Conduct comprehensive company research and due diligence. Analyze business model, competitive landscape, management, and market position.

claude-office-skills/competitive-analysis

Analyze competitors systematically. Compare products, features, pricing, positioning, and market strategies. Generate comprehensive competitive intelligence reports.

相關技能