360 Secure SkillHub
360 安全技能中心

Fast Image

通过 Node 脚本把本地图片发送到指定频道和用户或群组:小于 10MB 的图片直接复制到本地媒体目录,大于等于 10MB 的先用 sharp 压缩,再经 openclaw 消息命令发送,发送后清理临时文件。

deadlining
deadlining
热度 63.52
最近更新 2026-05-18 12:15:44
分类:协作依赖:代码执行 / 读写文件应用场景:工作流 / 自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add fast-image
Metadata
name
fast-image
description
Quickly send local images to channel. Auto-compress large images, copy small images directly.
metadata
{"openclaw":{"keywords":["image","send image","media","photo","send"]}}

fast-image

Quickly send local images to specified channel. Auto-handles image copy/compress and send.

Usage

node {baseDir}/send_image.mjs "<image_path>" <channel> <target> [message]

Parameters

Parameter Description Required
image_path Full path to image Yes
channel Target channel name Yes
target Target user/group Yes
message Optional message No

Features

  1. Image processing

    • File < 10MB: Copy directly to ~/.openclaw/media/browser/
    • File >= 10MB: Compress with sharp then copy
  2. Send: Use openclaw message send --media to send

  3. Cleanup: Auto-delete temp file after sending

Examples

node {baseDir}/send_image.mjs "~/Pictures/photo.png" telegram @chatname
node {baseDir}/send_image.mjs "~/Downloads/large.jpg" telegram @chatname "landscape"

Dependencies

  • Node.js
  • sharp: npm install sharp
  • openclaw CLI