🖼️
AutomationPython

Compress Image

by CoderWanFeng

Compress Image is an Automation skill for Claude Code, published by CoderWanFeng in python-office.

1.3K stars299 forkson CoderWanFeng/python-officeAdded 2026/07/14Repository updated 2026/08/04
officepippypipythonweixin
Install in seconds
Install Compress Image
Copy Compress Image into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/CoderWanFeng/python-office/tree/develop/skills/image/compress_image ~/.claude/skills/compress_image

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/CoderWanFeng/python-office.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
skills/image/compress_image/SKILL.md in CoderWanFeng/python-office
Installs to
~/.claude/skills/compress_image
Collection
One of 50 skills cataloged from this repository
Category
Automation2226 skills

What Compress Image does

Compresses image files by adjusting quality parameters to reduce file size. Use when you need to shrink image volume or lower image quality for storage or transmission.

Compress Image is cataloged under Automation on DirSkills. Compress Image comes from a repository tagged office, pip, pypi, python and weixin.

Documentation

README

compress_image Skill

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

功能描述

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

所属分类

office/skills/image/compress_image/

调用方式

from skills.image import compress_image

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

参数说明

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

返回值

None

使用示例

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

原始函数

office.api.image.compress_image

Frequently asked about Compress Image

  • What else does CoderWanFeng publish alongside Compress Image?

    Compress Image is one of 50 skills that DirSkills catalogs from CoderWanFeng/python-office, the repository it ships in. Its siblings there include Add Image Watermark, Add Line by Type and Add Text Watermark. Each one is a separate skill with its own page in this directory, installs the same way Compress Image does, and is maintained by CoderWanFeng in that same repository. The rest of the collection is listed on the CoderWanFeng/python-office page.

  • How does Compress Image compare to other Automation skills?

    Compress Image ranks #648 by stars among the 2226 Automation skills in this catalog. The most-starred ones next to it are Autonomous Loops, Autonomous Agent Harness and Automation Audit Ops. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Compress Image against them. Open each page to compare what they document and how they install.