Xpersona
B

Baidu File Translate

CLAWHUB · Unverified

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

62
Rank
84
Safety
1.1k
Downloads

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

Install and run

Setup complexity: low.

clawhub skill install s173pby7qgzc6mnef856135vr983z06v:baidu-file-translate
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. 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"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

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.

Sponsored

Ads related to Baidu File Translate and adjacent AI workflows.