CO

compress_image

Easily compress image files and adjust quality to reduce storage size.

Install

mkdir -p .claude/skills/compress-image && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10980" && unzip -o skill.zip -d .claude/skills/compress-image && rm skill.zip

Installs to .claude/skills/compress-image

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

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

Key capabilities

  • Compresses image files
  • Adjusts quality parameters
  • Reduces image file size

How it works

It compresses image files by adjusting quality parameters to reduce file size while maintaining visual quality.

Inputs & outputs

You give it
Image file path
You get back
Compressed image file

When to use compress_image

  • Reducing image file size for web
  • Optimizing large photos
  • Compressing assets for deployment

About this skill

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_filestr-需要压缩的输入图像文件的路径
output_filestr-压缩后的图像文件保存路径
qualityint-压缩质量等级,取值范围 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

When not to use it

  • When the user needs lossless compression
  • When the image format is not supported

Limitations

  • Quality parameter is lossy
  • Limited to supported formats

How it compares

It provides a simple, programmatic way to compress images within a Python environment.

Compared to similar skills

compress_image side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
compress_image (this skill)01moReviewBeginner
awq-quantization17moReviewAdvanced
gptq17moReviewAdvanced
autoresearch-speed01moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

awq-quantization

davila7

Activation-aware weight quantization for 4-bit LLM compression with 3x speedup and minimal accuracy loss. Use when deploying large models (7B-70B) on limited GPU memory, when you need faster inference than GPTQ with better accuracy preservation, or for instruction-tuned and multimodal models. MLSys 2024 Best Paper Award winner.

10

gptq

davila7

Post-training 4-bit quantization for LLMs with minimal accuracy loss. Use for deploying large models (70B, 405B) on consumer GPUs, when you need 4× memory reduction with <2% perplexity degradation, or for faster inference (3-4× speedup) vs FP16. Integrates with transformers and PEFT for QLoRA fine-tuning.

10

autoresearch-speed

tsilva

Unified Super Mario Bros emulator speed-improvement workflow for this repo. Use when Codex is asked to optimize, profile, benchmark, or coordinate self-improvement research for Super Mario Bros NES throughput, including N-agent proposal and implementation waves, Modal benchmark tournaments, stale ca

00

transmit-test

KI3P

Run the PTT signal integrity test on the radio transmitter hardware. Use when the user asks to test the transmitter, run a PTT test, check I/Q outputs, or verify transmit signal quality. Requires an Analog Discovery 2 connected to the radio.

00

gemini-logo-remover

bear2u

Remove Gemini logos, watermarks, or AI-generated image markers using OpenCV inpainting. Use this skill when the user asks to remove Gemini logo, AI watermark, or any logo/watermark from images.

9115

slack-gif-creator

anthropics

Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."

698

Search skills

Search the agent skills registry