Image Compression

--- name: image-compression description: 自动检测图片大小,当图片超过 Telegram 发送限制时自动压缩。支持调整压缩后的宽度、质量和格式。 metadata: {"openclaw": {"os": ["darwin"], "author": "Honcy Ye", "email": "honcy.ye@gmail.com"}} ---

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Image Compression" with this command: npx skills add yeholdon/image-compression


name: image-compression description: 自动检测图片大小,当图片超过 Telegram 发送限制时自动压缩。支持调整压缩后的宽度、质量和格式。 metadata: {"openclaw": {"os": ["darwin"], "author": "Honcy Ye", "email": "honcy.ye@gmail.com"}}

图片自动压缩技能

自动检测图片大小,当图片超过 Telegram 发送限制(10MB)时自动压缩,确保图片能够成功发送。

功能特性

  • 自动检测:自动检查图片大小是否超过限制
  • 智能压缩
    • 调整图片宽度(默认 1024px)
    • 优化图片质量(默认 85%)
    • 支持多种格式(PNG、JPEG、GIF)
  • 保留原文件:压缩后生成新文件,不修改原文件
  • 输出文件名:自动添加 "_compressed" 后缀

使用场景

  • 发送大图片到 Telegram
  • 优化图片大小以减少网络传输时间
  • 确保图片符合特定平台的尺寸限制

技术实现

  • 使用 macOS sips 命令进行图片压缩
  • 支持调整压缩参数
  • 自动处理文件路径和文件名

依赖

  • macOS sips 工具(系统自带)

使用方法

# 压缩图片(默认参数)
bash scripts/compress_image.sh "/path/to/image.png"

# 自定义宽度
bash scripts/compress_image.sh "/path/to/image.png" 800

# 自定义宽度和质量
bash scripts/compress_image.sh "/path/to/image.png" 800 80

# 发送压缩后的图片到微信文件传输助手
bash scripts/compress_and_send.sh "/path/to/image.png" "文件传输助手"

配置选项

  • max_width:压缩后图片的最大宽度(默认 1024px)
  • quality:压缩质量(0-100,默认 85)
  • max_size:触发压缩的图片大小阈值(默认 10MB)

脚本说明

  • scripts/compress_image.sh:基本压缩功能
  • scripts/compress_and_send.sh:压缩后发送到微信
  • scripts/compress_and_send_telegram.sh:压缩后发送到 Telegram

示例

# 压缩并发送到微信
bash scripts/compress_and_send.sh "/Users/honcy/Desktop/screenshot_20260221_231100.png" "文件传输助手"

# 压缩并发送到 Telegram
bash scripts/compress_and_send_telegram.sh "/Users/honcy/Desktop/screenshot_20260221_231100.png" 5578370460

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Img2img

Generate images from text descriptions using DALL-E 3 while adhering to usage policies and avoiding realistic human faces.

Registry SourceRecently Updated
General

Habitat-GS-Navigator

Navigate and interact with photo-realistic 3DGS environments via the Habitat-GS Bridge. Use when: user asks to explore a 3D scene, perform embodied navigatio...

Registry SourceRecently Updated
General

Memory Palace

持久化记忆管理。Use when: 用户告诉你个人信息/偏好/习惯、需要记住项目状态/技术决策、完成任务后有可复用经验、用户说"记住""别忘了""下次注意"、需要回忆之前的对话内容。支持语义搜索和时间推理。

Registry SourceRecently Updated
General

Podcast Transcript Mining Authority Positioning

Extract guest appearances, speaking topics, and soundbites from podcast transcripts to build authority portfolios and generate podcast pitch templates. Use w...

Registry SourceRecently Updated