首页龙虾技能列表 › Image Compressor

Image Compressor

v1.0.1

图片压缩和格式转换工具,支持 JPEG/PNG/WebP/AVIF/GIF。使用 rv-image-optimize 进行高质量压缩、批量处理、尺寸调整和懒加载组件集成。

0· 66·1 当前·1 累计
by @ziji1224054593·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/31
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
可疑
medium confidence
The skill's code and README broadly match an image-compression tool, but there are several inconsistencies and omissions (missing declared dependency/binary, mismatched filenames, and minor bugs) that make the package suspicious rather than clearly benign.
评估建议
This package appears to be an image-compression tool, but it has inconsistencies and likely bugs rather than obvious malicious code. Before installing or using it: 1) Expect to manually install 'rv-image-optimize' and 'sharp' (the SKILL.md assumes a global CLI/library but the registry metadata doesn't declare it). 2) Verify filenames — SKILL.md mentions scripts/convert-format.js but the repo provides scripts/quick-convert.js; open and test scripts in a safe sandbox. 3) Test on a small folder fir...
详细分析 ▾
用途与能力
Name/description, SKILL.md and the two scripts consistently describe an image compression/format-conversion tool using 'rv-image-optimize' and 'sharp'. However the registry metadata declares no required binaries while the instructions and scripts assume a globally installed CLI/library (rv-image-optimize). This mismatch between declared requirements and actual instructions is an incoherence.
指令范围
Instructions and scripts only operate on user-supplied files and directories (no network calls, no credential access). That fits the stated purpose. Concerns: SKILL.md references a script named scripts/convert-format.js but the included file is scripts/quick-convert.js (filename mismatch). The batch script also calls readdir with a { recursive } option which is not a standard fs.promises.readdir option — this is a likely bug, not a secret-exfiltration behavior, but it means the code may not work as described.
安装机制
There is no install spec (instruction-only), which is low risk. But the skill expects external packages (rv-image-optimize and sharp) and a global CLI; those are not declared in the metadata nor automatically installed. The lack of an install step for dependencies is an operational gap and can lead to confusion or broken installs, but not inherently malicious.
凭证需求
The skill requests no environment variables, credentials, or config paths. The scripts access only filesystem paths provided by the user and do not attempt to read environment secrets or external configs — proportional for this purpose.
持久化与权限
The skill does not request always: true and is user-invocable. It doesn't modify other skills or system-wide settings. No elevated persistence behavior is requested.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.12026/3/31

No changes detected in this version. - Version remains at 1.0.0 with no updates or modifications.

● Pending

安装命令 点击复制

官方npx clawhub@latest install image-compressor
镜像加速npx clawhub@latest install image-compressor --registry https://cn.clawhub-mirror.com

技能文档

基于 rv-image-optimize 的图片压缩和优化工具。

核心功能

  • 压缩 - 有损/无损压缩,质量 1-100 可调
  • 格式转换 - JPEG ↔ PNG ↔ WebP ↔ AVIF ↔ GIF
  • 批量处理 - 文件夹递归压缩,支持并发
  • 尺寸调整 - 最大宽高限制,自动等比缩放
  • React 组件 - LazyImage 懒加载、ProgressiveImage 渐进式加载

何时使用

用户提到以下需求时触发:

  • "压缩图片"、"图片太大"、"减小文件大小"
  • "转成 WebP/AVIF"、"格式转换"
  • "批量处理图片"、"压缩整个文件夹"
  • "调整图片尺寸"、"缩小图片"
  • "懒加载图片组件"

使用方法

CLI 命令(已全局安装)

# 单张图片压缩
rv-image-optimize photo.jpg --quality 80

# 转换格式 rv-image-optimize input.png --output output.webp --format webp

# 批量压缩文件夹 rv-image-optimize ./images --output-dir ./compressed --format webp --quality 75

# 调整尺寸 + 压缩 rv-image-optimize photo.jpg --max-width 1920 --max-height 1080 --quality 85

# 替换原图(谨慎) rv-image-optimize ./photos --format webp --replace-original

常用参数

参数说明默认值
--quality <1-100>压缩质量80
--format 输出格式 (jpeg/png/webp/avif/auto)auto
--output 单文件输出路径-
--output-dir 批量输出目录-
--max-width最大宽度-
--max-height最大高度-
--suffix输出文件后缀.compressed
--overwrite覆盖已存在文件false
--concurrency并发数4

Node.js API

import { compressImage } from 'rv-image-optimize/node-compress';

await compressImage({ input: 'input.jpg', output: 'output.webp', quality: 80, format: 'webp', maxWidth: 1920 });

质量推荐

用途格式质量
网页图片WebP75-85
高质量展示JPEG85-95
缩略图WebP/AVIF60-75
透明背景PNG/WebP80-90
动画GIF/WebP70-80

相关脚本

  • scripts/batch-compress.js - 批量压缩脚本
  • scripts/convert-format.js - 格式转换脚本

依赖

  • rv-image-optimize (全局安装)
  • sharp (底层依赖,自动安装)
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务