visa-doc-translate
- Use it when:
- A visa application needs a bank, income, employment or retirement certificate, or another official document, translated into English.
- It does:
- Converts and rotates the image, reads it with OCR, translates it keeping every figure, then writes and runs a Python script to build the PDF.
- You get:
- <name>_Translated.pdf next to the image: the original on page one, the formatted English translation on page two.
- Runs:
- Start to finish without asking, from /visa-doc-translate <image>.
- Needs:
- Python with Pillow and reportlab, and one OCR engine: macOS Vision, EasyOCR or Tesseract.
It runs every step without asking, and stamps each PDF "This is a certified English translation of the original document", though no translator has certified it.
TL;DR
Give it the path to a photo or scan of an official document and it runs the whole job without stopping to ask. HEIC files are converted to PNG with macOS's sips, and the image is rotated from its EXIF orientation, or by 180 degrees if it reads upside down. It tries OCR engines in turn, macOS's Vision framework, then EasyOCR, then Tesseract, and identifies the kind of document: deposit, income, employment or retirement certificates, property certificates, business licences, ID cards, passports and others, listed with their Chinese names. The translation keeps the document's structure and every number, date and amount, and gives proper names in the original language with English in parentheses, Chinese names in pinyin. The agent then writes and runs a Python script with Pillow and reportlab that puts the rotated original on an A4 first page and the translation on the second, under a centred bold title, with a closing line calling it a certified English translation. The PDF is saved next to the source image.
Summarizes the skill at d2ef268.
npx skills add https://github.com/affaan-m/ecc --skill visa-doc-translate More weekly downloads than 56% of skills
Weekly values
| Week to | Installs |
|---|---|
| Sep 21 | 258 |
| Sep 28 | 157 |
| Oct 5 | 139 |
| Oct 12 | 228 |
| Oct 19 | 409 |
| Oct 26 | 398 |
| Nov 2 | 472 |
| Nov 9 | 439 |
Fewer downloads than 91% of skills
More stars than 97% of repos
Newer than 66% of skills
| Category |
Office files, notes and suites like Lark and Google Workspace. Learning and everyday help outside work. |
|---|---|
| Type |
A multi-step process the agent follows: interview, debug, run a TDD loop, review. |
| Effect |
Its own steps create or change files, git state or local tools. |
| Needs |
A specific command-line tool or desktop app must be installed, such as gh, agent-browser, LibreOffice, Obsidian or a vendor CLI. |
| Publisher |
Everyone else. Unverified vendor claims default to community. |
| Topics | |
| Stack |
SKILL.md
From affaan-m/ecc at d2ef268. Checked daily, last changed Nov 6, 2026.
Frontmatter
name: visa-doc-translate
description: Translate visa document images (bank deposit, employment, income, and retirement certificates; HEIC, PNG, or JPG) into English via OCR and produce a bilingual PDF pairing the original image with a formatted certified-style translation. Use when a visa application needs a document translated to English, an official certificate OCR'd and translated, or a bilingual translation PDF for immigration paperwork.You are helping translate visa application documents for visa applications.
Instructions
When the user provides an image file path, AUTOMATICALLY execute the following steps WITHOUT asking for confirmation:
-
Image Conversion: If the file is HEIC, convert it to PNG using
sips -s format png <input> --out <output> -
Image Rotation:
- Check EXIF orientation data
- Automatically rotate the image based on EXIF data
- If EXIF orientation is 6, rotate 90 degrees counterclockwise
- Apply additional rotation as needed (test 180 degrees if document appears upside down)
-
OCR Text Extraction:
- Try multiple OCR methods automatically:
- macOS Vision framework (preferred for macOS)
- EasyOCR (cross-platform, no tesseract required)
- Tesseract OCR (if available)
- Extract all text information from the document
- Identify document type (deposit certificate, employment certificate, retirement certificate, etc.)
- Try multiple OCR methods automatically:
-
Translation:
- Translate all text content to English professionally
- Maintain the original document structure and format
- Use professional terminology appropriate for visa applications
- Keep proper names in original language with English in parentheses
- For Chinese names, use pinyin format (e.g., WU Zhengye)
- Preserve all numbers, dates, and amounts accurately
-
PDF Generation:
- Create a Python script using PIL and reportlab libraries
- Page 1: Display the rotated original image, centered and scaled to fit A4 page
- Page 2: Display the English translation with proper formatting:
- Title centered and bold
- Content left-aligned with appropriate spacing
- Professional layout suitable for official documents
- Add a note at the bottom: "This is a certified English translation of the original document"
- Execute the script to generate the PDF
-
Output: Create a PDF file named
<original_filename>_Translated.pdfin the same directory
Supported Documents
- Bank deposit certificates (存款证明)
- Income certificates (收入证明)
- Employment certificates (在职证明)
- Retirement certificates (退休证明)
- Property certificates (房产证明)
- Business licenses (营业执照)
- ID cards and passports
- Other official documents
Technical Implementation
OCR Methods (tried in order)
-
macOS Vision Framework (macOS only):
import Vision from Foundation import NSURL -
EasyOCR (cross-platform):
pip install easyocr -
Tesseract OCR (if available):
brew install tesseract tesseract-lang pip install pytesseract
Required Python Libraries
pip install pillow reportlab
For macOS Vision framework:
pip install pyobjc-framework-Vision pyobjc-framework-Quartz
Important Guidelines
- DO NOT ask for user confirmation at each step
- Automatically determine the best rotation angle
- Try multiple OCR methods if one fails
- Ensure all numbers, dates, and amounts are accurately translated
- Use clean, professional formatting
- Complete the entire process and report the final PDF location
Example Usage
/visa-doc-translate RetirementCertificate.PNG
/visa-doc-translate BankStatement.HEIC
/visa-doc-translate EmploymentLetter.jpg
Output Example
The skill will:
- Extract text using available OCR method
- Translate to professional English
- Generate
<filename>_Translated.pdfwith:- Page 1: Original document image
- Page 2: Professional English translation
Perfect for visa applications to Australia, USA, Canada, UK, and other countries requiring translated documents.