SurgePixSurgePix
Home>Skills Library>Image Editing / Style Change

Image Editing / Style Change

Edit any photo with text prompts: change art style, recolor, replace elements, refine composition, or restyle reference images in one step. Perfect for AI photo editing, style transfer, illustration conversion, anime/watercolor/flat design looks, color grading, and iterative regenerations when you need a fast AI image editor that follows your references and instructions.

npx skills add https://github.com/surgepix/agent-skills --skill surgepix-image-edit
Download ZIPGitHub

SurgePix Image Editing

Edit an image via the platform API based on submitted reference images and a text edit instruction (change style, recolor, replace elements, adjust composition, etc.), and return a download link for the edited image.

What the Skill Does

ActionDescription
Edit an imageSubmit one or more reference images via --reference
Change styleChange art style, color scheme, texture, etc. through a text instruction (e.g. "make it illustration style", "black and white", "warm tones")
Cross-skill adjustmentTakes over results from other generation-type skills and continues adjusting / regenerating on top of them
Reference-image drivenEvery submitted image participates in the edit as a reference; the result follows the reference content and style
Set output sizeSpecify the output image width and height via --size; when omitted,defaults to the reference image (the first one when multiple)
Check task statusWhen run with --nowait true, look up via taskId using surgepix-query-task
Download resultReturns a download link for the edited single image
By default (--nowait false) the API waits for completion and returns the final download link directly.
Pass --nowait true to get a taskId immediately; then check progress via the surgepix-query-task skill.

Workflow

  1. Step 0: Check environment (required)

    Before running, verify config:

    node "<skills-dir>/surgepix-setup/scripts/check_env.mjs"
    • Exit 0 → proceed to Step 1
    • Exit 1 → configure .env following the surgepix-setup skill, then retry
  2. Step 1: Gather inputs

    Everything is entered via parameters (this skill has no dialogue step).

    • Reference image (required, at least one): a local file path or an image URL; repeatable for multiple images. Every submitted image participates in the edit as a reference. Accepts:
      • Local file path (e.g. ./photo.png)
      • URL pointing to an image
    • Prompt (required): the edit instruction. State clearly what to change about the reference image (style / color scheme / elements / composition / mood), e.g. "turn the image into anime illustration style", "switch the whole image to warm tones", "replace the background with a beach".
    • Size (optional): output size as WxH, eg. 1024X1024, 1920x1080. When the user provides one, it takes priority; when omitted, defaults to the size of the submitted reference image — the first one when multiple.
    • Session ID (optional): for session grouping. sessionId can be reused across skills; it only serves to show this result together with previous generation results in the same frontend session history. When switching to this skill to adjust a result from another generation-type skill because the user is not satisfied with it, reuse the sessionId (number type) output by that skill; omit it on a brand-new request and the platform auto-creates a new session.
    • Validate every reference image before submission:
      • Supported formats: JPEG / JPG / PNG / WEBP
      • Max size: 20MB each
      • If the format is unsupported or the file is too large, tell the user and ask them to replace the file.
    • Local reference image → the script uploads it automatically, then calls the API
    • Image URL → used directly by the script
  3. Step 2: Run image-edit

    node "<skills-dir>/surgepix-image-edit/scripts/image_edit.mjs" \
      --reference "<path-or-url>" [--reference "<path-or-url>" ...] \
      --prompt "<edit instruction>" \
      [--size <WxH>] \
      [--session-id <id>] [--nowait <true|false>]
    FlagDescription
    --reference <path-or-url>Reference image (local paths are auto-uploaded; repeatable; at least one required)
    --prompt <text>Edit instruction (required): what to change
    --size <WxH>Output size as WxH;when omitted, defaults to the reference image (the first one when multiple); a user-provided value takes priority
    --session-id <id>Session ID (number type); can be reused across skills, only to show results in the same frontend session history
    --nowait <true|false>Wait mode, default false (see below)

    The request is always submitted asynchronously. --nowait false (default) makes the script poll internally until completion and return the final download ; --nowait true returns the taskId immediately, to be resolved later via the surgepix-query-task skill.

  4. Step 3: Parse output

    Sync success (--nowait false, stdout):

    {"ok":true,"taskId":"task_xxx","sessionId":123,"progress":"succeeded","download":"https://...images.zip","resultType...":4,"resultType":"zip","note":"API 仅返回 ZIP 下载地址,不含单张图片 URL;禁止编造单张链接"}

    Async submitted (--nowait true, stdout) — resolve later with the surgepix-query-task skill:

    {"ok":true,"async":true,"taskId":"task_xxx","sessionId":123,"progress":"processing","download":null,"resultType":"..."}

    Failure (stderr):

    {"ok":false,"error":"..."}
  5. Step 4: Present result

    • On success: Show only the download URL from script output. Always show sessionId (note: it is a number type, e.g. 123 ) so the user can pass it in a retry if needed.
    • On failure: Report the error field. Common causes:
      • missing_required_param — no reference image or --prompt provided
      • unsupported_image_format — file format not supported
      • image_too_large — file exceeds 20MB
      • invalid_param_value — --size invalid format or value
      • generation_failed — internal error; retry or simplify the instruction

More skills from SurgePix

Presentation Creator

Generate AI-powered presentations from a prompt, outline, or document.

Poster Creator

Generate AI-powered event posters from structured event details and creative direction.

Illustration Creator

Generate 16:9 horizontal article illustrations (hand-drawn style) from a topic or per-shot specifications.

XHS Creator

Generate Xiaohongshu vertical carousel image sets from per-page copy descriptions.

Brand Logo Generator

Generate a brand logo image from a text description plus optional reference images.

Film Storyboards Generator

Generate film storyboard images from a script / storyboard description.

Generate Photo-poetic Editorial Artwork from an Image

Generate photo-poetic editorial artwork from uploaded images.

Generate Restaged Cinematic Artwork from an Image

Generate restaged cinematic artwork from one or more uploaded photos.

Generate Brand Placement

Generate images while locking a brand logo and/or fixed text to a consistent position.

Generate Channel Crop Pack

Generate a channel crop pack from one or more source images.

Background Remover

Generate AI-powered transparent PNGs by removing image backgrounds.

Image Translator

Translate text on one or more images to a target language while preserving the background.

PPT Translator

Translate all text content in a PowerPoint (.pptx) file into a target language.

SurgePixSurgePix

Create & Edit Visuals with AI

Contact UsXDiscordEmail[email protected]
ToolsPDF to JPG converterPNG to JPG converterJPG to PDF converterHEIC to PDF converterHEIC to PNG converterImage ResizerAI Image EditorYouTube Banner MakerAI HairstyleFather's day 2026Mother's day 2026Bar Graph MakerPie Chart MakerVenn Diagram Maker
Helpful ResourcesTate-A-TateSurgeflowSkills LibraryPresentation CreatorPoster CreatorIllustration CreatorXHS CreatorBackground RemoverImage TranslatorPPT TranslatorBrand Logo GeneratorFilm Storyboards GeneratorGenerate Photo-poetic Editorial Artwork from an ImageGenerate Restaged Cinematic Artwork from an ImageGenerate Brand PlacementGenerate Channel Crop PackImage Editing / Style Change

© 2026 SurgePix. All rights reserved. Made with ❤️ for productivity.