← Browse

@coderwanfeng/compress-image

A

压缩图片文件大小,通过调整质量参数控制输出体积。当用户提到压缩图片、图片减肥、缩小图片体积、降低图片质量时使用。

skillclaude

Install

agr install @coderwanfeng/compress-image --target claude

Writes 2 files into .claude/skills/, pinned to git-9929bb67.

  • .claude/skills/compress-image/SKILL.md
  • .claude/skills/compress-image/__init__.py

Document


name: compress_image description: 压缩图片文件大小,通过调整质量参数控制输出体积。当用户提到压缩图片、图片减肥、缩小图片体积、降低图片质量时使用。

compress_image Skill

压缩图像文件,以减小其文件大小,同时尽量保持视觉质量

功能描述

将图像文件压缩为更小的体积,通过调整压缩质量参数控制输出文件大小。

所属分类

office/skills/image/compress_image/

调用方式

from office.skills.image import compress_image

compress_image(
    input_file='./test.png',
    output_file='./test_compressed.jpg',
    quality=50
)

参数说明

参数类型必填默认值说明
input_filestr-需要压缩的输入图像文件的路径
output_filestr-压缩后的图像文件保存路径
qualityint-压缩质量等级,取值范围 0 到 95。值越高,质量越好,文件越大

返回值

None

使用示例

from office.skills.image import compress_image
compress_image(input_file='./photo.jpg', output_file='./photo_small.jpg', quality=30)

原始函数

office.api.image.compress_image

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-9929bb67f77c2026-07-31