agentleFS
IRC-ireadcustomerIRC-ireadcustomer/claude-photo-retouch/skills/photo-retouch/SKILL.md

photo-retouch

Skill0 starsChanged 30 days agoMITView on GitHub

Retouch photos of people the way a pro retoucher, Meitu, FaceTune or Photoshop would - make a fat/round face slimmer and more defined (dodge & burn contour plus a gentle slim that keeps the chin), make someone look taller with longer legs, slim the body, remove acne/pimples/whiteheads while keeping skin texture, give skin a healthy tone, make eyes and brows clearer, fix ONE person who looks too dark or badly colour-graded, whiten teeth, blur the background, or liquify any shape. Use this whenever the user shares a photo with a person in it and wants them to look slimmer, taller, clearer-skinned, brighter or "beautified", in any language (Thai: หน้าอ้วน หน้ากลม หน้าเรียว หน้าคม ขาสั้น ขายาว ตัวเตี้ย สิว หน้าเนียน ผิวคล้ำ หน้าดำ ฟันขาว ตาโต หลังเบลอ แต่งรูป), even if they never say "retouch" or name an app.

  • Installs packages

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. GeminiLight/FrameLark★ 4same name
    2. NAMEWTA/wta-skills-hub★ 0same name
    3. vcompagnucci/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.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Proportions: after --taller, are the knees in a believable place and the feet unchanged?

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Photo Retouch

Portrait retouching driven by face/body landmarks and person segmentation (Google MediaPipe), so edits land on the right person and the right body part automatically. You look at the photo, decide what it needs, run one command, then look at the result and adjust. The looking is the important part: these are aesthetic edits, and the numbers only get you close.

The CLI lives next to this file: scripts/retouch.py. Point a variable at it and run it through uv, which installs its dependencies on first use:

S="<this skill's directory>/scripts/retouch.py"
uv run --script "$S" analyze photo.jpg

Below, RETOUCH is shorthand for uv run --script "$S". Write the command out in full each time; don't store it in a variable, because zsh does not word-split it. Without uv, use python "$S" with mediapipe installed. Every command prints one JSON object on stdout; progress goes to stderr.

Workflow

  1. Look at the photo first (Read the image file). Notice who is in it, what the user is unhappy with, and what could go wrong (busy background, several people, small faces). If it is HEIC, convert it: sips -s format jpeg in.heic --out in.jpg (macOS) or magick in.heic in.jpg.
  2. Analyze: RETOUCH analyze photo.jpg. You get each person's id (numbered left to right), bounding box, whether a face and full body were found, face_width_to_height, jaw_width_px (re-run analyze on the output to measure slimming), leg_to_height, skin colour (skin_lab: L = lightness 0-100) and how many blemishes were detected, plus an overlay image. View the overlay whenever there is more than one person or the request is about one specific person, so the --person id you pass is the person the user means.
  3. Edit: RETOUCH edit photo.jpg -o photo_retouched.jpg [flags]. Never overwrite the original; save beside it with a suffix unless the user gave a path. Several flags can go in one command; they are applied in an artefact-minimising order and all reshapes share a single resample.
  4. Compare and inspect: RETOUCH compare photo.jpg photo_retouched.jpg -o compare.jpg, then view it. To check detail (skin texture, leftover spots, a jawline against the background), zoom into a box of the original's pixels: RETOUCH compare photo.jpg photo_retouched.jpg --zoom X0,Y0,X1,Y1 -o zoom.jpg. The panels are enlarged and carry a grid labelled in original-image pixels. Go through the list in "Judging the result". If something is off, re-run edit from the original with adjusted values (not on top of the previous output, which stacks resampling and over-processes skin).
  5. Deliver: give the output path, say in a line or two what you changed and at what strength, and offer the obvious next adjustment ("want the face a bit slimmer, or the skin less smooth?"). Show the comparison image if the user can see images.

Read the JSON warnings: they tell you when an edit was skipped (no face found, legs not visible) or toned down (reshape too strong to stay tear-free). Tell the user about anything skipped rather than claiming it was done. When the canvas size is unchanged, change_by_person gives the mean pixel change on each person (0-255 scale). Use it to confirm that people you did not target stayed at ~0-1, which is just JPEG noise.

Retouch like a pro: light first, shape last

Professional retouchers make people look better without making them look edited. Follow their order and restraint:

  1. Clean the skin, keep the texture. Heal spots one by one (--remove-acne, then --heal for what it misses). Add only a little smoothing (--smooth-skin 0.2-0.3, the equivalent of Texture/Clarity -5 to -10). A maxed-out smooth turns skin into plastic with no pores.
  2. Sculpt with light, not with warping (dodge & burn): --contour. It adds a soft cast shadow just under the jaw (on the neck, never on the face) so the chin and jawline read as defined even under flat studio light, plus highlights on the forehead, nose bridge, cheekbone tops and chin. This is how a round or soft face is made to look more defined while it stays a real face. Don't flatten the face with brightening, because a face with no shadows has no structure.
  3. Make the eyes and brows clear: --define-eyes. The eyes get crisper but never brighter, and the brows are deepened only where there is hair. Glowing eyes and drawn-on brows are the fastest way to make a photo look edited.
  4. Healthy skin tone, the HSL orange move: --skin-glow. It makes skin a little brighter and a little less saturated (less yellow/red). Stop before it looks pale or ill.
  5. Reshape last and lightly. Legs: --taller 0.05-0.10, never the whole image, and watch poles and walls for bending. Face: --slim-face 0.3-0.5 tapers the jaw corners but deliberately leaves the chin, the ears and the jaw-to-neck edge alone. A face that loses its chin stops looking like the person.

What the user says, and what to run

Request (examples)FlagsStart atNotes
face too fat / round / chubby, double chin, "V-line", หน้าอ้วน หน้ากลม อยากหน้าเรียว หน้าคม--contour S --slim-face S0.5 / 0.5Contour does most of the work; the slim adds a gentle narrowing (0.5 ≈ 4% at the cheeks and jaw, 1.0 ≈ 8%; the chin stays put). Go above 0.6 slim only when asked.
make him/her taller, legs look short, ตัวเตี้ย ขาสั้น อยากขายาว--taller F0.05-0.10F = extra leg length (0.08 = legs 8% longer, max 0.35). Needs hips and ankles visible (full_body: true). The canvas gets taller; head, torso and feet keep their shape. Above 0.12, hands at hip level visibly lengthen.
slimmer body/waist/arms, ผอมลง เอวเล็ก--slim-body S0.3Squeezes everything below the neck toward the body's centre line (arms included). Needs shoulders and hips visible.
acne, pimples, whiteheads, spots, สิว ลบสิว หน้ามีตุ่ม--remove-acne [SENS]0.5Heals small red, dark and white bumps on the face. Raise to 0.6-0.7 if obvious spots remain, then --heal the rest; lower to 0.3 if moles or freckles the person probably wants to keep are vanishing.
neck lines, creases, marks on the neck, รอยที่คอ คอมีรอย ริ้วรอยคอ--soften-neck [S]0.8Frequency-separation crease removal plus neck spot healing; texture and the shadow under the jaw stay. Edits the neck only, so it is safe when the user wants "no face change".
neck darker than the face, shadowed neck, คอดำ คอคล้ำ--even-neck [S]0.7-0.8Brings the neck's lightness and colour toward the person's own face skin; the soft shadow right under the chin stays. Pairs well with --soften-neck.
smoother / clearer skin, หน้าเนียน ผิวใส--smooth-skin S0.2-0.30.25 natural, 0.5 beauty-app, 0.7+ airbrushed (avoid). Always pair with --remove-acne.
sharper / more defined face, หน้าคม มีมิติ--contour S0.4-0.6Dodge & burn only; no pixel moves.
eyes look tired or flat, คิ้วจาง ตาไม่มีประกาย--define-eyes S0.3-0.4Clarity on the eyes (no brightening), brow hairs slightly deeper.
healthier / brighter skin, skin looks yellow or red, ผิวหมอง หน้าเหลือง--skin-glow S0.3-0.5+6 L and -12% saturation on skin at 1.0.
one person looks dark / in shadow / bad colour grade, "only this person", ผิวคล้ำ หน้าดำ แสงไม่ถึง--person N --match-skin1.0Re-lights person N so their skin matches the other people in the photo (lightness by curve, colour 70% of the way). Add --tone-scope person when they are fully in shade (hair and clothes are lit too, but keep their own colours).
a single person looks too dark/dull, backlit--brighten B0.3-0.5Gamma lift: shadows rise, blacks and highlights stay. Use --tone-scope person for backlit subjects.
skin too yellow/orange or too pink/grey--warmth W, --tint T±0.2-0.4Warmth = blue↔yellow, tint = green↔magenta (negative tint removes redness).
whiter teeth, ฟันเหลือง--whiten-teeth S0.5Only affects bright, non-red pixels inside the lips.
bigger eyes, ตาโต--enlarge-eyes S0.15-0.25Above 0.4 looks cartoonish; --define-eyes is usually the better fix.
blurry background / portrait mode, หลังเบลอ--blur-bg S0.5Uses the person mask; no halo. Selected people (or everyone) stay sharp.
"beautify", "make it look like Meitu", แต่งให้สวยthe pro preset—--remove-acne --smooth-skin 0.2 --skin-glow 0.25 --contour 0.5 --define-eyes 0.35 --slim-face 0.4. For a full-body shot add --taller 0.07, plus --slim-body 0.4 if they want slimmer. This exact set was approved on a real studio portrait as natural; the stronger variant (slim-face 0.8 / slim-body 0.65) was rejected as worse.
anything shape-related the presets don't cover (a bulge, an arm, a waist on one side, a crooked smile)--liquify X1,Y1,X2,Y2[,R]—Drags content from (X1,Y1) toward (X2,Y2) with brush radius R (default 2.5x the drag). Repeatable. Keep each drag under ~5% of the face or body width with a radius 3-5x the drag; several gentle pushes look better than one big one.
a spot the detector missed (a mark on the neck, a scar the user wants gone)--heal X,Y,R—Heals a disc of radius R. Repeatable.

Coordinates for --liquify and --heal are pixels in the original image. Read them off the labelled grid on the analyze overlay, or off a compare --zoom of the original (zoom into the area, then read the spot's position against the grid labels). Don't estimate them from a downscaled view. Read positions from the before panel (the original); the after panel's labels are only for checking. For --heal, use a radius of the spot's visible radius plus 2-3 px (typically 4-8 px on a face 450 px wide). After --taller the output has extra rows, so a zoom box below the hips shows slightly different content in the "after" panel. Each panel's grid labels are that image's own pixels.

Small faces (face_width_px under ~150, as in full-body or group shots) get a conservative acne pass that may find nothing, because at that size spots are only a few pixels and a looser detector would start healing eye corners. If the user wants their skin cleaned up there, zoom in (compare --zoom on the face) and heal the visible spots with --heal X,Y,2.

Choosing strengths

Default to natural: the user should look like themselves on a good day. People notice a face that changed shape far more than skin that got clearer or light that got better, so be bold with acne, tone and contour and careful with reshaping. When the user says the face is still too round, raise --contour before --slim-face. If they want a strong "Meitu look", go up gradually and show them. When a request is vague ("make me look better"), use the pro preset without the slim, and offer reshaping instead of doing it unasked.

Targeting people

--person takes ids from analyze (1, or 0,2); without it every detected person gets the edit. Use it whenever the user singles someone out ("only my friend on the left", "just the girl in the black shirt"), and always for --match-skin, because the people you do not select are the reference.

--taller stretches whole image rows, so anyone else standing in the leg band gets longer legs too (the JSON warns you). For a group shot where only one person should be taller, tell the user that, or crop to that person first.

Judging the result

View the comparison and check:

  • Background bending: straight lines (door frames, tiles, wall seams) curving near the jaw or body. Lower the reshape strength, or move the edit with --liquify using a larger radius.
  • Plastic skin: uniform, poreless skin, especially on the cheeks and forehead. Lower --smooth-skin.
  • Leftover or wrongly removed spots: compare the faces closely. Adjust --remove-acne sensitivity or add --heal.
  • Wrong person or edges: did the edit spill onto a neighbour or the background? Check the overlay ids; use --tone-scope skin for a tighter mask.
  • Unnatural tone: a matched person who looks orange, grey or flat compared to the others. Try --match-skin 0.7 or switch scope.
  • Patch look (the "unfinished edit" tell): is the face brighter, smoother or pinker than the ears, neck and hands, or is there a dark band under the jaw? Lower --skin-glow/--smooth-skin/--contour. Every skin edit should cover all visible skin evenly.
  • Real face: is the chin still there and clearly separated from the neck (if it blends in, raise --contour)? Does the outline flow smoothly from ear lobe to jaw with no step? Are the cheeks still the person's own? If not, lower --slim-face and use --contour instead.
  • Proportions: after --taller, are the knees in a believable place and the feet unchanged? Hands hanging at hip level are inside the stretched band and get longer too; that is invisible at small stretches but shows above ~0.2. Values above 0.2 rarely look real anyway.

Limits worth knowing

  • Faces turned more than about 45° away, or very small (under ~40 px wide), may not get landmarks. The tool retries on an enlarged head crop, but if has_face is false, face edits are skipped. Use --liquify/--heal by hand.
  • People whose body is not detected (heavily cropped or occluded) can still get face and tone edits, but not --slim-body/--taller. If the frame cuts the legs at the shins, the ankles are estimated, so --taller lengthens the visible legs. With no feet to distort, these photos take more (0.15-0.20; 0.07 adds only ~2% to the image and is barely noticed).
  • "No face change" requests: --taller, --soften-neck, --slim-body, --blur-bg and --match-skin/tone edits with --tone-scope skin don't reshape the face. Verify with change_by_person or a zoom.
  • Reshaping moves background pixels next to the person; busy, geometric backgrounds show it most.
  • Up to 6 people per photo (PHOTO_RETOUCH_MAX_PEOPLE).
  • Reads JPEG, PNG, WebP, BMP and TIFF. The output format follows the -o extension (JPEG quality 95 by default).

Editing people respectfully

Treat skin tone work as fixing lighting and colour casts: bring someone out of shadow, or match them to the light the others are in. Don't push a person's natural complexion lighter or darker unless the user explicitly asks for that. If they do ask, it is their photo; do it, and keep it believable. Don't retouch a photo meant as identification or evidence (ID cards, documents, insurance claims) so that it misrepresents someone.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.