image-edit
Skill1.4k starsChanged 6 months agoMITView on GitHub
Edit images with precision — crop, resize, mirror, rotate, trim, and reframe. Use this skill whenever the user asks to crop, resize, trim, mirror, flip, rotate, reframe, or otherwise manipulate an image. Also use for creating square crops, portraits/headshots from full-body images, icon sizes, or any image transformation. Even if the request sounds simple, this skill prevents common pitfalls and ensures correct results on the first try.
- Installs packages
12 other projects use a version of this.
Trending
Quiet since April.thin dataabout the whole repository
Most recently taken up by
- ofoxai/skillstheir own version, first seen Sep 22, 2026
- genmedia-labs/skillstheir own version, first seen Aug 12, 2026
- danielgwilson/luxintheir own version, first seen Aug 5, 2026
- meitu/meitu-skillstheir own version, first seen Jun 15, 2026
- m-binimran/design-packtheir own version, first seen Jun 14, 2026
- squarerf/claude-skillstheir own version, first seen May 31, 2026
Who's talking about peterkrueck/Claude-Code-Development-Kit
- A Hacker News story“My Personal Claude Code Development Kit”Hacker News · Jul 11, 2025 · 3 points
- UfoMiao/zcf“Miscellaneous set of tools”GitHub · Aug 18, 2025 · 2 reactions
- xiaolai/nlpm“Audit candidate: peterkrueck/Claude-Code-Development-Kit”GitHub · Apr 25, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
Used with
Projects with it also use image-inpainting, ace-step and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
prime-skillsSkillimage-inpainting
Mask-driven image inpainting on RunComfy via the `runcomfy` CLI. Routes to Tongyi MAI Z-Image Turbo Inpainting (the dedicated inpainting endpoint with mask, strength, and control-scale) and to identity-preserving edit models (Nano Banana 2 Edit, GPT Image 2 Edit, FLUX Kontext Pro) when a mask isn't available and the region must be described instead. Use for object removal, watermark removal, region replacement, blemish cleanup, and any controlled local edit where a binary mask defines the target area. Triggers on "inpaint", "inpainting", "image inpaint", "remove from image", "fill region", "mask-driven edit", "remove watermark", "remove object", "patch the photo", "fill the hole", or any explicit ask to edit a specific masked region of a still.
Also in 4 projects that use this
prime-skillsSkillace-step
Generate, inpaint, and outpaint music with ACE Step on RunComfy via the `runcomfy` CLI. ACE Step is StepFun-AI's open-weights music foundation model — tag-driven composition (genre, mood, instruments), multilingual lyrics with section markers, 5 s to 4 min stereo output, $0.0002–0.0003 per second (≈ 27× cheaper than ElevenLabs Music). Four endpoints: ACE Step text-to-audio (the default), ACE Step 1.5 text-to-audio (50+ language lyrics, refined structured-lyric handling), ACE Step audio-inpaint (regenerate a time range inside an existing track), ACE Step audio-outpaint (extend an existing track before or after). Triggers on "ace step", "ace-step", "acestep", "ACE music", "open music model", "cheap AI music", "inpaint audio", "audio inpaint", "extend music", "audio outpaint", "lengthen track", "music with tags", or any explicit ask to generate or edit music with ACE Step.
Also in 3 projects that use this
- +10 more from prime-skills
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- prime-skills/runcomfy-agent-skills★ 52same name
- meitu/meitu-skills★ 33same name
- genmedia-labs/skills★ 26same name
- runcomfy-com/skills★ 15same name
- tensorslab/skills★ 14same name
- choupiyang/ZAI_SKILLS★ 13same name
- m-binimran/design-pack★ 4same name
- danielgwilson/luxin★ 2same name
- ofoxai/skills★ 2same name
- squarerf/claude-skills★ 1same name
2 more not listed
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 repository10 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- templates/CLAUDE.mdCLAUDE.md
- bg-removeSkill
- context7-guidanceSkill
- deploySkill
- image-genSkill
- review-workSkill
- second-opinion-geminiSkill
- second-opinionSkill
- update-docsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 11 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Never guess crop coordinates from visual inspection.
- Distinctive: line 25
Always run the analysis script first to get exact pixel coordinates of where the actual content lives.
- Distinctive: line 31
Use the Read tool to look at the image.
- Distinctive: line 35
Run the bundled analysis script to find where content actually lives:
- Very specific: line 50
Use --threshold to adjust sensitivity (default 30).
- Distinctive: line 54
Use the analysis output to compute exact crop coordinates:
- Distinctive: line 56
Headroom: Add 40-70px above the content top
- Distinctive: line 59
Clamping: Ensure the crop region doesn't extend beyond image dimensions
- Distinctive: line 63
Use the bundled script. All operations are optional and composable — applied in order: crop -> mirror -> rotate -> resize.
- Distinctive: line 83
Important: Always save to a NEW file.
- Distinctive: line 87
Read the output image with the Read tool to visually confirm the result.
- Very specific: line 93
Use the appropriate suggested crop (upper_body, three_quarter, etc.)
- Very specific: line 104
Use --resize WxH to scale
- Distinctive: line 111
Start with the highest-resolution crop
- Very specific: line 112
Run multiple commands with different --resize values
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Image Edit — Crop, Resize & Transform
Precision image manipulation using Python/Pillow. This skill exists because macOS sips has unreliable crop offset behavior and visual inspection alone leads to bad coordinates — images often have hundreds of pixels of invisible padding that throws off naive crops.
Setup
The scripts need Pillow and numpy. Create a temp venv on first use:
python3 -m venv /tmp/imgcrop && /tmp/imgcrop/bin/pip install Pillow numpy -qThis only needs to happen once per session. The venv at /tmp/imgcrop persists until reboot.
The Golden Rule: Measure Before You Cut
Never guess crop coordinates from visual inspection. Images routinely have large invisible regions — transparent padding, solid-color borders, or dead space — that make visual estimates wildly wrong.
Always run the analysis script first to get exact pixel coordinates of where the actual content lives.
Workflow
Step 1 — Visual inspection
Use the Read tool to look at the image. Understand what's in it and what the user wants to focus on.
Step 2 — Analyze content bounds
Run the bundled analysis script to find where content actually lives:
/tmp/imgcrop/bin/python3 .claude/skills/image-edit/scripts/analyze_bounds.py <image_path>This outputs JSON with:
content_bounds— exact pixel coordinates of non-background contentpadding— how much dead space exists on each sidesuggested_square_crops— pre-calculated crop regions at different zoom levels:tight_head(35%) — face/head closeupupper_body(55%) — head through chest/armsthree_quarter(75%) — head through waistfull(100%) — entire subject
Use --threshold to adjust sensitivity (default 30).
Step 3 — Calculate crop coordinates
Use the analysis output to compute exact crop coordinates:
- Headroom: Add 40-70px above the content top
- Centering: Center horizontally on the content's center-x, not the image's center
- Aspect ratio: For square crops, use
max(width, height)as the side length - Clamping: Ensure the crop region doesn't extend beyond image dimensions
Step 4 — Apply operations
Use the bundled script. All operations are optional and composable — applied in order: crop -> mirror -> rotate -> resize.
/tmp/imgcrop/bin/python3 .claude/skills/image-edit/scripts/crop_image.py \
<input_path> <output_path> \
[--left L --top T --right R --bottom B] \
[--mirror horizontal|vertical] \
[--rotate DEGREES] \
[--resize WxH]Flags:
| Flag | Required | Description |
--left/--top/--right/--bottom | No (but all four if any) | Crop region in pixels. (0,0) is top-left. |
--mirror | No | horizontal (or h) flips left-right. vertical (or v) flips top-bottom. |
--rotate | No | Counter-clockwise degrees. 90/180/270 are pixel-perfect; other angles expand the canvas. |
--resize | No | Final dimensions, e.g. 512x512. Applied after all other operations. Uses LANCZOS resampling. |
Important: Always save to a NEW file. Never overwrite the original.
Step 5 — Verify
Read the output image with the Read tool to visually confirm the result. If it doesn't look right, adjust and re-run — the original is untouched.
Common Tasks
Square crop of a subject
- Analyze bounds to find content region
- Use the appropriate suggested crop (
upper_body,three_quarter, etc.) - Adjust for headroom and centering
Mirror an image
/tmp/imgcrop/bin/python3 .claude/skills/image-edit/scripts/crop_image.py \
input.png output-mirrored.png --mirror horizontalResize to specific dimensions
- Crop first if needed (to set the right aspect ratio)
- Use
--resize WxHto scale
Trim transparent/white padding
- Analyze bounds — the
paddingfield tells you how much dead space exists - Crop to
content_boundsplus a small margin (10-20px)
Generate multiple sizes (e.g., app icons)
- Start with the highest-resolution crop
- Run multiple commands with different
--resizevalues
Do NOT use macOS sips
The sips command-line tool has unreliable --cropOffset behavior. Use the Python scripts instead.
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.

