Source: YoMii (@Gas1688) highlighted freestylefly/awesome-gpt-image-2, an open-source collection of reverse-engineered image prompts.
Text-to-image prompts are often paragraphs filled with modifiers such as "hyperrealistic, cinematic lighting, 8k octanerender". The repository takes a different approach to GPT-Image-2: it records layout, palette, typography, camera, and lighting choices as explicit fields that an agent can reuse.
The project calls this Prompt as Code (PaC). A structured prompt can be versioned and edited like configuration, although the model output remains probabilistic rather than deterministic.
Where prose prompts lose precision
When a coding agent such as Claude Code, Antigravity, or Cursor needs a dashboard mockup, product render, or infographic, a loose prose prompt can leave important constraints implicit:
- Layout drift: Spatial hierarchy, grids, and padding can change between generations.
- Typography errors: Text may render as incorrect glyphs, especially when labels and placement are underspecified.
- Style spillover: An adjective intended for one object can affect another, such as a neon-blue button changing the appearance of a dark walnut table.
Prose and structured prompt examples
The JSON below is my illustrative schema, not a schema copied from or versioned by the repository.
// Unstructured prose
"Create a futuristic cyberpunk analytics dashboard with dark theme and neon blue graphs and cards."
// Prompt as Code (explicit, modular constraints)
{
"schema_version": "2.1.0",
"domain": "UI/Dashboard",
"theme": {
"palette": ["#0c0c0e", "#18181b", "#3b82f6", "#10b981"],
"glassmorphism": { "blur": "12px", "border_opacity": 0.15 }
},
"layout": {
"grid": "12-column-responsive",
"hierarchy": ["TopNav", "KPI_Cards_4x", "MainAreaChart", "ActivityFeed"]
},
"typography": {
"headers": "Space Grotesk Bold",
"data_points": "JetBrains Mono SemiBold",
"strict_labels": ["Active Nodes", "Throughput (GB/s)", "Error Rate 0.02%"]
},
"lighting": "Subtle top-down ambient with 45deg soft specular on glass cards"
}
Fields used in the prompt schemas
The repository repeatedly specifies subject, camera, lighting, and material. I read these as useful editing handles, not a universal protocol or a guarantee of repeatable output.
Cases by category
The repository groups its examples by intended use. The table below summarizes five of those groups and the controls they emphasize:
| Domain Category | Examples in the repository | Key Control Mechanics | Primary Production Use Case |
|---|---|---|---|
| ๐งฉ UI & Interfaces | Dashboards and app mockups | Component bounding boxes, glassmorphism, responsive grid layout | Landing page hero mockups, mobile app previews, SaaS dashboards |
| ๐ Charts & Infographics | Charts and technical diagrams | Node-edge graphs, data density hierarchies, color-coded flows | Technical explainers, research whitepapers, architecture diagrams |
| ๐ฐ Posters & Typography | Posters and editorial layouts | Swiss grid alignment, kerning anchors, editorial headline ratios | Event keynotes, newsletter covers, brand campaign posters |
| ๐๏ธ Products & Hardware | Product and packaging renders | Studio cyclorama lighting, macro lens depth, CNC/anodized aluminum shaders | E-commerce hero banners, industrial hardware mockups, packaging |
| ๐๏ธ Architecture & Spatial | Architecture and interior studies | Two-point perspective, brutalist concrete texture, architectural blue hour | Spatial concept art, city mapping, interior mood boards |
Using the repository as an agent skill
The repository also packages the template library as an Agent Skill (agents/skills/gpt-image-2-style-library/SKILL.md).
For a frontend task, an agent such as Antigravity or Claude Code can use the skill to select a template and construct a more explicit request:
- Skill discovery: The agent reads
SKILL.mdand matches the request to a template, such as a dark minimalist telemetry dashboard. - Schema assembly: It fills a JSON or YAML payload with color tokens, aspect ratio, and typography specifications.
- Generation: It sends the payload to an asynchronous endpoint through Remote MCP or a REST API.
- Review: It inspects the result, checks the requested layout, and then embeds the asset in the application.
How I would use it
I would use the collection as a reference library, then keep the chosen prompt beside the code that consumes it. That makes revisions reviewable without pretending that image generation is deterministic.
Version-control visual prompts
Store prompt templates in Git as typed JSON/YAML schemas rather than copying snippets from notes or chat threads.
Separate content from style tokens
Treat color palettes, lighting presets, and camera setups as reusable variables across different subjects.
Make prompts machine-readable
A programmatic schema lets coding agents generate and revise visual assets without reconstructing every prompt from prose.