Communitygithub.com

簽證文件翻譯

將簽證申請文件(圖片)翻譯成英文,並生成包含原文與翻譯的雙語 PDF。

簽證文件翻譯 是什麼?

此技能專為處理簽證申請文件而設計,能自動將各類文件圖片(如存款證明、在職證明等)轉換為雙語 PDF。它支援 macOS 與跨平台環境,依序嘗試 macOS Vision 框架、EasyOCR 及 Tesseract OCR 進行文字辨識,並根據 EXIF 資料自動旋轉修正圖片方向。翻譯時保留專業術語、人名拼音及數據準確性,最後使用 PIL 與 reportlab 生成 PDF,第一頁顯示原圖、第二頁呈現專業英文翻譯,並附加認證聲明,適合申請澳洲、美國、加拿大、英國等國的簽證。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/ECC/tree/main/skills/visa-doc-translate

在你喜歡的 AI 中提問

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

說明文件

您正在協助翻譯簽證申請文件。

操作說明

當使用者提供圖片檔案路徑時,請自動執行以下步驟,無需等待確認:

  1. 圖片轉換:若檔案為 HEIC 格式,使用 sips -s format png <input> --out <output> 轉換為 PNG。

  2. 圖片旋轉:

    • 檢查 EXIF 方向資料
    • 根據 EXIF 資料自動旋轉圖片
    • 若 EXIF 方向為 6,逆時針旋轉 90 度
    • 若文件仍上下顛倒,測試旋轉 180 度
  3. OCR 文字擷取:

    • 自動依序嘗試多種 OCR 方法:
      • macOS Vision 框架(macOS 優先)
      • EasyOCR(跨平台,無需 Tesseract)
      • Tesseract OCR(若可用)
    • 從文件中擷取所有文字資訊
    • 辨識文件類型(存款證明、在職證明、退休證明等)
  4. 翻譯:

    • 將所有文字內容專業地翻譯成英文
    • 保留原始文件結構與格式
    • 使用簽證申請適用的專業術語
    • 專有名詞保留原文並附英文括號,例如(Wu Zhengye)
    • 中文姓名使用拼音格式(如 WU Zhengye)
    • 確保所有數字、日期及金額準確無誤
  5. PDF 生成:

    • 使用 PIL 與 reportlab 建立 Python 指令碼
    • 第 1 頁:顯示旋轉後的原始圖片,居中縮放至 A4 頁面
    • 第 2 頁:顯示英文翻譯,格式如下:
      • 標題居中且粗體
      • 內容靠左對齊,適當留白
      • 專業排版,適合官方文件
    • 頁尾備註:「This is a certified English translation of the original document」
    • 執行指令碼產生 PDF
  6. 輸出:在相同目錄下建立 <原始檔案名稱>_Translated.pdf 檔案

支援的文件類型

  • 銀行存款證明
  • 收入證明
  • 在職證明
  • 退休證明
  • 房產證明
  • 營業執照
  • 身分證與護照
  • 其他官方文件

技術實作

OCR 方法(依序嘗試)

  1. macOS Vision 框架(僅 macOS):

    import Vision
    from Foundation import NSURL
    
  2. EasyOCR(跨平台):

    pip install easyocr
    
  3. Tesseract OCR(若可用):

    brew install tesseract tesseract-lang
    pip install pytesseract
    

所需 Python 套件

pip install pillow reportlab

若使用 macOS Vision 框架:

pip install pyobjc-framework-Vision pyobjc-framework-Quartz

重要指引

  • 請勿在每個步驟要求使用者確認
  • 自動判斷最佳旋轉角度
  • 若某個 OCR 方法失敗,自動嘗試其他方法
  • 確保所有數字、日期與金額翻譯準確
  • 採用乾淨專業的排版
  • 完成整個流程後,回報最終 PDF 的位置

使用範例

/visa-doc-translate RetirementCertificate.PNG
/visa-doc-translate BankStatement.HEIC
/visa-doc-translate EmploymentLetter.jpg

輸出範例

此技能會:

  1. 使用可用的 OCR 方法擷取文字
  2. 翻譯成專業英文
  3. 產生 <檔名>_Translated.pdf,內容包含:
    • 第 1 頁:原始文件圖片
    • 第 2 頁:專業英文翻譯

非常適合申請澳洲、美國、加拿大、英國等需要翻譯文件的簽證申請。

Individual skills in this repo

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

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

affaan-m/ECC

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

affaan-m/fal-ai-media

Unified media generation via fal.ai MCP — image, video, and audio. Covers text-to-image (Nano Banana), text/image-to-video (Seedance, Kling, Veo 3), text-to-speech (CSM-1B), and video-to-audio (ThinkSound). Use when the user wants to generate images, videos, or audio with AI.

affaan-m/manim-video

日本語翻訳:このファイルは manim-video 用の日本語翻訳が必要です

affaan-m/remotion-video-creation

Remotion のベストプラクティス - React で動画を作成する。3D、アニメーション、音声、字幕、チャート、トランジションなどをカバーするドメイン固有の29のルール。

affaan-m/video-editing

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

agent-self-evaluation

Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

ai-first-engineering

Engineering operating model for teams where AI agents generate a large share of implementation output. Use when setting team process, review gates, or ownership rules for a codebase largely written by agents.

ai-regression-testing

Regression testing strategies for AI-assisted development. Sandbox-mode API testing without database dependencies, automated bug-check workflows, and patterns to catch AI blind spots where the same model writes and reviews code. Use when adding regression coverage to AI-assisted code, or when the same model both wrote and reviewed a change.

android-clean-architecture

Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, or services, or for best practices on reactivity (signals, linkedSignal, resource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component styles, Tailwind CSS), testing, or CLI tooling.

相關技能