npx skillsauth add cruldra/skills translateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
这个技能提供了完整的翻译工作流,包括内容获取、翻译、格式化和保存。
自动识别来源类型
智能内容清理
Docusaurus 集成
sidebar_position 元数据目录层级智能识别
交互式路径选择
文件命名规范
当用户请求翻译时,执行以下工作流:
检查输入内容,判断类型:
// URL 模式
- 包含 http:// 或 https://
- 使用 Firecrawl MCP 的 firecrawl_scrape 工具抓取
- 参数: { url: string, formats: ["markdown"], onlyMainContent: true }
- 如果用户只提供了 URL,没有指定保存位置,则需要在翻译后询问保存位置
// 本地文件路径模式
- 以 / 或盘符开头(如 C:\ 或 D:\)
- 或者相对路径(如 ./docs/file.md)
- 使用 read 工具读取文件内容
// 纯文本模式
- 其他所有情况
- 直接作为翻译内容
如果是 URL:
使用 Firecrawl MCP 抓取内容:
firecrawl_scrape({
url: userInput,
formats: ["markdown"],
onlyMainContent: true,
removeBase64Images: false
})
提取 markdown 内容后,进入内容清理阶段。
如果是本地文件:
read({ filePath: userInput })
直接使用文件内容,跳过清理阶段(假设本地文件已经是清理过的)。
如果是纯文本:
直接使用输入内容作为翻译源。
执行智能内容清理,移除导航元素并提取层级信息。详细规则见 references/cleaning.md。
关键步骤:
Docs > API > Auth → docs/api/auth)地道的技术中文
保持格式完整
术语处理
代码注释
原文标题 # Getting Started → 译文标题 ## 快速开始
详见 references/docusaurus.md
基于翻译后的内容,识别:
如果用户只提供了 URL(没有指定保存位置):
从多个来源提取目录层级信息:
a. URL 路径分析:
https://example.com/docs/api/authentication → 可能对应 api/authenticationhttps://www.remotion.dev/docs/transforms → 可能对应 Remotion/transformshttps://docs.library.com/guide/advanced/caching → 可能对应 Library/guide/advanced/cachingb. 面包屑导航分析:
Home > Docs > API > Authentication 或 首页 / 文档 / API / 认证Docs > API > Authentication → docs/api/authenticationc. 优先级规则:
分析翻译后的内容主题,结合层级信息
向用户询问保存位置,提供智能推荐:
基于面包屑导航和 URL 路径分析,推荐保存路径:
1. docs/Tools/Remotion/API/认证.md (推荐 - 基于面包屑)
2. docs/Tools/Remotion/认证.md (基于 URL 路径)
3. 自定义路径
请选择或输入自定义路径:
如果用户已指定保存位置:
直接使用用户指定的路径。
创建目录层级:
无论哪种情况,如果目标路径包含多层目录,在保存文件前必须使用 bash 工具创建所有缺失的目录层级:
mkdir -p "docs/Tools/Remotion/player"
目录结构参考:
docs/
├── AI/ # AI 相关
├── FrontEnd/ # 前端相关
├── Tools/ # 工具相关
├── Python/ # Python 相关
├── JVM/ # JVM 生态
├── Rust/ # Rust 相关
├── Go/ # Go 相关
├── Games/ # 游戏相关
├── Hardware/ # 硬件相关
├── Personal/ # 个人笔记
└── SoftwareEngineering/ # 软件工程
docs/ ├── AI/ # AI 相关 ├── FrontEnd/ # 前端相关 ├── Tools/ # 工具相关 ├── Python/ # Python 相关 ├── JVM/ # JVM 生态 ├── Rust/ # Rust 相关 ├── Go/ # Go 相关 ├── Games/ # 游戏相关 ├── Hardware/ # 硬件相关 ├── Personal/ # 个人笔记 └── SoftwareEngineering/ # 软件工程
**推荐格式:**
向用户展示推荐路径:
基于内容分析,推荐保存路径:
请选择或输入自定义路径:
#### 步骤 3: 生成文件名
**文件命名规则:**
- 使用中文命名,简洁且描述性强
- 示例: `介绍.md`, `快速开始.md`, `API参考.md`
- 详见 [references/docusaurus.md](references/docusaurus.md)
#### 步骤 4: 添加 Docusaurus 元数据
添加 frontmatter,检查目标目录下已有文件的 `sidebar_position`,推荐合适的位置并向用户确认。
格式规范详见 [references/docusaurus.md](references/docusaurus.md)
### 阶段 5: 保存文件
#### 步骤 1: 构建最终内容
```markdown
---
sidebar_position: ${position}
---
${translatedContent}
使用 write 工具保存文件。
向用户展示:
✓ 翻译完成
来源: ${sourceType} (${sourceUrl or sourceFile})
保存至: ${savedPath}
元数据: sidebar_position = ${position}
文件已准备就绪!
本技能依赖以下工具:
必需工具:
firecrawl_scrape (Firecrawl MCP) - URL 内容抓取read - 本地文件读取write - 保存翻译结果glob - 查找目录下已有文件可选工具:
question - 与用户交互确认bash - 文件系统操作(必需,用于创建多层目录结构)用户输入:
/translate https://docs.agno.com/introduction
执行流程:
Home > Docs > Introduction → 层级 docs/introductiondocs/Tools/Remotion/介绍.mdmkdir -p "docs/Tools/Remotion"用户输入:
/translate ./drafts/react-hooks.md
执行流程:
用户输入:
/translate https://www.remotion.dev/docs/player/controls
抓取内容包含面包屑:
Home > Docs > Player > Controls
执行流程:
Docs > Player > Controls → docs/player/controls/docs/player/controls → player/controlsdocs/Tools/Remotion/player/控制.md (基于面包屑)docs/Tools/Remotion/player/控制.md (基于 URL - 本例中相同)mkdir -p "docs/Tools/Remotion/player"docs/Tools/Remotion/player/ 下已有文件的 sidebar_positiondocs/Tools/Remotion/player/控制.md用户输入:
/translate React is a JavaScript library for building user interfaces.
执行流程:
内容清理要谨慎
路径推荐要智能
元数据要规范
翻译要专业
Firecrawl 限制
内容清理风险
文件覆盖风险
sidebar_position 冲突
目录创建要求
mkdir -p 创建多层目录结构Docusaurus 格式规范
testing
智能体 UAT 验收测试技能。用于验证智能体在真实场景下的表现是否满足预期。支持任意智能体框架(langchain、langgraph、deepagents、crewai 等)。触发词:测试智能体、验收测试、agent test、UAT
tools
Use when you need to create a Gitea issue, update its spec/plan markers, read or merge an issue's state JSON, or post a PR review comment in a repo that uses the spx CLI (superpowers-vscode workflow).
development
Use when implementing, modifying, refactoring, or reviewing code and the agent must follow explicit coding standards for simplicity, readability, maintainability, testability, project conventions, and minimal safe changes.
development
Use when integrating the deepagents SDK into a Python project — creating agents, configuring backends, adding subagents, middleware, memory, or skills. Also use when debugging deepagents agents or choosing between StateBackend, FilesystemBackend, and LocalShellBackend.