mcpField
Q
qqbot-media

qqbot-media

github.com/tencent-connectOther1.6k319 installsUpdated 2w ago
Repository

About qqbot-media

qqbot-media is a skill for sending and receiving media in QQBot conversations. It routes images, audio, video, and other files by extension, and downloads received images to a local path for reuse.

Key features

  1. 01Detect media type by extension
  2. 02Send local files or URLs
  3. 03Download received images locally
  4. 04Handle audio paths and transcription guidance
  5. 05Check file size before sending

Use cases

  1. 01Send an image or file in a QQBot conversation
  2. 02Forward a received local image
  3. 03Send an audio or video attachment
  4. 04Check whether an attachment exceeds size limits

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tencent-connect/openclaw-qqbot --skill qqbot-media

After installing, type/qqbot-mediain Claude Code to confirm it loaded.

Details

From the project README

QQBot 富媒体收发

用法

<qqmedia>路径或URL</qqmedia>

系统根据文件扩展名自动识别类型并路由:

  • .jpg/.png/.gif/.webp/.bmp → 图片
  • .silk/.wav/.mp3/.ogg/.aac/.flac 等 → 语音
  • .mp4/.mov/.avi/.mkv/.webm 等 → 视频
  • 其他扩展名 → 文件
  • 无扩展名的 URL → 默认按图片处理

接收媒体

  • 用户发来的图片自动下载到本地,路径在上下文【附件】中,可直接用 <qqmedia>路径</qqmedia> 回发
  • 用户发来的语音路径在上下文中;若有 STT 能力则优先转写

规则

  1. 路径必须是绝对路径(以 / 或 http 开头)
  2. 标签必须用开闭标签包裹路径:<qqmedia>路径</qqmedia>
  3. 你有能力发送本地图片/文件——直接用标签包裹路径即可,不要说"无法发送"
  4. 发送语音时不要重复语音中已朗读的文字
  5. 多个媒体用多个标签
  6. 以会话上下文中的能力说明为准(如未启用语音则不要发语音)
  7. 发送前需检查文件大小,当文件超限时告知用户文件太大,QQBot 发送文件大小规则如下:
    • 图片:最大 30MB
    • 语音:最大 20MB
    • 视频:最大 100MB
    • 文件:最大 100MB

示例

这是你要的图片:
<qqmedia>/Users/xxx/photo.jpg</qqmedia>
<qqmedia>/tmp/tts/output.mp3</qqmedia>
视频在这里:
<qqmedia>https://example.com/video.mp4</qqmedia>
文件已准备好:
<qqmedia>/tmp/report.pdf</qqmedia>

Comments

Markdown supported