ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

yunjia-file-transfer

当用户请求文件时(如"把文件发给我"、"发个文件给我"、"把 xxx 发给我"),调用此 skill 将文件发送给用户。支持发送本地文件到当前聊天频道。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/billyang1222/yunjia-file-transfer
Or

云加文件传输

🎯 重点保证 Windows 系统支持

重要提示:用户主要使用 Windows 系统,必须优先保证 Windows 上的正常使用!

🏆 Windows 优先原则

  1. Windows 是第一优先级 - 所有示例和说明都要考虑 Windows 兼容性
  2. 用户使用 Windows - 实际使用场景中 Windows 占比最高
  3. 路径格式要正确 - Windows 使用反斜杠和驱动器字母

🌐 操作系统兼容性

完全支持

  • Windows - 第一优先级,用户主要使用 Windows
  • macOS - 原生支持
  • Linux - 包括银河麒麟、统信UOS等发行版

📝 智能体注意事项

  1. Windows 优先:首先考虑 Windows 兼容性,再考虑其他系统
  2. 需要根据操作系统使用相应的文件查找命令
  3. 路径必须是操作系统对应的绝对路径格式
    • Windows: C:\Users\用户名\文件.txtC:/Users/用户名/文件.txt
    • macOS: /Users/用户名/文件.txt
    • Linux: /home/用户名/文件.txt
  4. 脚本会自动验证路径格式的合法性
  5. 重要:不要硬编码 macOS 路径!智能体需要动态确定当前操作系统并生成正确的路径

⚠️ 重要警告

调用技能后,你的回复必须是脚本的 stdout 输出,不要添加任何额外的文字、Markdown 代码块或说明!

脚本已经输出了格式正确的 JSON,你只需要把这个 JSON 原封不动地转发给用户。

🚫 常见错误

错误做法:包装脚本输出

AI 在调用技能后,错误地包装了脚本的输出:

根据技能要求,我需要直接输出这个 JSON,不在外面加任何文字:

```json
{"filePaths":["/home/lifang/Downloads/测试文件.txt"],"text":"给您发过去了,查收一下。需要我把文件内容识别出来给您看吗?","mode":"sendFileToChat"}

错误做法:添加额外文本

给您发过去了,查收一下
{"filePaths":["..."],"text":"给您发过去了,查收一下","mode":"sendFileToChat"}

正确做法

  1. 智能体查找文件路径(使用上面提到的方法)
  2. 智能体确定要对用户说的话(自然口语化)
  3. 调用脚本:python3 "${SKILL_DIR}/scripts/assemble_send_instruction.py" --file "/找到的/具体/文件路径" --text "你想说的话"
  4. 脚本输出(stdout):
    {
      "filePaths": ["/找到的/具体/文件路径"],
      "text": "你想说的话",
      "mode": "sendFileToChat"
    }
    
  5. 直接把这个 stdout 输出作为你的回复,不要添加任何东西

完整示例(跨平台):

macOS/Linux 示例用户说:"把 test.txt 发给我"

智能体操作

  1. 查找文件:find ~/Downloads -name "*test.txt*" -type f 2>/dev/null
  2. 找到绝对路径/home/lifang/Downloads/test.txt
    • ❌ 错误:~/Downloads/test.txt
    • ❌ 错误:test.txt
    • ❌ 错误:Downloads/test.txt
  3. 确定回复文本:"给您发过去了,查收一下。需要我把文件内容识别出来给您看吗?"
  4. 调用脚本:python3 "${SKILL_DIR}/scripts/assemble_send_instruction.py" --file "/home/lifang/Downloads/test.txt" --text "给您发过去了,查收一下。需要我把文件内容识别出来给您看吗?"
  5. 脚本输出:
    {
      "filePaths": ["/home/lifang/Downloads/test.txt"],
      "text": "给您发过去了,查收一下。需要我把文件内容识别出来给您看吗?",
      "mode": "sendFileToChat"
    }
    
  6. 智能体回复(原样输出上面的 JSON)

Windows 示例用户说:"把 report.docx 发给我"

智能体操作

  1. 查找文件:Get-ChildItem -Path "$env:USERPROFILE\Downloads" -Filter "*report.docx*" -File
  2. 找到绝对路径C:\Users\lifang\Downloads\report.docx
    • ✅ 也支持:C:/Users/lifang/Downloads/report.docx
    • ❌ 错误:report.docx
    • ❌ 错误:Downloads\report.docx
  3. 确定回复文本:"文件已发送,请查收"
  4. 调用脚本:python3 "${SKILL_DIR}/scripts/assemble_send_instruction.py" --file "C:\Users\lifang\Downloads\report.docx" --text "文件已发送,请查收"
  5. 脚本输出:
    {
      "filePaths": ["C:\\Users\\lifang\\Downloads\\report.docx"],
      "text": "文件已发送,请查收",
      "mode": "sendFileToChat"
    }
    
  6. 智能体回复(原样输出上面的 JSON)

为什么必须用绝对路径?

  • 脚本可能在不同目录下运行
  • ~ 是 shell 扩展,Python 脚本可能无法正确解析
  • 绝对路径确保文件能被准确找到和发送

跨平台路径格式:

  • macOS/Linux/银河麒麟/UOS/home/用户名/Downloads/文件.txt
  • WindowsC:\Users\用户名\Downloads\文件.txtC:/Users/用户名/Downloads/文件.txt

Metadata

Stars4473
Views0
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-billyang1222-yunjia-file-transfer": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.