Atlas / Skills / xu-xiang / Visa Doc Translate

Visa Doc TranslateSAFE

skills/xu-xiang/visa-doc-translate

everything-claude-code 中文翻译项目:完整的 Claude Code 配置集合(agents, skills, hooks, commands, rules, MCPs)。源自 Anthropic 黑客松获胜者的实战配置,助力中文工程师高效理解与使用 Claude Code。

Verdict
SAFE
Grade
B
Trust score
89 /100
Version
—
Hosts
—
License
MIT
Stars
1,988
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

自动将签证申请文件从图像翻译为专业的英文 PDF。

功能

  • 🔄 自动 OCR:尝试多种 OCR 方法(macOS Vision、EasyOCR、Tesseract)
  • 📄 双语 PDF:原始图像 + 专业英文翻译
  • 🌍 多语言支持:支持中文及其他语言
  • 📋 专业格式:适合官方签证申请
  • 🚀 完全自动化:无需人工干预

支持的文件类型

  • 银行存款证明(存款证明)
  • 在职证明(在职证明)
  • 退休证明(退休证明)
  • 收入证明(收入证明)
  • 房产证明(房产证明)
  • 营业执照(营业执照)
  • 身份证和护照

使用方法

/visa-doc-translate 

示例

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

输出

创建 _Translated.pdf,包含:

  • 第 1 页:原始文件图像(居中,A4 尺寸)
  • 第 2 页:专业英文翻译

要求

Python 库

pip install pillow reportlab

OCR(需要以下之一)

macOS(推荐):

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

跨平台:

pip install easyocr

Tesseract:

brew install tesseract tesseract-lang
pip install pytesseract

工作原理

  1. 如有需要,将 HEIC 转换为 PNG
  2. 检查并应用 EXIF 旋转
  3. 使用可用的 OCR 方法提取文本
  4. 翻译为专业英文
  5. 生成双语 PDF

完美适用于

  • 🇦🇺 澳大利亚签证申请
  • 🇺🇸 美国签证申请
  • 🇨🇦 加拿大签证申请
  • 🇬🇧 英国签证申请
  • 🇪🇺 欧盟签证申请

许可证

MIT

Read from source at commit 012f775295c3OBSERVED · 2026-10-12
02

Install

Commands as the repository documents them. They are shown, not run.

pip install pillow reportlab
pip install pyobjc-framework-Vision pyobjc-framework-Quartz
pip install easyocr
pip install pytesseract
pip install easyocr
pip install pytesseract
03

What it tells the agent

The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.

---
name: visa-doc-translate
description: 将签证申请文件(图片)翻译成英文,并创建包含原文和译文的双语PDF
---

您正在协助翻译用于签证申请的签证申请文件。

## 说明

当用户提供图像文件路径时,**自动**执行以下步骤,**无需**请求确认:

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)
   * 准确保留所有数字、日期和金额

5. **PDF 生成**:
   * 使用 PIL 和 reportlab 库创建 Python 脚本
   * 第 1 页:显示旋转后的原始图像,居中并缩放到适合 A4 页面
   * 第 2 页:以适当格式显示英文翻译:
     * 标题居中并加粗
     * 内容左对齐,间距适当
     * 适合官方文件的专业布局
   * 在底部添加注释:"This is a certified English translation of the original document"
   * 执行脚本以生成 PDF

6. **输出**:在同一目录中创建名为 `<original_filename>_Translated.pdf` 的 PDF 文件

## 支持的文档

* 银行存款证明 (存款证明)
* 收入证明 (收入证明)
* 在职证明 (在职证明)
* 退休证明 (退休证明)
* 房产证明 (房产证明)
* 营业执照 (营业执照)
* 身份证和护照
* 其他官方文件

## 技术实现

### OCR 方法(按顺序尝试)

1. **macOS Vision 框架**(仅限 macOS):
   ```python
   import Vision
   from Foundation import NSURL
   ```

2. **EasyOCR**(跨平台):
   ```bash
   pip install easyocr
   ```

3. **Tesseract OCR**(如果可用):
   ```bash
   brew install tesseract tesseract-lang
   pip install pytesseract
   ```

### 必需的 Python 库

```bash
pip install pillow reportlab
```

对于 macOS Vision 框架:

```bash
pip install pyobjc-framework-Vision pyobjc-framework-Quartz
```

## 重要指南

* **请勿**在每个步骤都要求用户确认
* 自动确定最佳旋转角度
* 如果一种 OCR 方法失败,请尝试多种方法
* 确保所有数字、日期和金额都准确翻译
* 使用简洁、专业的格式
* 完成整个流程并报告最终 PDF 的位置

## 使用示例

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

## 输出示例

该技能将:

1. 使用可用的 OCR 方法提取文本
2. 翻译成专业英文
3. 生成 `<filename>_Translated.pdf`,其中包含:
   * 第 1 页:原始文档图像
   * 第 2 页:专业的英文翻译

非常适合需要翻译文件的澳大利亚、美国、加拿大、英国及其他国家的签证申请。
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeNA
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
none-observed
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (0)

No findings outside the package's declared scope.

Gates applied: no_behavioural_pass.

Audited 2026-10-12 · audit v0.4.1 · source sha 012f775295c3full audit observations/trust-audit/skill/xu-xiang__visa-doc-translate.json · Report an issue / request a re-scan
05

Audit history

Every audit this skill has had.

DateSourceVerdictGradeScoreChange
2026-10-12012f775295c3SAFEB89first audit
06

Questions

What does the Visa Doc Translate skill do?

everything-claude-code 中文翻译项目:完整的 Claude Code 配置集合(agents, skills, hooks, commands, rules, MCPs)。源自 Anthropic 黑客松获胜者的实战配置,助力中文工程师高效理解与使用 Claude Code。

Is Visa Doc Translate safe to install?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.

What can Visa Doc Translate access on my machine?

The audit observed no filesystem, network or shell use at all in its source.

How current is this page?

The grade is for one exact copy of the source (012f775295c3), read on 2026-10-12. The repository is watched, and a new audit runs when it changes — this is the first audit.

Advertisement