agentleFS
justinwilliamesjustinwilliames/skills/image-generation-craft/SKILL.md

image-generation-craft

Skill1 starsChanged 5 months agoMITView on GitHub

Craft discipline for AI image generation and editing: spec before generating, keep critical text out of the raster, inspect every output like a reviewer, and iterate with targeted deltas. Engine-agnostic — applies to any text-to-image or image-edit pipeline. Load for hero images, banners, headers, illustrations, and marketing assets. Do NOT use for programmatic charts/diagrams (generate those as SVG/HTML, where you control every pixel).

The file

We split this skill into the rules it gives an agent

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

  • 1

    Very specific

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

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

    Write the spec first, one line per axis — subject, composition (framing, focal point, where copy space must be), style …

    line 20
  2. Distinctive:

    When an output is 80% right, change the prompt *minimally and specifically* to fix the 20% ("same composition, remove the third hand, …

    line 59
  3. Distinctive:

    Check both display contexts: if the destination has light/dark modes.

    line 70

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

Image Generation Craft

Image models are brilliant renderers and unreliable typesetters, counters, and brand custodians. The craft is a pipeline that plays to the strength (photographic/illustrative richness) while routing everything precision-critical (text, logos, exact colors, layout) through tools you control.

Spec before generating

Write the spec first, one line per axis — subject, composition (framing, focal point, where copy space must be), style (photographic/illustrative/3D, lighting, mood), palette (hex values if brand-bound), aspect ratio, and the use context (where will this sit, at what size, on what background). A generation without a spec isn't iteration, it's gambling. The spec is also your QA checklist — every axis becomes an inspection item.

The text rule

Never bake critical text into the AI raster. Generated type warps, misspells, and drifts off-brand — and every regeneration re-rolls it. Instead:

  1. Generate the visual with deliberate clean copy space (specify it in the prompt).
  2. Composite the text as a layer you control — HTML/CSS rendered headlessly, SVG, or an image library — with real fonts, exact hex, and feathered blending where the layer meets the photo.

Decorative background text (signage blur, ambient lettering) is fine generated; anything a reader must actually read is not.

Inspect every output — actually look

Open the file and review it as a rejecting art director, against the spec, before showing anyone. The known defect classes:

Defect classWhat to look for
Anatomy/count errorsHands, fingers, limbs, teeth; object counts vs the spec
Letterboxing / dead barsSolid black/white strips on an edge (a real, intermittent engine defect) — crop them off
Warped marksLogos, icons, UI elements the model "reinvented"
Palette driftSample the actual pixels against the spec's hex values — eyeballing color fails
Edge artifactsSmearing, duplicated textures, half-formed objects at the frame boundary
Composition driftFocal point or copy space not where the spec put it

An output you didn't inspect is an output you haven't seen — attaching it to a message is a claim that it's right (verification-gates: the unread- screenshot failure, in reverse).

Iterate with deltas, not re-rolls

When an output is 80% right, change the prompt minimally and specifically to fix the 20% ("same composition, remove the third hand, warmer rim lighting") or use the engine's edit/ inpaint mode on the failing region. Full re-rolls discard what worked. Conversely: two failed deltas on the same defect means the engine can't do it — route that element to the compositing layer instead (the invariant-symptom rule, applied to pixels).

Pipeline hygiene

  • Version outputs: <asset>-v1.png, -v2 … with the spec/prompt saved alongside; "final-final-2" is how the good one gets lost.
  • Generate at or above target size — upscaling a too-small winner degrades it.
  • Check both display contexts if the destination has light/dark modes.
  • Rights and likeness: real people's likenesses only with their sign-off, and flag off-likeness results rather than shipping them.

Named failure modes

Failure modeDetection signal
Prompt gamblingRegenerating without a written spec or a named delta
Baked headlineReader-critical text inside the AI raster
Unopened outputAsset delivered without the inspection pass
Palette by vibesBrand colors "checked" without sampling pixels
Re-roll churnDiscarding an 80%-right output instead of delta-editing
Engine stubbornnessThird attempt at a defect two deltas already failed to fix

Sync home

Sync home: github.com/justinwilliames/skills — canonical. Installed copies (e.g. ~/.claude/skills/image-generation-craft) are distribution artifacts: edit the repo, re-copy.

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.