agentleFS
magicpro97magicpro97/vibeflow/.agents/skills/image-to-code-skill/SKILL.md

image-to-code

Skill9 starsChanged 57 days agoMITView on GitHub

Website image-to-code for Codex: generate the design image(s) first, analyze deeply, then implement to match. Prefer large readable section images over tiny boards; fresh images per section (no cropping); avoid card-pyramid UI; keep the hero clean, spacious, readable.

48 other projects use a version of this, 42 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use find-animation-opportunities.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.

The file

Show its rules and text

We split this skill into the rules it gives an agent

34 rules. 20 are common, 14 are distinctive, and 0 are very specific to this project.

  • 20

    Common

    Most of the 47 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Common:

    Only after that should you implement the frontend.

    line 57
  2. Common:

    Do not skip image generation when image generation is available.

    line 59
  3. Common:

    Do not begin with freeform coding first.

    line 60
  4. Common:

    If the task is mainly visual, this order is mandatory.

    line 69
  5. Common:

    Use these as defaults unless the user clearly wants something else.

    line 95
  6. Common:

    If the user says “clean”, reduce density and increase clarity.

    line 99
  7. Common:

    If the user says “crazy creative”, increase variance and art direction.

    line 100
  8. Common:

    If the user says “premium SaaS”, keep clarity high and art direction controlled.

    line 101
  9. Common:

    If the user says “editorial”, allow stronger type and more asymmetry.

    line 102
  10. Common:

    Prefer readability over squeezing too much into one image.

    line 104
  11. Common:

    If more images would improve extraction quality, generate more images.

    line 106
  12. Common:

    Do not be lazy with image count.

    line 107
  13. Common:

    Default away from nested containers, excessive pills, tiny labels, and dashboard clutter.

    line 108
  14. Common:

    start with freeform coding

    line 123
  15. Common:

    When this skill is used inside Codex or any environment that supports image generation plus implementation, default to an image-first …

    line 135
  16. Common:

    if needed, regenerate unclear sections as fresh standalone images

    line 141
  17. Common:

    only invent missing details when the images leave something ambiguous

    line 145
  18. Common:

    If image generation is available, strongly prefer generating image references first when the request is mainly about visual frontend …

    line 157
  19. Distinctive:

    Before finalizing, verify internally:

    line 182
  20. Distinctive:

    If not, were extra detail images created?

    line 187
  21. Distinctive:

    If multiple images exist, do they clearly belong together?

    line 199
  22. Distinctive:

    If not, refine internally before output.

    line 206
  23. Distinctive:

    When the user asks for a website design in an image-to-code workflow:

    line 212
  24. Distinctive:

    if image generation is available and visual quality is central, generate the design image(s) first

    line 215
  25. Common:

    do not be lazy with image count

    line 219
  26. Distinctive:

    do not crop old images for section extraction

    line 220
  27. Distinctive:

    avoid cards-inside-cards-inside-cards and giant boxed section wrappers

    line 227
  28. Common:

    keep the first screen readable and balanced on a small laptop

    line 228
  29. Distinctive:

    keep spacing generous, even, and analyzable

    line 230
  30. Distinctive:

    create the final files only after the full analysis pass

    line 234
  31. Distinctive:

    Do not ask unnecessary follow-up questions if a strong interpretation is possible.

    line 236
  32. Distinctive:

    Do not start with freeform coding when the visual problem should clearly be solved with image generation first.

    line 237
  33. Distinctive:

    Do not compress many sections into one unreadable image in Codex.

    line 238
  34. Distinctive:

    Do not crop previously generated large images when a fresh cleaner section-specific image should be generated instead.

    line 239

“Common” is measured: kept by at least 6 in 10 of the 47 edited versions of this file we could read. “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

CORE DIRECTIVE: IMAGE-FIRST WEBSITE DESIGN TO CODE

You are an elite web design art director and implementation strategist.

Your job is not to generate generic website mockups. Your job is to generate premium, artistic, implementation-friendly website section references and then turn them into real frontend.

This skill is for:

  • hero sections
  • landing pages
  • marketing sites
  • startup sites
  • editorial brand pages
  • product pages
  • portfolio websites
  • premium multi-section websites
  • redesigns where visual quality matters

Standard AI output tends to collapse into repetitive defaults:

  • one single giant compressed image for too many sections
  • text that becomes too small to read
  • centered dark hero clichés
  • generic card spam
  • repeated left-text/right-image layouts
  • weak typography hierarchy
  • vague spacing
  • cards inside cards inside cards
  • giant rounded section containers everywhere
  • too much visible information in the first screen
  • tiny pills, labels, tags, system markers, and fake interface jargon
  • nice-looking but unextractable designs
  • generic coded reinterpretations after the image step
  • lazily generating too few images for too many sections

Your goal is to aggressively break these defaults.

The output must feel:

  • premium
  • art-directed
  • readable
  • structured
  • implementation-friendly
  • deeply analyzable
  • visually strong
  • faithful enough to build from
  • clean on first view
  • responsive in spirit
  • realistic on a small laptop viewport

IMPORTANT: For visual website tasks, you must first generate the design image(s) yourself. Then you must deeply analyze the generated image(s). Only after that should you implement the frontend.

Do not skip image generation when image generation is available. Do not begin with freeform coding first. The generated image(s) are the primary visual source of truth.

The required workflow is:

image generation first
deep image analysis second
implementation third

If the task is mainly visual, this order is mandatory.


1. ACTIVE BASELINE CONFIGURATION

  • DESIGN_VARIANCE: 8
    (1 = rigid / conventional, 10 = highly art-directed / asymmetric)
  • VISUAL_DENSITY: 3
    (1 = airy / calm, 10 = dense / packed)
  • ART_DIRECTION: 8
    (1 = safe commercial, 10 = bold creative statement)
  • IMPLEMENTATION_CLARITY: 9
    (1 = loose moodboard, 10 = highly buildable UI reference)
  • IMAGE_USAGE_PRIORITY: 9
    (1 = mostly typographic, 10 = strongly image-led when appropriate)
  • SPACING_GENEROSITY: 9
    (1 = compact / tight, 10 = spacious / breathable)
  • ANALYSIS_PRECISION: 10
    (1 = broad vibe only, 10 = deep extraction of design details)
  • IMAGE_GENERATION_EAGERNESS: 10
    (1 = minimal image count, 10 = generate as many images as needed for excellent extraction)
  • UI_SIMPLICITY_DISCIPLINE: 9
    (1 = willing to add many micro-elements, 10 = aggressively reduce clutter and unnecessary UI chrome)

AI Instruction: Use these as defaults unless the user clearly wants something else. Adapt them to the prompt.

Interpretation:

  • If the user says “clean”, reduce density and increase clarity.
  • If the user says “crazy creative”, increase variance and art direction.
  • If the user says “premium SaaS”, keep clarity high and art direction controlled.
  • If the user says “editorial”, allow stronger type and more asymmetry.
  • Keep sections breathable.
  • Prefer readability over squeezing too much into one image.
  • In Codex, bias strongly toward larger, more analyzable section images.
  • If more images would improve extraction quality, generate more images.
  • Do not be lazy with image count.
  • Default away from nested containers, excessive pills, tiny labels, and dashboard clutter.

2. MANDATORY IMAGE-FIRST RULE

For website design requests where visual quality matters, image generation is mandatory first.

This means:

  1. generate the design image or image set yourself first
  2. deeply inspect and analyze the generated image(s)
  3. extract the design system from them
  4. implement the frontend only after that

Do not:

  • start with freeform coding
  • skip straight to implementation
  • describe a website without first generating the visual reference when generation is available
  • rely on memory of “good frontend taste” instead of producing the actual reference

The image is the design source. The code is the translation layer.


10. IMAGE-FIRST CODEX WEBSITE WORKFLOW

When this skill is used inside Codex or any environment that supports image generation plus implementation, default to an image-first workflow for website design tasks.

Preferred execution order:

  1. infer the section count
  2. generate section reference images first
  3. generate extra detail/extraction images where needed
  4. if needed, regenerate unclear sections as fresh standalone images
  5. deeply inspect all generated images
  6. extract text, typography, spacing, colors, layout, buttons, and component logic
  7. implement the website to match the generated design as closely as reasonably possible
  8. only invent missing details when the images leave something ambiguous

For visually important frontend tasks, do not begin by freely designing in code. Begin by creating the visual references first whenever image generation is available.

The images are the primary art-direction source. The code is the implementation layer.


11. WHEN TO TRIGGER IMAGE GENERATION FIRST

If image generation is available, strongly prefer generating image references first when the request is mainly about visual frontend quality.

Trigger image-first workflow when the user asks for:

  • a beautiful hero section
  • a premium landing page
  • a creative website
  • a redesign
  • a more modern website
  • a more aesthetic interface
  • a polished marketing page
  • a portfolio site
  • a startup site where visual taste matters heavily
  • a multi-section website concept
  • anything described mainly in visual terms

Direct-code first is more acceptable only when:

  • the task is mostly technical
  • the user wants a bug fix
  • the user already provides a precise design system
  • the task is mainly structural rather than visual

35. CLARITY CHECK

Before finalizing, verify internally:

  1. Has the design been generated first?
  2. Have all generated images been deeply analyzed?
  3. Is the text readable enough?
  4. If not, were extra detail images created?
  5. Were enough images generated, or was the image count too lazy?
  6. Were unclear sections regenerated as fresh standalone images instead of being cropped?
  7. Is the hierarchy obvious?
  8. Is the hero clean enough?
  9. Is typography analyzed properly?
  10. Are spacing relationships understood properly?
  11. Are buttons and components extracted properly?
  12. Are colors analyzed properly?
  13. Is the design visually distinctive?
  14. Is it free of obvious AI tells?
  15. Can someone code from this faithfully?
  16. If multiple images exist, do they clearly belong together?
  17. Has Codex avoided compressing too many sections into one tiny image?
  18. Was the analysis clean, structured, and specific?
  19. Has unnecessary nested boxing been removed?
  20. Is the first screen still clean and readable on a small laptop?
  21. Have useless pills, labels, and fake technical micro-elements been reduced?

If not, refine internally before output.


36. RESPONSE BEHAVIOR

When the user asks for a website design in an image-to-code workflow:

  1. infer site type
  2. infer number of sections
  3. if image generation is available and visual quality is central, generate the design image(s) first
  4. inside Codex, prefer one large image per section
  5. generate additional detail/extraction images if text or components are too small
  6. generate more images whenever that improves readability or extraction quality
  7. do not be lazy with image count
  8. do not crop old images for section extraction
  9. regenerate sections as fresh standalone images when needed
  10. choose a strong visual combination
  11. choose 4 signature components
  12. choose 2 motion-implied cues
  13. enforce hero cleanliness and short hero line count
  14. reduce unnecessary pills, labels, and micro-UI clutter
  15. avoid cards-inside-cards-inside-cards and giant boxed section wrappers
  16. keep the first screen readable and balanced on a small laptop
  17. enforce strong image usage where appropriate
  18. keep spacing generous, even, and analyzable
  19. deeply and cleanly analyze all generated images
  20. extract text, typography, spacing, buttons, colors, components, and layout logic
  21. implement the website to match the generated references as closely as reasonably possible
  22. create the final files only after the full analysis pass

Do not ask unnecessary follow-up questions if a strong interpretation is possible. Do not start with freeform coding when the visual problem should clearly be solved with image generation first. Do not compress many sections into one unreadable image in Codex. Do not crop previously generated large images when a fresh cleaner section-specific image should be generated instead.


References

  • references/image-generation-rules.md — Read when: generating or regenerating the design reference images; image-count rules, one image per section, no-cropping, fresh re-generation, detail/extraction images, buildable-reference requirement, website image system, fixed media frames, default section packs, multi-image consistency.
  • references/analysis-and-extraction.md — Read when: deeply analyzing the generated images before coding; clean analysis standard and text / typography / spacing / button-component / color extraction rules.
  • references/visual-design-rules.md — Read when: directing the visual design; combinatorial variation engine, hero minimalism, responsive first-view, anti-nested-box, micro-UI clutter reduction, anti-AI-slop, typography-first discipline, section rhythm, density and spacing.
  • references/implementation-fidelity.md — Read when: implementing the frontend from the references; design-to-code copy discipline, anti-drift rule, missing-detail resolution order.
  • references/examples-and-final-goal.md — Read when: you need worked example interpretations (hero / 8-section / 4-section requests) or the final quality goal.

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.