360 Secure SkillHub
360 安全技能中心

Weixin Send Media

该技能用于当前会话渠道为 openclaw-weixin 时,把本地图片、截图、PDF、DOCX/XLSX/PPTX 等文件直接发送到微信聊天中。要求使用绝对路径,导出文件放在 deliveries/日期/时间的交付目录,并通过 openclaw message send 命令附带账号、目标会话与媒体路径发送,发送后询问用户是否收到。

starlxa
starlxa
热度 47.23
最近更新 2026-05-11 17:36:49
分类:协作依赖:代码执行 / 读写文件应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add weixin-sender
Metadata
name
weixin-send-media
description
Send images, PDFs, and other local files into an OpenClaw Weixin chat. Use when the user asks to send a picture, screenshot, PDF, document, attachment, or other media/file in the current Weixin conversation.

weixin-send-media

Use this skill when the current channel is openclaw-weixin and the user wants a file or image delivered into chat.

Rules

  • Prefer sending the file directly instead of telling the user where it is.
  • Always use an absolute local path for generated files.
  • Before sending a user-facing export/share file, place it under deliveries/YYYY-MM-DD/HHMMSS/.
  • If the source file belongs to a project folder, keep the source there and create a share/export copy in the delivery folder.
  • If you need a test asset, generate a tiny file first, then send it.
  • For this environment, if no first-class messaging tool is available, use the OpenClaw CLI.

Send with CLI

Use:

openclaw message send \
  --channel openclaw-weixin \
  --account <account_id> \
  --target <chat_id_or_user_id> \
  --message "<optional caption>" \
  --media /absolute/path/to/file

Where to get values

  • account_id: use the trusted inbound metadata account_id for the current chat.
  • target: use the trusted inbound metadata chat_id for the current chat.
  • media: absolute path to the file you created or selected.

Typical uses

  • Send a generated PDF.
  • Send a generated PNG/JPG screenshot.
  • Send a DOCX/XLSX/PPTX file.
  • Send a local attachment as a quick delivery step after creating it.

Verification

After sending, briefly ask the user whether they received it.

Example

openclaw message send \
  --channel openclaw-weixin \
  --account 30c94de8bd87-im-bot \
  --target o9cq8086Br1CV1qVLcKn5WqTRpTE@im.wechat \
  --message "测试文件" \
  --media /root/.openclaw/workspace-wx-30c94de8/test.pdf