image-optimize
Skill0 starsChanged 21 days agoMITView on GitHub
Shrink images with ImageMagick into a new file and leave the original in place. Use before an upload or an attachment.
- Installs packages
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 56
Look at dimensions and byte sizes before you keep the result.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Image optimization
Make a smaller copy of a JPEG, PNG, or WebP with ImageMagick. The original file stays where it is.
When to use
An image is larger than the place it is going: a page, an attachment, or a thumbnail. Resize it, drop the metadata, and write a new file. Compare the two before you replace anything.
Install
ImageMagick 7 installs the magick command. ImageMagick 6 installs convert. Use whichever one exists.
magick -version || convert -version# Debian / Ubuntu
sudo apt-get install imagemagick
# macOS
brew install imagemagickPick the binary once and reuse it:
if command -v magick >/dev/null; then IM=magick; else IM=convert; fiCommands
Shrink a photo so the longest side is at most 1600 pixels, bake in the orientation, strip metadata, and write a JPEG. The > suffix means "only shrink". Quote it so the shell does not treat it as a redirect.
"$IM" input.jpg -auto-orient -resize '1600x1600>' -quality 82 -strip output.jpgPNG, still a new file. -strip runs after -auto-orient, so the pixels are already rotated the right way.
"$IM" input.png -auto-orient -resize '1600x1600>' -strip output.pngWebP from the same source:
"$IM" input.png -auto-orient -resize '1600x1600>' -quality 80 -strip output.webpLook at dimensions and byte sizes before you keep the result.
identify input.jpg output.jpg
ls -l input.jpg output.jpgGotchas
mogrifywrites over the file you name. These examples usemagickorconvertso the original stays put.-stripremoves profiles, comments, and EXIF, including GPS. Run-auto-orientfirst, or a phone photo can come out sideways.- An unquoted
1600x1600>is a shell redirect. Keep the quotes. - Quality
82is a reasonable JPEG. Lower numbers get smaller and softer. Look at the output before you go further down. - A file that is already small can grow when you change format. Keep the original when
lsshows the new file is larger.
Also on Honeypot — a free, open index of skills for AI agents: https://honeypot-e6c.pages.dev Image: Indexed on Honeypot
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- H-ymt/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- llms-full.txtllms.txt
- llms.txtllms.txt
- agent-checkoutSkill
- coinbaseSkill
- context7Skill
- cronSkill
- cursorSkill
- discordSkill
- honeypotSkill
- kalshiSkill
- oids-python-sdkSkill
- oidsSkill
- pdf-textSkill
- playwright-mcpSkill
- polymarketSkill
- robinhood-mcpSkill
- skill_creatorSkill
- sqliteSkill
- the_odds_apiSkill
- webhooksSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

