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).
In this repository28 other files it gives its agents.
- advanced-prd-writerSkill
- calendar-reviewSkill
- challenge-before-buildSkill
- claude-build-hardeningSkill
- claude-memorySkill
- claude-product-demo-videoSkill
- codex-imagegenSkill
- codexSkill
- coding-craftSkill
- computer-controlSkill
- context-disciplineSkill
- disk-cleanupSkill
- infinite-working-skillSkill
- intelligent-delegationSkill
- linkedin-post-writerSkill
- okr-structuringSkill
- operator-standardSkill
- posthog-design-customizationSkill
- self-performance-reviewSkill
- session-namerSkill
- session-recallSkill
- skill-hardeningSkill
- slack-statusSkill
- slack-writerSkill
- subagent-briefSkill
- testing-standardsSkill
- verification-gatesSkill
- writing-craftSkill
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
- Very specific: line 20
Write the spec first, one line per axis — subject, composition (framing, focal point, where copy space must be), style …
- Distinctive: line 59
When an output is 80% right, change the prompt *minimally and specifically* to fix the 20% ("same composition, remove the third hand, …
- Distinctive: line 70
Check both display contexts: if the destination has light/dark modes.
≈ “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.
Files
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:
- Generate the visual with deliberate clean copy space (specify it in the prompt).
- 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 class | What to look for |
| Anatomy/count errors | Hands, fingers, limbs, teeth; object counts vs the spec |
| Letterboxing / dead bars | Solid black/white strips on an edge (a real, intermittent engine defect) — crop them off |
| Warped marks | Logos, icons, UI elements the model "reinvented" |
| Palette drift | Sample the actual pixels against the spec's hex values — eyeballing color fails |
| Edge artifacts | Smearing, duplicated textures, half-formed objects at the frame boundary |
| Composition drift | Focal 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 mode | Detection signal |
| Prompt gambling | Regenerating without a written spec or a named delta |
| Baked headline | Reader-critical text inside the AI raster |
| Unopened output | Asset delivered without the inspection pass |
| Palette by vibes | Brand colors "checked" without sampling pixels |
| Re-roll churn | Discarding an 80%-right output instead of delta-editing |
| Engine stubbornness | Third 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.
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
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.

