image-compress

image-compress is a skill for Claude Code, Codex from dongsheng123132/u-claw. It costs 34 tokens per session (498 once invoked), scanned A, original, MIT.

A local tool for shrinking images, changing their dimensions, and converting between JPG, PNG, and WebP formats. It can process one image or all matching images in a folder.

In plain words
What is it for?
Use it to compress photos, resize images by width or percentage, convert image formats, or turn a folder of JPG and PNG files into WebP files.
Why use it?
It reduces file sizes for email, messaging, and websites while keeping the original files separate by default. Processing stays on the local machine, so photos are not uploaded.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit Use it to compress photos, resize images by width or percentage, convert image formats, or turn a folder of JPG and PNG files into WebP files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dongsheng123132/u-claw/image-compress
About the project

U-Claw is a portable AI workspace that places an OpenClaw assistant, its configuration, memory, sessions, and tools on a USB drive. Users set it up on supported computers and carry the workspace between them, configuring a model with their own API key. The catalogue contains skills and instructions related to using or preparing this portable setup.

dongsheng123132/u-claw · 1,748 stars · on GitHub · u-claw.org

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dongsheng123132/u-claw --skill image-compress
Clone the repo
git clone --depth 1 https://github.com/dongsheng123132/u-claw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for image-compress

README.md
[![agentmods](https://agentmods.dev/badge/skills/dongsheng123132/u-claw/image-compress/github.svg)](https://agentmods.dev/skills/dongsheng123132/u-claw/image-compress)
Your own site
<a href="https://agentmods.dev/skills/dongsheng123132/u-claw/image-compress"><img src="https://agentmods.dev/badge/skills/dongsheng123132/u-claw/image-compress/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for image-compress

Your own site · 80×15
<a href="https://agentmods.dev/skills/dongsheng123132/u-claw/image-compress"><img src="https://agentmods.dev/badge/skills/dongsheng123132/u-claw/image-compress.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 498 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00498
Opus 5 $0.00017 $0.00249
Sonnet 5 $0.00007 $0.00100
Haiku 4.5 $0.00003 $0.00050

Measured 13d ago against content hash 92ff4e8b367a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

image-compress scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

portable/skills-cn/image-compress/SKILL.md · 51 lines

What it actually says

图片压缩 / 转换

帮用户压缩图片体积、调整尺寸、转换格式,全部本地处理,照片不外传。

能力概述

  • 压缩:降低体积(控制质量/分辨率),适合发邮件、传微信
  • 改尺寸:按宽高或百分比缩放
  • 转格式:jpg / png / webp 互转(webp 体积最小)
  • 批量:处理整个文件夹

操作方式

用 Bash 工具,Python 的 Pillow 库(跨平台、纯本地):

python -c "import PIL" 2>/dev/null || pip install -q Pillow

# 单张压缩(质量 75,宽度限制 1600px 等比缩放)
python - <<'PY'
from PIL import Image
im = Image.open("input.jpg")
if im.width > 1600:
    im = im.resize((1600, int(im.height*1600/im.width)))
im.convert("RGB").save("output.jpg", "JPEG", quality=75, optimize=True)
print("已压缩 -> output.jpg")
PY

# 批量:当前目录所有 jpg/png -> webp(体积更小)
python - <<'PY'
from PIL import Image
import glob, os
for f in glob.glob("*.jpg") + glob.glob("*.png"):
    out = os.path.splitext(f)[0] + ".webp"
    Image.open(f).save(out, "WEBP", quality=80)
    print(f"{f} -> {out}")
PY

使用建议

  • 处理前 ls -lh 看原图体积,处理后再 ls -lh 对比,告诉用户压缩了多少
  • 默认不覆盖原图(输出新文件名),除非用户明确要求覆盖
  • 含透明通道的 PNG 转 JPG 会丢透明,转 webp 可保留——按需选格式
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 51 lines · 34 tokens per session scan A 92ff4e8b367a

Subscribe to this mod's changes

image-compress is a skill published in the GitHub repository dongsheng123132/u-claw (1,748 stars, last pushed 5d ago), licensed MIT. It adds 34 tokens to every session and 498 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

qa-testing

Verify your work by actually operating the app or website you changed, instead of assuming it works. Strongly recommended whenever you build, modify, or debug a web app, website, or desktop GUI app. Drive real browsers with the agent-browser CLI and native desktop apps with the cua-driver CLI. These are installed on…

openinterpreter/openinterpreter · 77 tokens

codex-app-threads

Create, list, read, message, wait on, fork, rename, archive, and pin Codex threads (sidebar tasks), plus automations and app navigation, using the app-native codexapp tools. Use when the session uses a custom (non-OpenAI) model, for example deepseek-v4-flash or mimo-v2.5, and the user asks to create a thread or a new…

duolahypercho/codex-router · 138 tokens

codex-router-media

Generate video, music, speech, or images with the operator's MiniMax Token Plan subscription through the codex-router media CLI. Use when the session runs a MiniMax custom (non-OpenAI) model (for example minimax-m3) with the MiniMax Token Plan provider connected, and the user explicitly asks to create a video, a song…

duolahypercho/codex-router · 97 tokens

codex-computer-use

Control local apps through Computer Use (the @oai/sky runtime) inside the Codex app. Use when the session uses a custom (non-OpenAI) model, for example deepseek-v4-flash or mimo-v2.5, and the user asks to control the computer, operate a desktop app's UI, use Safari or Chrome through computer use, click or type in an…

duolahypercho/codex-router · 110 tokens

codex-in-app-browser

Drive the Codex in-app browser (open, navigate, click, type, screenshot, read page state) through the app's own noderepl runtime. Use when the session uses a custom (non-OpenAI) model, for example deepseek-v4-flash or mimo-v2.5, and the user asks to use the in-app browser, open or navigate a page in it, test a local…

duolahypercho/codex-router · 111 tokens

codex-router

Orientation for custom (non-OpenAI) models running in the Codex app through the codex-router proxy. Explains that the app's native tools arrive as flattened codexapp and mcp names, that the router restores them so the app executes them, which companion skills to read before threads, browser, or computer-use work, and…

duolahypercho/codex-router · 157 tokens