agentleFS
glifxyzglifxyz/glif-mcp-server/skills/edit-images/SKILL.md

edit-images

Skill213 starsChanged 38 days agoMITView on GitHub

Edit an existing image with Glif: remove the background, erase or replace objects, expand the canvas, restore or upscale, retouch, restyle or change one detail. Saves the result next to the original without overwriting it. Use when: "remove the background", "make this a transparent PNG", "cut out the product", "erase X from this photo", "replace the sky", "expand this image to landscape", "make it 16:9 without cropping", "upscale this", "restore this old photo", "retouch this portrait", "restyle this as pixel art", "edit this image", "keep everything else identical". NOT for: new images from scratch (use make-images), animating an image (use audio-and-video), logos (use app-icons-and-logos).

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never overwrite the source file.

    line 41
  2. Very specific:

    Use suffixes like -nobg, -wide, -2x, -restored or -v2.

    line 48

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

Change an image the user already has. The user's explicit instructions come first, within host safety rules.

1. Get the image to Glif

  • A file in the project or on disk: call upload_file with only filename (plus kind: "image" if unclear), then run the returned command with the real path.
  • A public link: pass it as url.
  • An image in a saved Glif project: pass that project's project_id and name the image in the brief.
  • Several images that need the same edit: upload them all and edit them in one run.

Pass the returned fileUrl values in attachments.

2. Say exactly what changes

Name the edit, then say what must stay the same. "Keep everything else identical" works well.

EditPut in the brief
Remove background"Transparent PNG, keep fine edges like hair." Say whether to crop to the subject or keep the canvas.
Erase or replaceWhat to remove, and what fills the gap.
Expand (outpaint)The new aspect ratio or pixel size, and which side to grow.
Restore or upscaleThe target size. For old photos: fix scratches and fading, keep faces true.
RetouchLighting, skin, color. Keep the person recognizable.
RestyleThe style, such as Ghibli, oil painting or pixel art, and what must stay, such as pose and layout.
Fix textThe exact new text in quotes. Check it letter by letter afterward.

Edit photos of real people only with their permission. Don't change someone's identity, age or body in a misleading way.

3. Run once

An edit request is approval to spend credits. Call compose_project once with the brief and attachments, share the projectUrl, then call get_job_status with the jobId as job_id. Never retry a failed edit on your own.

4. Save next to the original

Never overwrite the source file. Download beside it with a suffix that says what changed:

curl -fsSL "<media url>" -o public/images/product-nobg.png
file public/images/product-nobg.png

Use suffixes like -nobg, -wide, -2x, -restored or -v2. Check the pixel size and, for cutouts, that the PNG has an alpha channel. Update code references only if the user asked to swap the image.

To change one more thing, continue the same project with its project_id and say "same image, now also...".

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.