agentCLAWHUBUnverified

Baidu Text Translate

Translate text using Baidu AI Translation API via trans-cli with Baidu-specific language codes, API key management, error handling, and environment diagnostics. Skill: Baidu Text Translate Owner: baidu-translate Summary: Translate text using Baidu AI Translation API via trans-cli with Baidu-specific language codes, API key management, error handling, and environment diagnostics. Tags: latest:1.0.1 Version history: v1.0.1 | 2026-04-29T03:28:05.140Z | user - Added required TRANS_API_KEY environment variable to skill metadata. - No other changes to skill logic or documentation.

OpenClaw

Rank

62

Safety

84

Downloads

1.4k

Updated

Oct 10, 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.4K downloads reported by the source. Last updated 10/10/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 10, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 10, 2026
Adoption signal
1.4K downloadsadoption · observed Oct 10, 2026
Latest release
1.0.1release · observed Apr 29, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: medium.

clawhub skill install s173pby7qgzc6mnef856135vr983z06v:baidu-text-translate
  1. Setup complexity is MEDIUM. Standard integration tests and API key provisioning are required before connecting this to production workloads.
  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-text-translate/snapshot"

Documentation

CLAWHUB

16,931 characters of source documentation, loaded on request.

Extracted files

3 files captured from the source.

SKILL.md

---
name: baidu-text-translate
description: Use this skill whenever you need to translate text with the trans-cli tool (Baidu Translation AI API). Covers JSON output contract, Baidu-specific language codes (jp/kor/fra/spa/ara — not ISO defaults), exit code semantics, error decision tree, first-time API key setup, QUOTA_EXCEEDED / AUTH_FAILED recovery, environment self-diagnosis via `trans doctor`, and listing supported languages via `trans languages`. Trigger on any of: running `trans text`, shell pipelines with translation, trans-cli errors, API key configuration, `trans doctor` checks, or looking up language codes.
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_text_translate — Agent Reference

`trans text` wraps the Baidu AI Translation API. Use `--json` — it separates
success (stdout) from errors (stderr) and gives you structured fields to act on.

```bash
trans text --json "你好世界"                             # auto-detect → English
trans text --json --from zh --to jp "你好"               # explicit languages
trans text --json --to fra --reference "使用正式语气" "你好"  # custom instruction
echo "早上好" | trans text --json                        # stdin pipe
```

---

## Environment Diagnosis

Before translating, verify the environment with `trans doctor`:

```bash
trans doctor           # human-readable output
trans doctor --json    # JSON output for Agent parsing
```

**JSON contract** (stdout):
```json
{
  "checks": [
    {"name":"api_key",     "ok":true,  "source":"env/config", "message":"configured"},
    {"name":"connectivity","ok":true,  "latency_ms":243,       "message":"reachable"},
    {"name":"account",     "ok":true,                          "message":"valid"}
  ],
  "all_ok": true
}
```

| Exit | `all_ok` | Meaning |
|------|----------|---------|
| 0 | `true` | All checks passed — ready to translate |
| 2 | `false` | At least one check failed — inspect `checks[].ok` |

**When a check fails**, `help_url` in the failing check points to the fix:
- `api_key.ok:false` → set `TRANS_API_KEY` (see Configuration below)
- `account.ok:false` → key invalid/expired or quota exhausted

Run `trans doctor --json` as the first step when diagnosing any trans-cli failure.

---

## JSON Contract

**Success** (stdout, exit 0):
```json
{"from":"zh","to":"en","source":"你好","translated":"Hello"}
```

| Field | Note |
|-------|------|
| `from` | API-detected language — may differ from `--from auto` |
| `to` | Target language |
| `source` | Original input |
| `translated` | Result |

**Error** (stderr, exit ≠ 0):
```json
{"code":"AUTH_FAILED","message":"…","help_url":"https://…","raw_code":"52001"}
```

`help_url` and `raw_code` are omitted when not applicable.

---

## Error Decision Tree

| Exit | `code` | Cause | Action |
|------|--------|-------|--------|

_meta.json

{
  "ownerId": "kn7fhw0h9fm3z24r13j111w56583yfp7",
  "slug": "baidu-text-translate",
  "version": "1.0.1",
  "publishedAt": 1777433285140
}

skill-card.md

## Description:

Translate text using Baidu AI Translation API via trans-cli with Baidu-specific language codes, API key management, error handling, and environment diagnostics.

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 to translate text with Baidu's trans-cli, diagnose API key and account readiness, choose Baidu-specific language codes, and respond to translation errors.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: Translated text is sent to Baidu's external translation service.

Mitigation: Avoid translating secrets, credentials, private documents, or regulated data unless that data sharing has been approved.

Risk: The skill depends on installing and running the external @bdtrans/trans-cli npm package.

Mitigation: Review the npm package and version before installation, especially in sensitive environments.

Risk: The Baidu API key may be exposed through unsafe shell history, config files, or prompts.

Mitigation: Prefer TRANS_API_KEY or carefully managed config storage and do not paste credentials into translated text.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/baidu-translate/skills/baidu-text-translate)
- [Baidu Translate](https://fanyi.baidu.com)
- [Baidu Translation Open Platform](https://fanyi-api.baidu.com/)
- [Baidu Developer Center](https://fanyi-api.baidu.com/manage/developer)
- [Baidu API Key Management](https://fanyi-api.baidu.com/manage/apiKey)
- [Baidu Account Recharge](https://fanyi-api.baidu.com/manage/account)
- [Baidu Translation Usage Details](https://fanyi-api.baidu.com/api/trans/user/usage)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, guidance]

**Output Format:** [Markdown with inline shell commands and JSON examples]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Guidance centers on trans-cli JSON output, exit codes, language codes, API key setup, and environment diagnostics.]

## 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.
Github ReposUpdated 21h agoRank 70

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!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

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

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

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-text-translate",
      "sourceUrl": "https://clawhub.ai/baidu-translate/skills/baidu-text-translate",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T14:20:09.282Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-text-translate/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-text-translate/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-10T14:20:09.282Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.4K downloads",
      "href": "https://clawhub.ai/baidu-translate/baidu-text-translate",
      "sourceUrl": "https://clawhub.ai/baidu-translate/baidu-text-translate",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T14:20:09.282Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.0.1",
      "href": "https://clawhub.ai/baidu-translate/baidu-text-translate",
      "sourceUrl": "https://clawhub.ai/baidu-translate/baidu-text-translate",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-04-29T03:28:05.140Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-text-translate/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-baidu-translate-baidu-text-translate/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.0.1",
      "description": "- Added required TRANS_API_KEY environment variable to skill metadata. - No other changes to skill logic or documentation.",
      "href": "https://clawhub.ai/baidu-translate/baidu-text-translate",
      "sourceUrl": "https://clawhub.ai/baidu-translate/baidu-text-translate",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-04-29T03:28:05.140Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 10, 2026.

Sponsored

Ads related to Baidu Text Translate and adjacent AI workflows.