{"id":116083,"plugin_id":"plugin_asdk_app_6ae37a13301c81919b3c62b884f60c6b","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-25T18:15:58.125Z","digest":"33977ba448243d58fd693bfa83253c08521d26bb1425368a46c3626c63e34c84","against":null,"payload":{"description":"Use when generating or editing images with Scenario through MCP: text-to-image, image-to-image, instruction editing, inpainting or outpainting with a mask, background control, aspect ratio or resolution sizing, several outputs per run, or choosing between Scenario image models. Also when a run fails on prompt length, a plan-restricted model, or a reference image that was silently ignored. Keywords: txt2img, img2img, image edit, inpaint, mask, reference image, aspect ratio.","included_files":[],"name":"scenario-image","skill_md_contents":"---\nname: scenario-image\ndescription: \"Use when generating or editing images with Scenario through MCP: text-to-image, image-to-image, instruction editing, inpainting or outpainting with a mask, background control, aspect ratio or resolution sizing, several outputs per run, or choosing between Scenario image models. Also when a run fails on prompt length, a plan-restricted model, or a reference image that was silently ignored. Keywords: txt2img, img2img, image edit, inpaint, mask, reference image, aspect ratio.\"\nlicense: MIT\n---\n\n# Scenario Image Generation and Editing\n\n## Overview\n\nScenario runs hundreds of image models, split across `txt2img` (generate from a prompt) and\n`img2img` (edit, restyle, inpaint, upscale). The loop is the one the `scenario` skill teaches. What\nbreaks image runs is the per-model contract: sizing fields, prompt limits, and reference caps differ\nbetween two models that do the same job, so read `model_schema_get` every time. Per-family contracts\n(sizing families, reference caps, edit modes): `scenario-seedream`, `scenario-gpt-image`,\n`scenario-gemini-image`, `scenario-ideogram`, `scenario-reve`, `scenario-luma-image`,\n`scenario-mai-image`, `scenario-grok-imagine-image`. Upscaling, grading, effects, expand, resize and\nthe other tool models: see `scenario-image-editing`. Holding one look across a set: see\n`scenario-consistency`. One image from several references, each with one job:\n`scenario-multi-reference`. Sprites, icons, and tilesets: see `scenario-game-assets`. If a sibling\nskill named here is missing from your available skills, load it with `skill_get` (Scenario MCP) or\nask the user to install it (https://github.com/scenario-labs/skills#install); unattended, proceed\nfrom tool schemas and flag the gap.\n\n## Quick reference\n\n| Need              | Call                                                                                                   |\n| ----------------- | ------------------------------------------------------------------------------------------------------ |\n| Pick a model      | `recommend` with `capability=\"txt2img\"` or `\"img2img\"`, or `search` (`target=\"models\"`, `public=true`) |\n| Read the contract | `model_schema_get`, before every `model_run`                                                           |\n| Estimate cost     | `model_run` with `dry_run=true`; `cost_impact: true` marks the fields that move price                  |\n| Generate or edit  | `model_run`, then `jobs_wait`                                                                          |\n| Review and save   | `asset_display`, then `asset_download` (`png` default, `webp`, `jpg`)                                  |\n| Land exact pixels | Generate at the nearest reachable size, then `model_scenario-resize-image` (see Landing an exact size) |\n\nInpainting and outpainting are `img2img`, not capabilities of their own.\n\n## The three fields that fail runs\n\nAll three are per-model, so take them from the schema rather than from a previous run:\n\n- **Size.** Sizing has no common shape: numeric `width` and `height` with `min`, `max`, and a `step`\n  to land on; an enum (`aspectRatio`, a `resolution` in megapixels or K tiers, a `size` mixing tiers\n  with pixel pairs); or an aspect ratio alone, which puts an exact pixel target out of reach\n  entirely. Pixels sent to an enum field, or an off-step value, are rejected. When the schema cannot\n  express the size asked for, report what it can reach rather than rounding silently.\n- **Prompt length.** The prompt field's `max_length` ranges from roughly 2000 characters to 32000. A\n  prompt that fits one model is a 400 on the next.\n- **References.** Name (`referenceImages`, `image`), cap, and cardinality all come from the schema,\n  and the name settles none of them: a field called `referenceImages` is a single scalar file on\n  some models. Pass an array only where the schema says `array: true`, and there pass one even for a\n  lone asset, since a bare string is dropped silently and the run then succeeds while ignoring the\n  reference. With several references, say in the prompt which is which.\n\nA batch-count field (`numOutputs`, `numImages`) repeats one prompt, so it yields variations, not a\nset. Anything with a per-item difference needs one `model_run` per item.\n\n## Landing an exact size\n\nIn-game placements need exact pixels (a 210x600 banner, a 256x256 icon), which a generative model\nmay not support directly. Numeric sizing fields snap to a grid (a `step` of 16 is common, with `min`\nand `max` bounding the range), enum fields offer fixed tiers, and some members silently replace a\nrequest below their floor: 512x128 came back as 1408x480 on one member, with no error. When the\ntarget is unsupported, generate at the nearest reachable size at or above it, matching the ratio\nwhere possible and respecting every schema limit (1024x1024 for a 256x256 icon on a member with a 1K\nfloor; 224x640 for a 210x600 banner only if both dimensions meet that member's limits), then finish\nwith `model_scenario-resize-image`, a fixed id since it is Scenario's single deterministic\nexact-dimension resize tool and discovery would only re-derive it: `images` as an array even for one\nasset, `width` and `height`, and `fit` `cover` to fill the box and center-crop the overflow or\n`stretch` for exact dimensions at the cost of distortion (`contain`, the default, can return a\nsmaller image than the box). Choose a larger source only for an explicit quality requirement or\ndocumented model guidance, not an assumed family sweet spot. Confirm with `asset_get`. Downscaling\ncan make softness less visible; resizing upward cannot recover missing detail.\n\nBlur has the same discipline: several members default to a 1K tier with a higher one in the schema,\nso set the resolution or `quality` tier explicitly for a new generation. To preserve an approved\nframe, upscale the exact keeper (`scenario-image-editing`); re-running its recipe can change the\nimage. On a custom-trained member, check guidance and step count against its schema and model\nguidance before increasing them. When outputs feel literal, split the prompt into what is fixed and\nwhat the model may invent and say so. Invented details must obey the fixed constraints too (no\ndecorative runes in a text-free brief); `prompt_spark` expands a thin brief into an on-model one\nbefore the run.\n\n## Prompt wording\n\nIn-image text: quote each string exactly and say where it sits (\"the label reads 'NORTH', top\ncenter\"), keep to a few short strings, and spell a word that keeps mangling letter by letter (NORTH:\nN, O, R, T, H); unquoted copy gets reworded. Copy that must be letter-perfect (prices, legal lines)\nis composited with `scenario-text-overlay`, never prompted. A film-still or cinematic prompt, or a\nratio written in prose (2.39:1), can bake letterbox bars into the pixels, and an `asset_get`\ndimension check reads them as picture: ask for full frame edge to edge, no letterboxing, no black\nbars, and carry the ratio in the sizing field alone. Where skin shows, name its texture (visible\npores, fine hairs, a faint highlight) or it tends to come back retouched smooth.\n\nAn instruction edit names the change and pins the rest: \"put the chair on a sunlit terrace; keep its\nshape, fabric and shadow exactly\", or for text, \"change only the headline to 'NORTH', same typeface,\nsize and position\". Anything unnamed is open to change.\n\n## Worked example: replacing a label on a product shot\n\n1. `recommend` with `capability=\"img2img\"` and the user's own words as `prompt`. Handle `next_step`\n   as the `scenario` skill directs, and never run a `requires_plan_upgrade` entry.\n2. `upload_asset` the product photo, then `upload_asset_complete`, which returns the `asset_id`.\n   Only the inline path under ~100KB skips the second call.\n3. `model_schema_get` on the pick: the reference field's name and cap, which sizing family it uses,\n   the prompt `max_length`, and whether a `mask` field exists.\n4. For a masked edit, read the `mask` field's own description before building anything. Masks are\n   not interchangeable: one model wants an alpha channel at the source's exact dimensions, another\n   wants a black and white image it resizes itself, and which pixels get painted differs too. With\n   no mask in hand, `recommend` with `capability=\"img2img\"` and the masking need in the user's own\n   words finds segmentation models that take a short noun phrase or a box and return one mask per\n   object; most segmentation models in the catalog segment 3D meshes instead, so check\n   `capabilities` on the pick. Where no convention fits, an instruction editor scopes the edit in\n   prose instead.\n5. `model_run` with the schema's own field names: the prompt, the reference (wrapped in an array\n   only where the schema says `array: true`), plus the mask and sizing fields it named. Use\n   `dry_run=true` first when cost matters.\n6. `jobs_wait`; its ~180s timeout is not an error, so re-call it with the returned `pending_job_ids`\n   as `job_ids`. Then `asset_display` to review and `asset_download` to save.\n\n## Common mistakes\n\n- Passing a bare string where the schema marks the reference field `array: true`: it is dropped\n  without an error, and the output quietly ignores it.\n- Reusing one model's parameter block on another: `aspectRatio` and `width`/`height` rarely coexist,\n  and unknown fields are rejected.\n- Retrying a 403 `ModelAccessRestrictedError`: it names `modelId` and `requiredPlan`, so surface the\n  upgrade or pick another model.\n- Prompting \"transparent background\": diffusion outputs are opaque. Use a `background` field when\n  the schema has one, otherwise run a background-removal model afterwards.\n- Re-running an approved frame at a higher size tier and expecting it back sharper: many models\n  expose no `seed`, and where one exists it reproduces a run only with every other field unchanged,\n  so the re-run is a new image; draft at the cheapest tier, then upscale the exact keeper\n  (`scenario-image-editing`).\n- Assuming a model can hit a requested pixel size: some expose an aspect ratio and nothing else, and\n  others silently substitute a size for one below their floor. Generate near, then resize (Landing\n  an exact size), and confirm what landed with `asset_get`, which reports `properties.width` and\n  `properties.height`; `jobs_wait` returns asset ids only.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}