Prompt as Code | GPT-Image2 Industrial Prompt Engine & Template Library, 400+ Reverse-Engineered Cases, 20+ Industrial Templates
English | 简体中文
Updated irregularly with new workflows. Stars are welcome. This project is sponsored by Ciyuan API, an AI aggregation platform for cost-effective GPT Image 2 access.
After GPT-Image2 became widely available, AI image generation moved from "can it make an image?" to "can it make stable, controllable, reusable images?" This project turns scattered community examples into Prompt-as-Code assets that are easier for agents and automation workflows to reuse.
The core goal is simple: compress prose-style prompts into structured protocols. When you need batch generation, template systems, or production workflows, this structure is more valuable than a pile of isolated examples.
- 🧱 Atomic schema: split subjects, lighting, materials, layout, and visual details into composable parts
- ⚙️ Workflow friendly: designed for agents, scripts, and automation systems
- 🧬 Structured control: improve controllability for layout, copy, and information hierarchy
- Full case gallery
- Gallery Part 1: cases 1-165
- Gallery Part 2: cases 166-420
- Industrial prompt templates and pitfalls guide
- Agent skill: GPT-Image2 Style Library
- MIT License
- Full disclaimer
Start with the case album to find a visual direction, then open the prompt template categories to turn that direction into reusable structure.
|
🧩 UI & Interfaces ![]() Apps, websites, dashboards, social screenshots, and product interfaces. View Cases |
📊 Charts & Infographics ![]() Infographics, knowledge maps, technical explainers, and structured diagrams. View Cases |
📰 Posters & Typography ![]() Event posters, covers, type-driven visuals, and strong layout compositions. View Cases |
|
🛍️ Products & E-commerce ![]() Product shots, detail pages, packaging, selling points, and ads. View Cases |
🏷️ Brand & Logos ![]() Logos, identity systems, brand touchpoints, and campaign visuals. View Cases |
🏛️ Architecture & Spaces ![]() Architecture renders, interiors, city maps, and spatial concepts. View Cases |
|
📷 Photography & Realism ![]() Portraits, phone photography, film texture, and commercial photography. View Cases |
🎨 Illustration & Art ![]() Illustration, art styles, material experiments, and decorative images. View Cases |
🧍 Characters & People ![]() Character design, pose references, cards, and 3D toys. View Cases |
|
🎬 Scenes & Storytelling ![]() Storyboards, narrative scenes, livestream frames, and worldbuilding. View Cases |
🏮 History & Classical Chinese Themes ![]() Classical scrolls, historical figures, traditional themes, and poetry visuals. View Cases |
📚 Documents & Publishing ![]() White papers, manuals, encyclopedic plates, and publishing layouts. View Cases |
|
🧪 Other Use Cases ![]() Creative experiments, special tasks, mixed workflows, and practical cases. View Cases |
![]() Browse all 420 cases by gallery part and category. Open Gallery |
![]() The newest community cases and workflows collected in the repo. View Latest |
The prompt body remains in the original template document for now. This homepage only adds an English navigation layer.
Template Page 1 / 4: Design & Information
| Category | Template Entry | Core Capability |
|---|---|---|
| 🧩 UI & Interfaces | View Prompts | Components, page hierarchy, screenshot texture |
| 📊 Charts & Infographics | View Prompts | Modules, arrows, data structure, readability |
| 📰 Posters & Typography | View Prompts | Layout, headline systems, people, visual impact |
Template Page 2 / 4: Commerce & Space
| Category | Template Entry | Core Capability |
|---|---|---|
| 🛍️ Products & E-commerce | View Prompts | Product selling points, packaging, detail-page structure |
| 🏷️ Brand & Logos | View Prompts | Logos, identity, brand touchpoint systems |
| 🏛️ Architecture & Spaces | View Prompts | Perspective, materials, indoor and outdoor lighting |
Template Page 3 / 4: Imaging & Characters
| Category | Template Entry | Core Capability |
|---|---|---|
| 📷 Photography & Realism | View Prompts | Lenses, lighting, realistic textures |
| 🎨 Illustration & Art | View Prompts | Brushwork, materials, art styles |
| 🧍 Characters & People | View Prompts | Character design, pose sheets, consistency |
Template Page 4 / 4: Narrative & Extensions
| Category | Template Entry | Core Capability |
|---|---|---|
| 🎬 Scenes & Storytelling | View Prompts | Storyboards, worldbuilding, emotional pacing |
| 🏮 History & Classical Chinese Themes | View Prompts | Dynasties, clothing, scroll-style narrative |
| 📚 Documents & Publishing | View Prompts | Page systems, tables of contents, layout rules |
| 🧪 Other Use Cases | View Prompts | Mixed tasks, experimental workflows, special outputs |
This repository includes an agent skill for choosing GPT-Image2 styles, templates, categories, and scene tags from the same data used by the website.
Package links: npm / GitHub Packages
Example output from a city-life-system-map request using the style library skill.
Recommended for Claude Code, Codex, Cursor, and other tools supported by skills:
npx skills add freestylefly/awesome-gpt-image-2 --skill gpt-image-2-style-library --agent claude-code codex --global --yes --copyInstall to every supported local agent:
npx skills add freestylefly/awesome-gpt-image-2 --global --all --copyRun these commands inside Claude Code:
/plugin marketplace add freestylefly/awesome-gpt-image-2
/plugin install gpt-image-2-style-library@awesome-gpt-image-2
If you prefer npm, install the CLI and then sync the skill into local agent folders:
npm install -g gpt-image-2-style-library
gpt-image-2-style-library install allYou can also run it without a global install:
npx gpt-image-2-style-library install allInstall from GitHub Packages:
npm login --scope=@freestylefly --registry=https://npm.pkg.github.com
npm install -g @freestylefly/gpt-image-2-style-library --registry=https://npm.pkg.github.com
gpt-image-2-style-library install allinstall all writes the skill to the common local folders used by Codex and Claude Code, including ~/.codex/skills, ~/.claude/skills, and ~/.agents/skills. Restart the agent session after installing.
Use it with a request like:
Use gpt-image-2-style-library to create an infographic prompt about Codex.
For local source development:
npm run generate:style-skill
npm run install:skillThe skill source lives at agents/skills/gpt-image-2-style-library. Its generated reference comes from data/style-library.json, so the website and Agent workflow share one style library.
The visual site includes login-gated case generation powered by Supabase Auth, Supabase Postgres, and a Vercel Function proxy for the GPT Image 2 API.
Required Vercel environment variables:
VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=
VITE_APP_URL=https://aigcprompt.ruhang365.cn
SUPABASE_SERVICE_ROLE_KEY=
SUPER_ADMIN_EMAILS=2689458656@qq.com,canghe0818@gmail.com
CIYUAN_API_KEY=
CIYUAN_BASE_URL=https://ciyuan.today
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=Setup checklist:
- Apply
supabase/migrations/202605090001_user_credits.sqlto the Supabase project. - Apply
supabase/migrations/20260509090000_membership_billing.sqlto add membership plans, credit packs, Stripe order records, and credit adjustment RPCs. - Add
https://aigcprompt.ruhang365.cn,https://daily.ruhang365.cn, and local dev URLs such ashttp://127.0.0.1:5173to Supabase Auth redirect URLs. - Enable Email OTP or magic links in Supabase Auth.
- Enable the Google Provider after adding Google OAuth credentials in the Supabase Dashboard.
- Keep
SUPABASE_SERVICE_ROLE_KEYonly in server-side environments such as Vercel Environment Variables. - Configure Stripe Checkout with the webhook URL
https://gpt-image2.canghe.ai/api/billing/webhook. - Subscribe the Stripe webhook to
checkout.session.completed,invoice.payment_succeeded,customer.subscription.updated, andcustomer.subscription.deleted. - Keep
STRIPE_SECRET_KEYandSTRIPE_WEBHOOK_SECRETonly in server-side Vercel Environment Variables.
Unified account recommendations:
- Point
aigcprompt.ruhang365.cnanddaily.ruhang365.cnto the same Supabase project so the same email or Google identity can be reused across both sites. - In Vercel, use the same
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEYas Daily, and addVITE_APP_URL=https://aigcprompt.ruhang365.cnfor stable redirect handling. - In Supabase Dashboard under
Authentication -> URL Configuration, add everyruhang365domain to theRedirect URLsallowlist. - Under
Authentication -> Providers, keep the enabled providers aligned with Daily, at minimum Email OTP / Magic Link and Google. - If you want full cross-site single sign-on later, use
ruhangcenter.ruhang365.cnas the auth center; the current integration standardizes accounts first, but does not automatically share each site's frontend localStorage session.
An engineering-whitepaper-style infographic case for studying modular structure, information hierarchy, and bilingual labels. View full case
A mixed "product interface + social content screenshot" case for controlling text blocks, UI frames, and content cards. View full case
A Japanese fantasy illustration example for studying atmosphere, color, and large-scene composition. View full case
A classic "structured breakdown + explanatory layout" case for product diagrams and poster-like technical explainers. View full case
A multi-card, unified-style case for studying batch generation and series design. View full case
A strong hybrid of brand narrative, structural breakdown, and commercial presentation. Useful as an "infographic + brand visual" reference. View full case
|
Case 330: Moonlit Livestream Scene ![]() A high-fidelity livestream screenshot reference for UI atmosphere, comments, and realistic people. View Case |
Case 334: RAG Technical Explainer ![]() A reference for technical concepts, process arrows, and Chinese explanation modules. View Case |
Case 338: Red Cliff Classical Scroll ![]() A complete example of scroll format, classical Chinese narrative, and full-text layout. View Case |
|
Case 331: Hand-Drawn Xi'an Watercolor Map ![]() A lightweight reference for city maps, hand-drawn routes, and landmark labels. View Case |
Case 332: Tea Pi Product Poster ![]() A beverage product image combining Chinese selling points and a clean commercial poster style. View Case |
Case 339: Apple-Style Nature Science Poster ![]() Minimal studio photography, a natural subject, and science-poster information layout. View Case |
Only the latest collection and import run is shown here. Older imports stay in the full gallery.
|
Case 418: Mid-Century City Travel Poster ![]() A strict three-color travel poster system with isometric city views, hatching, and screen-print texture. View Case |
Case 419: Croissant Baker Storyboard ![]() An 8-shot food video storyboard with timing, icon legend, warm bakery lighting, and step-by-step production panels. View Case |
Case 420: Red Track Summer Portrait ![]() A bright low-angle bridge portrait with red track texture, clean blue sky, and photorealistic summer lighting. View Case |
The full template library lives in docs/templates.md. Use the Prompt Template Categories above for quick category jumps, or open Industrial prompt templates and pitfalls guide for the complete template text.
- Start from the featured cases and decide what output type you want to imitate.
- Open the full gallery and find nearby cases. Copy structure first, then style words.
- Return to the template page and fill your business variables into the general or JSON templates.
During collection and research, this project references public prompt-library content from YouMind and OpenNana for learning, summarization, and methodology research. Copyright belongs to the original authors or platforms. If any content is infringing or inappropriate, please contact us and we will correct or remove it promptly.
This project only organizes publicly accessible community prompts and example images for learning and research. It does not claim ownership of any third-party original content.
All prompt cases and generated images in this repository were initially inspired by public community sources, especially YouMind and OpenNana. The project aims to break down strong examples into reusable structured protocols for learning, summarization, and automated testing with large-model agents.
- We make every effort to preserve original sources, including author profiles, original post links, and source repository links.
- For third-party content, we follow source repository statements, licenses such as
CC BY 4.0, and the relevant platform rules. - If you are the original author or rights holder and believe an entry should not be displayed, please open an Issue with the entry link. We will review it and remove it quickly when appropriate.
- This repository does not guarantee that third-party content can be used commercially. Please obtain authorization from the original rights holder before commercial use.
If this library helps you, please star the repository.
Search 苍何 on WeChat or scan the QR code below to follow Canghe's original WeChat official account. Reply with AI to get more AI prompt learning resources.
This project is open source under the MIT License. You can use, modify, distribute, and build on it freely while preserving the license notice.



























