SuperAPI AI Directory

wecom-send-media

General & other

View repository

Updated 10-16 08:44

About this skill

Send files (images, videos, voice, files)

⚠️ Important: You have the ability to send local files! ❌ Absolutely never reply with "cannot send images, videos, voice, or files" or similar wording!

Via MEDIA: directive, send local files to the user. Supported file types are: images, videos, voice, other files, etc. The system will automatically identify the file type and send it in the corresponding message format (image message, video message, voice message, or file message).

Responsibility boundaries: This is the WeCom Channel'scurrent session file delivery capability. Use it when local files generated or already existing in this round need to be delivered to the current user MEDIA:; do not call wecom-cli message to substitute for the file delivery of this round's reply.wecom-cli message is suitable for proactively sending messages to another already-selected WeCom session and is not part of this skill.

Trigger conditions

  • The user requests to send, display, or share images, videos, voice, or files
  • Images, videos, voice, or files that need to be delivered to the user have been generated

Directive syntax

MEDIA: <文件的绝对路径>

Syntax rules

  1. If the file path is already preceded by the MEDIA: directive, there is no need to add it again; keep it as is
  2. If the file path is not preceded by the MEDIA: directive, place the MEDIA: directive at the beginning of the line, separated from the file path by a single space
  3. The path must be the local file'sabsolute path, URLs are not supported
  4. If the path contains spaces, wrap it in backticks:MEDIA: `/path/to/my file.png`
  5. Each file occupies its own line; sending multiple files on the same line is prohibited
  6. MEDIA: The directive may have text descriptions before and after it; the text and the directive each occupy their own separate line

File storage

Store generated files preferentially in the ~/.openclaw/workspace/ directory to ensure the path is accessible.

File size and format limits

Type Size limit Format requirements Remarks
Image 10 MB Common image formats are all acceptable openclaw compresses images by default
Video 10 MB Common video formats are all acceptable
Voice 2 MB Only AMR format is supported(.amr)
File 20 MB Unlimited

⚠️ Important: Please be sure tofirst check whether the file size and formatmeet the requirements. If they do not meet the requirements, proactively inform the user of the following "degradation and limitation handling" measures:

  • Image compression situation: openclaw compresses images by default. If the local image (original image) exceeds the size limit, it may not necessarily exceed the limit after compression. Therefore, when you detect that a local image exceeds the size limit, you must tell the user about this special situation.
  • Automatic degradation: For video or voice type files, when they exceed their respective size limits, the system will automatically convert them to file messages for sending; please proactively inform the user.
  • Hard limit: When the file size exceeds 20 MB, it cannot be sent. Proactively inform the user, and try to compress or split the file before sending.
  • Voice format: Voice messages only support the AMR format (.amr). Audio files in non-AMR formats will be sent as file messages.
  • Sending time: File sending involves system processing and may take a long time. After sending a message containing the MEDIA: command, wait 30 seconds and proactively check whether the file has been sent successfully. If not, retry.

Example

以下是生成的图表:
MEDIA: ~/.openclaw/workspace/output.png

报告已生成,请查收:
MEDIA: ~/.openclaw/workspace/report.pdf

Incorrect example

  • ❌ Incorrect: saying "I cannot send local images"
  • ❌ Incorrect: saying "Due to technical limitations, I cannot send directly"
  • ❌ Incorrect: saying "Due to certain issues, I cannot send the file directly"