Baidu File Translate
Baidu trans-cli file/document translation for 文件翻译、文档翻译、PDF/Word/Excel/PPT/TXT/HTML 翻译 while preserving original formatting and layout. Powered by trans-cli... Skill: Baidu File Translate Owner: baidu-translate Summary: Baidu trans-cli file/document translation for 文件翻译、文档翻译、PDF/Word/Excel/PPT/TXT/HTML 翻译 while preserving original formatting and layout. Powered by trans-cli... Tags: latest:1.0.1 Version history: v1.0.1 | 2026-05-28T04:06:32.242Z | user - Improved the skill description for clarity and focus on supported document types and translation use-cases. - Clarified w
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
1.0.1
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.1release · observed May 28, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s173pby7qgzc6mnef856135vr983z06v:baidu-file-translate- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-file-translate/snapshot"
Documentation
CLAWHUB
12,982 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
---
name: baidu-file-translate
description: Baidu trans-cli file/document translation for 文件翻译、文档翻译、PDF/Word/Excel/PPT/TXT/HTML 翻译 while preserving original formatting and layout. Powered by trans-cli (Baidu LLM File Translation API). Trigger when the user uploads or references a file and asks to translate it, or asks to convert a document's language.
homepage: https://fanyi.baidu.com
metadata: '{"clawdbot":{"emoji":"📄","requires":{"bins":["trans"],"env":["TRANS_API_KEY"]},"install":[{"id":"npm","kind":"npm","package":"@bdtrans/trans-cli","bins":["trans"],"label":"Install trans-cli (npm)"}]}}'
---
# 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
```
Set an Agent-level timeout (e.g. 10 min). On WAIT_TIMEOUT, save the
request_id and report to user — the job is still running and can be resumed later.
---
## trans file submit \<file\>
```bash
trans file submit report.pdf --from zh --to en --json
trans file submit report.pdf --to en --reference "Use academic tone"
```
| Flag | Default | Description |
|------|---------|-------------|
| `--from` | auto | Source language (auto-detect) |
| `--to` | zh | Target language — **`auto` is not accepted** |
| `--reference` | — | Custom translation instruction, ≤ 1000 Unicode code points |
| `--trans-image` | false | Also translate text inside images |
| `--wait` | false | Block until done (always pair with `--wait-timeout`) |
| `--wait-timeout` | 0 (no limit) | Max wait time for `--wait` mode |
## trans file query \<requestId\>
```bash
trans file query REQ123 --json
trans file query REQ123 --download --output ./output/
```
| Flag | Default | Description |
|------|---------|-------------|
| `--download` | false | Download the translated file when done |
| `--output` | ./ | Download directory (used with `--download`) |
| `--wait` | false | Block until done |
| `--wait-timeout` | 0 (no limit) | Max wait time for `--wait` mode |
---
## JSON Contract
**submit success (stdout):**
```json
{"request_id": "REQ123", "status": "submitted"}
```
**query — in progress (stdout):**
```json
{"request_id": "REQ123", "status": "processing", "name": "report.pdf", "from": "zh", "to": "en"}
```
**query — do_meta.json
{
"ownerId": "kn7fhw0h9fm3z24r13j111w56583yfp7",
"slug": "baidu-file-translate",
"version": "1.0.1",
"publishedAt": 1779941192242
}skill-card.md
## Description: Baidu File Translate helps agents translate uploaded or referenced documents with Baidu trans-cli while preserving the original document formatting and layout. This skill is ready for commercial/non-commercial use. ## Publisher: [baidu-translate](https://clawhub.ai/user/baidu-translate) ### License/Terms of Use: MIT-0 ## Use Case: Developers and agents use this skill when a user asks to translate a file or convert a document into another language. It covers common office and text formats, submits asynchronous translation jobs, polls for completion, and guides download only after user confirmation. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Documents submitted for translation are processed by Baidu's translation service. Mitigation: Use only documents that policy allows to be processed by Baidu, and avoid confidential, regulated, or highly sensitive files unless explicitly approved. Risk: The translation CLI requires TRANS_API_KEY, which may be exposed to local tooling or logs if mishandled. Mitigation: Store the key in the agent environment or secret manager, avoid echoing it in commands, and rotate it if exposure is suspected. Risk: The skill depends on an npm-installed trans CLI package. Mitigation: Pin or otherwise control the npm dependency in managed environments before deployment. Risk: Document translation is asynchronous and can exceed an agent's active session. Mitigation: Use the submit and poll workflow, set a bounded agent timeout, preserve request_id on WAIT_TIMEOUT, and resume later instead of retrying blindly. ## Reference(s): - [Baidu Translate](https://fanyi.baidu.com) - [Baidu API Key Management](https://fanyi-api.baidu.com/manage/apiKey) - [ClawHub Skill Page](https://clawhub.ai/baidu-translate/skills/baidu-file-translate) ## Skill Output: **Output Type(s):** [shell commands, configuration, guidance] **Output Format:** [Markdown with inline shell commands and JSON response examples] **Output Parameters:** [1D] **Other Properties Related to Output:** [Uses asynchronous submit and poll workflow; requires trans CLI and TRANS_API_KEY.] ## Skill Version(s): 1.0.1 (source: server release evidence) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/baidu-translate/skills/baidu-file-translate",
"sourceUrl": "https://clawhub.ai/baidu-translate/skills/baidu-file-translate",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T10:34:48.896Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-file-translate/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-file-translate/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T10:34:48.896Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/baidu-translate/baidu-file-translate",
"sourceUrl": "https://clawhub.ai/baidu-translate/baidu-file-translate",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T10:34:48.896Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.1",
"href": "https://clawhub.ai/baidu-translate/baidu-file-translate",
"sourceUrl": "https://clawhub.ai/baidu-translate/baidu-file-translate",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-28T04:06:32.242Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-file-translate/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-file-translate/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.1",
"description": "- Improved the skill description for clarity and focus on supported document types and translation use-cases. - Clarified workflow: always confirm with user before downloading the translated file; explicitly report WAIT_TIMEOUT and save request_id for resuming translation. - Added instructions to stop and report immediately for exit 2 (auth/config) errors and WAIT_TIMEOUT. - Updated descriptions to emphasize trigger scenarios (file upload or user request to translate/convert documents). - No changes to code or JSON contracts; documentation and usage guidance improved.",
"href": "https://clawhub.ai/baidu-translate/baidu-file-translate",
"sourceUrl": "https://clawhub.ai/baidu-translate/baidu-file-translate",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-05-28T04:06:32.242Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
