agentleFS
PrunaAIPrunaAI/pruna-skills/skills/image/p-image-edit/SKILL.md

p-image-edit

Skill20 starsChanged 44 days agoApache-2.0View on GitHub

Use when someone wants to edit an existing photo — change outfits or backgrounds, compose from reference images, or apply prompt-driven edits.

  • Reads credentials
  • Sends data out

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow each skill's Before generating / craft sections — do not restate guide content here.

    line 24
  2. Distinctive:

    Use a different skill instead:

    line 46
  3. Very specific:

    Use each response urls.get in input.images.

    line 64
  4. Very specific:

    Follow generation-diversity still-image prompt flow (edit section):

    line 105
  5. Very specific:

    Aspect ratio: prefer match_input_image for edits.

    line 113

≈ “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

Prerequisites

Install and load these skills before generating (skip if already in context via @pruna):

SkillDescriptionInstall
generation-diversityUse when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls.npx skills add PrunaAI/pruna-skills@generation-diversity -y
image-promptingUse when crafting still-image prompts for any generative model — composition, identity sheets, edits, try-on, and photoreal personas.npx skills add PrunaAI/pruna-skills@image-prompting -y
video-promptingUse when crafting video or motion prompts for any generative model — dramaturgy, camera, physics-safe motion, frame anchors, and clip chaining.npx skills add PrunaAI/pruna-skills@video-prompting -y
pruna-apiUse before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.npx skills add PrunaAI/pruna-skills@pruna-api -y

Or install the full suite once: npx skills add PrunaAI/pruna-skills@pruna -y

Follow each skill's Before generating / craft sections — do not restate guide content here.

Agent habit

In the first reply, name `p-image-edit` in backticks, confirm PRUNA_API_KEY, then ask for the source photo (and edit brief). Open intake → generation-diversity clarification intake when needed. Draft edits with Prompt craft (dynamic + faithful). Redirect to p-image-try-on when the job is garment fit from packshots.

Prompt craft (dynamic + faithful)

Edit prompts are surgical and request-locked. Change only what the user asked; keep everything else identical. Diversity applies to how you phrase the change — not to inventing a new scene.

DoDon't
Formula: Change [specific thing]. Keep [identity / pose / lighting / background] identical. (image-prompting edit craft)Make it better / mood-only rewrites that ignore the brief
Name every must-keep from the user (face, outfit, pose, background, product)Drop keep-clauses and hope the model preserves them
Fresh ritual seed from generation-diversity before drafting; vary free wording (materials, hex, camera nuance) when the brief allowsCopy this skill’s sample (soft gradient) when the user asked for something else
Point at refs when composing: face from image 1, outfit from image 2Vague combine these images
Show the edit prompt before POST when wording is not lockedSilent edit that changes subject, species, age, or unrequested regions

Fidelity check (before pay): the prompt must still satisfy the user’s change and every stated keep. If a keep is missing, add it. Do not “spice” the background/cast when they asked for a background-only swap.

When NOT to use

Use a different skill instead:

SkillDescriptionInstall
p-imageUse when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed.npx skills add PrunaAI/pruna-skills@p-image -y
p-image-try-onUse when someone wants virtual try-on — dress a person in clothes from reference photos for fashion or ecommerce.npx skills add PrunaAI/pruna-skills@p-image-try-on -y
p-image-upscaleUse when someone wants to upscale or sharpen an existing image for print, large crops, or higher-quality delivery.npx skills add PrunaAI/pruna-skills@p-image-upscale -y

HTTP (curl)

Upload references

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: ${PRUNA_API_KEY}" \
  -F "content=@/path/to/reference.png"

Use each response urls.get in input.images.

Create (async — recommended)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image-edit' \
  -d '{
    "input": {
      "prompt": "Change background to soft gradient, keep subject identical",
      "images": ["https://api.pruna.ai/v1/files/FILE_ID"],
      "aspect_ratio": "9:16"
    }
  }'

Poll and download: follow pruna-api.

Complete the random seed ritual from generation-diversity before writing prompts — do not pass the ritual string as API seed. Optional seed only when the user requests reproducibility.

Create (sync — quick test only)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image-edit' \
  -H 'Try-Sync: true' \
  -d '{
    "input": {
      "prompt": "Change background to soft gradient, keep subject identical",
      "images": ["https://api.pruna.ai/v1/files/FILE_ID"],
      "aspect_ratio": "9:16"
    }
  }'

Edit flow

Follow generation-diversity still-image prompt flow (edit section):

  1. Lock change + keeps — user’s surgical ask; formula in Prompt craft (dynamic + faithful).
  2. Upload refs — POST /v1/files; urls.get → input.images (1–5). Never invent file URLs.
  3. Ritual seed → draft edit prompt (image-prompting edit craft) → fidelity check (every keep clause present).
  4. Confirm — prompt, refs, aspect_ratio, turbo (off for hard edits).
  5. POST — async curl below; checklist before upscale/video.

Aspect ratio: prefer match_input_image for edits; output should keep the plate aspect — if drift occurs, retry with the same ref URL and explicit keep clauses.

Pruna note: avatar pipelines — edit from locked upscaled hero URL; upscale again before p-video* — never pass raw edit URLs to video models.

Not edit: new subject from scratch → p-image. Garment fit from packshots → p-image-try-on.

Multi-reference (up to 5): index refs by role — e.g. three-reference composite: face from image 1, outfit from image 2, cafe from image 3; turbo: false for hard composites. Full pattern in image-prompting p-image-edit-prompting.

Required input

  • prompt (string)
  • images (array of 1–5 URLs, typically https://api.pruna.ai/v1/files/{id})

Common optional fields

  • aspect_ratio: match_input_image, 1:1, 16:9, 9:16, etc.
  • turbo (boolean, default true; turn off for harder edits)
  • seed, disable_safety_checker

Typical next steps

Common follow-ons after this skill:

SkillDescriptionInstall
p-image-upscaleUse when someone wants to upscale or sharpen an existing image for print, large crops, or higher-quality delivery.npx skills add PrunaAI/pruna-skills@p-image-upscale -y
p-video-2-proUse when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts.npx skills add PrunaAI/pruna-skills@p-video-2-pro -y
p-video-2Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts.npx skills add PrunaAI/pruna-skills@p-video-2 -y
p-videoUse when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p.npx skills add PrunaAI/pruna-skills@p-video -y
p-video-editUse when someone wants to edit an existing video with a text instruction — recolor, restyle, remove or add objects, change environment or lighting, update on-screen text, or apply optional reference-guided product and accessory edits. Not for a new clip from scratch or ffmpeg assembly.npx skills add PrunaAI/pruna-skills@p-video-edit -y
p-video-avatarUse when someone wants a person on camera speaking a script — lip-synced host, spokesperson, or narrated avatar from a portrait photo.npx skills add PrunaAI/pruna-skills@p-video-avatar -y
avatar-multi-sceneUse when someone wants the same person hosting several clips — multi-segment UGC, comparison reels, or mixed speaking and animated scenes with continuity.npx skills add PrunaAI/pruna-skills@avatar-multi-scene -y
narrated-multi-sceneUse when someone wants a multi-part story with voiceover — episodic B-roll, chaptered promo, or several linked video scenes without on-camera dialogue.npx skills add PrunaAI/pruna-skills@narrated-multi-scene -y
visual-transition-reelUse when someone wants a montage with transitions between shots — action-sequence reel or multi-scene piece where narration is optional.npx skills add PrunaAI/pruna-skills@visual-transition-reel -y

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.