Agent skill

Image Compress

by dongsheng123132 in dongsheng123132/u-claw

图片压缩/转换 - 批量压缩、改尺寸、转格式(jpg/png/webp),本地处理不失隐私. An agent skill from dongsheng123132/u-claw.

MITAuto-check passedDocuments & Office

Install Image Compress

skills CLI
$ npx skills add dongsheng123132/u-claw --skill image-compress -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dongsheng123132/u-claw image-compress --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dongsheng123132/u-claw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/portable/skills-cn/image-compress .claude/skills/image-compress && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
image-compress
GitHub stars
1.8k
Token cost
~274 tokens
SKILL.md length
35 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

图片压缩/转换 - 批量压缩、改尺寸、转格式(jpg/png/webp),本地处理不失隐私. An agent skill from dongsheng123132/u-claw.

  • Documents & Office work in your project
  • SKILL.md covers 能力概述, 操作方式 and 使用建议
  • Calls python and pip

What it does

Image Compress is an agent skill from dongsheng123132/u-claw. 图片压缩/转换 - 批量压缩、改尺寸、转格式(jpg/png/webp),本地处理不失隐私

Its SKILL.md is about 270 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office. The repository describes itself as: U-Claw 虾盘 — OpenClaw AI 助手离线安装 U 盘:一键装好 Claude Code/Codex/OpenClaw,无需联网即插即用;新品 U-King AI 装机管家详见 u-king.org,另有远程支持与定制 AI 开发。 The licence is MIT.

When your agent uses it

  • Documents & Office work in your project

Example prompts

  • “/image-compress”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 9e769e6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Image Compress loads about 274 tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 35 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~15
When it runs · the whole SKILL.md, loaded when a task matches
~274

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dongsheng123132/u-claw at commit 9e769e6, republished under its MIT licence (© dongsheng123132). 35 words, ~274 tokens.

Download SKILL.mdSave it as .claude/skills/image-compress/SKILL.md (or your agent's skills folder).
name
image-compress
description
图片压缩/转换 - 批量压缩、改尺寸、转格式(jpg/png/webp),本地处理不失隐私

图片压缩 / 转换

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

能力概述

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

操作方式

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

bash
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 可保留——按需选格式

© dongsheng123132, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in portable/skills-cn/image-compress of dongsheng123132/u-claw.

Open the folder on GitHubat commit 9e769e6

Compare with similar skills

Image Compress next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Image Compress compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Image Compress this skilldongsheng123132/u-claw1.8k—~274Automated safety check: PassMIT
Markdown Article FormatterJimLiu/baoyu-skills27k6 repos~3.5kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Obsidian MarkdownAtmosphere/atmosphere3.8k20 repos~1.3kAutomated safety check: PassApache-2.0
DOCXrvdbreemen/OTGW-firmware20733 repos~4.3kAutomated safety check: PassProprietary
Word Document Reader and WriterHKUDS/DeepTutor41k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    27k GitHub starsUsed in 6 repos~3.5k tokens
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed
  • DOCX

    rvdbreemen/OTGW-firmware

    A skill your agent uses whenever the user wants to create, read, edit, or manipulate Word documents (.docx files).

    207 GitHub starsUsed in 33 repos~4.3k tokens
    Documents & OfficeAuto-check passed
  • Reads, creates and edits Word .docx files with python-docx, and drops to raw OOXML for tracked changes, comments and byte-exact edits.

    41k GitHub stars~2.5k tokensUpdated 3 days ago
    Documents & OfficeAuto-check passed
  • Crossposting

    wasp-lang/wasp

    Crosspost Wasp blog articles (MDX) to DEV.to and Medium. An agent skill from wasp-lang/wasp.

    19k GitHub stars~1.1k tokensUpdated today
    Documents & OfficeAuto-check passed

More from dongsheng123132/u-claw

All 17 skills in this repo
  • Deepseek Helper

    dongsheng123132/u-claw

    DeepSeek API 助手 - 编程辅助、模型选择、API调用指南、定价信息. An agent skill from dongsheng123132/u-claw.

    1.8k GitHub stars~367 tokensUpdated 4 days ago
    Auto-check passed
  • Web To Markdown

    dongsheng123132/u-claw

    网页转 Markdown - 抓取任意网页正文并转成干净的 Markdown,便于阅读/收藏/二次创作. An agent skill from dongsheng123132/u-claw.

    1.8k GitHub stars~347 tokensUpdated 4 days ago
    Auto-check passed
  • China Translate

    dongsheng123132/u-claw

    中英互译 + 本地化 - 技术翻译、UI本地化、文化适配、避免机翻腔

    1.8k GitHub stars~526 tokensUpdated 4 days ago
    Auto-check passed
  • Ppt Designer

    dongsheng123132/u-claw

    PPT 演示助手 - 幻灯片设计、内容结构、视觉优化、动画建议、演讲稿

    1.8k GitHub stars~415 tokensUpdated 4 days ago
    Auto-check passed
  • Bilibili Helper

    dongsheng123132/u-claw

    B站内容助手 - 视频标题描述优化、标签策略、封面设计建议、分区选择、评论互动

    1.8k GitHub stars~380 tokensUpdated 4 days ago
    Auto-check passed
  • China Search

    dongsheng123132/u-claw

    国内搜索引擎 - 百度、搜狗、Bing中国搜索,绕过GFW限制

    1.8k GitHub stars~385 tokensUpdated 4 days ago
    Auto-check passed

Questions about Image Compress

What does Image Compress do?

图片压缩/转换 - 批量压缩、改尺寸、转格式(jpg/png/webp),本地处理不失隐私. An agent skill from dongsheng123132/u-claw. Image Compress is an agent skill from dongsheng123132/u-claw.

When should I use Image Compress?

Image Compress fits situations like: documents & Office work in your project.

How do I install Image Compress in Claude Code?

Run `npx skills add dongsheng123132/u-claw --skill image-compress -a claude-code`. Or copy the skill folder (portable/skills-cn/image-compress in dongsheng123132/u-claw) into .claude/skills/image-compress in your project. Claude Code loads it when a task matches its description.

How do I install Image Compress in Codex?

Run `npx skills add dongsheng123132/u-claw --skill image-compress -a codex`. Or copy the skill folder (portable/skills-cn/image-compress in dongsheng123132/u-claw) into .agents/skills/image-compress in your project. Codex loads it when a task matches its description.

Can I use Image Compress in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dongsheng123132/u-claw --skill image-compress -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/image-compress, .gemini/skills/image-compress, .github/skills/image-compress and .opencode/skills/image-compress in your project.

What does Image Compress need to run?

Going by SKILL.md and its folder, Image Compress needs the command-line tools its instructions call (python and pip). Our summary lists: Python 3.

Does Image Compress access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Image Compress safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Image Compress use?

Image Compress is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Image Compress use?

About 274 tokens (SKILL.md is roughly 1.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Image Compress?

Skills that share tags, products or a category with Image Compress: Markdown Article Formatter (JimLiu/baoyu-skills, 27k stars), Markitdown (ImCa0/just-laws, 781 stars), Obsidian Markdown (Atmosphere/atmosphere, 3.8k stars) and DOCX (rvdbreemen/OTGW-firmware, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Image Compress?

dongsheng123132 (a GitHub user) maintains it in dongsheng123132/u-claw, which has 1,759 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 6, 2026.

Source: dongsheng123132/u-claw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.