skills/clawhub.ai/baidu-file-translate

baidu-file-translate

Installation
SKILL.md

baidu-file-translate — Agent Reference

File translation is async. Always use the submit → poll loop below. Never rely on --wait without a timeout — it may block indefinitely in an Agent framework.

Step 1: trans file submit <file> --from auto --to <lang> --json
        → exit ≠ 0 → ⚠ STOP if exit 2 (auth/config); handle others (see Error Handling)
        → exit 0   → record request_id from stdout

Step 2: every 5 s: trans file query <request_id> --json
        → exit ≠ 0              → handle error; DOC_FAILED = don't retry
        → exit 0, status=processing → keep polling (set Agent timeout ≤ 10 min)
        → exit 0, status=done       → ⚠ confirm with user before downloading
                                       then: trans file query <request_id> --download --output ./
        → WAIT_TIMEOUT              → ⚠ STOP — save request_id, report to user
Installs
1
First Seen
Aug 18, 2026
baidu-file-translate from clawhub.ai