cue-ai 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/CHANGELOG.md +4 -3
  2. package/README.md +148 -170
  3. package/bin/cue-learnings +30 -4
  4. package/bin/cue-review-progress +0 -0
  5. package/bin/cue-review-watch +0 -0
  6. package/dist/cue.js +4328 -3108
  7. package/package.json +1 -1
  8. package/plugins/cue/commands/cue-switch.md +1 -1
  9. package/plugins/cue/commands/cue.md +1 -1
  10. package/profiles/backend/profile.yaml +4 -0
  11. package/profiles/browser/profile.yaml +4 -0
  12. package/profiles/career/profile.yaml +2 -13
  13. package/profiles/commerce/profile.yaml +0 -2
  14. package/profiles/coolify/profile.yaml +0 -1
  15. package/profiles/core/profile.yaml +78 -11
  16. package/profiles/dash-merge-test/profile.yaml +6 -1
  17. package/profiles/designer/profile.yaml +9 -1
  18. package/profiles/dropshipping/profile.yaml +69 -0
  19. package/profiles/frontend/profile.yaml +4 -0
  20. package/profiles/google-ads/profile.yaml +34 -0
  21. package/profiles/google-analytics/profile.yaml +34 -0
  22. package/profiles/google-drive/profile.yaml +34 -0
  23. package/profiles/gstack/profile.yaml +117 -29
  24. package/profiles/marketing/profile.yaml +0 -1
  25. package/profiles/media/README.md +70 -0
  26. package/profiles/media/profile.yaml +104 -0
  27. package/profiles/nano-banana/profile.yaml +52 -0
  28. package/profiles/ops/profile.yaml +1 -2
  29. package/profiles/secops/profile.yaml +3 -0
  30. package/profiles/skill-writer/profile.yaml +15 -0
  31. package/profiles/video/profile.yaml +3 -0
  32. package/profiles/web-frontend-base/profile.yaml +6 -0
  33. package/profiles/webshop/profile.yaml +0 -1
  34. package/profiles/webshop-google/profile.yaml +1 -0
  35. package/profiles/x-growth-bot/profile.yaml +2 -0
  36. package/resources/icons/generate-icons.py +2 -128
  37. package/resources/mcps/configs/claude.sanitized.json +88 -20
  38. package/resources/mcps/configs/claude_runtime.sanitized.json +40 -1
  39. package/resources/mcps/configs/codex.sanitized.json +29 -0
  40. package/resources/skills/skills/career/job-hunter/LICENSE +21 -0
  41. package/resources/skills/skills/career/job-hunter/README.md +323 -0
  42. package/resources/skills/skills/career/job-hunter/SKILL.md +91 -0
  43. package/resources/skills/skills/career/job-hunter/agents/README.md +96 -0
  44. package/resources/skills/skills/career/job-hunter/agents/apply-assessment-prep.md +195 -0
  45. package/resources/skills/skills/career/job-hunter/agents/apply-ats-scan.md +155 -0
  46. package/resources/skills/skills/career/job-hunter/agents/apply-bias-audit.md +224 -0
  47. package/resources/skills/skills/career/job-hunter/agents/apply-cover-letter.md +69 -0
  48. package/resources/skills/skills/career/job-hunter/agents/apply-decode-jd.md +117 -0
  49. package/resources/skills/skills/career/job-hunter/agents/apply-fit-score.md +183 -0
  50. package/resources/skills/skills/career/job-hunter/agents/apply-linkedin-audit.md +74 -0
  51. package/resources/skills/skills/career/job-hunter/agents/apply-linkedin-scrape.md +255 -0
  52. package/resources/skills/skills/career/job-hunter/agents/apply-portfolio-brief.md +123 -0
  53. package/resources/skills/skills/career/job-hunter/agents/apply-reality-check.md +164 -0
  54. package/resources/skills/skills/career/job-hunter/agents/apply-reference-prep.md +150 -0
  55. package/resources/skills/skills/career/job-hunter/agents/apply-rejection-analysis.md +172 -0
  56. package/resources/skills/skills/career/job-hunter/agents/apply-resume.md +70 -0
  57. package/resources/skills/skills/career/job-hunter/agents/apply-skills-gap-filler.md +109 -0
  58. package/resources/skills/skills/career/job-hunter/agents/career-internal.md +94 -0
  59. package/resources/skills/skills/career/job-hunter/agents/career-linkedin-content.md +173 -0
  60. package/resources/skills/skills/career/job-hunter/agents/career-linkedin-scanner.md +262 -0
  61. package/resources/skills/skills/career/job-hunter/agents/career-network-message.md +108 -0
  62. package/resources/skills/skills/career/job-hunter/agents/career-promote.md +102 -0
  63. package/resources/skills/skills/career/job-hunter/agents/career-review.md +71 -0
  64. package/resources/skills/skills/career/job-hunter/agents/interview-debrief.md +117 -0
  65. package/resources/skills/skills/career/job-hunter/agents/interview-mock.md +171 -0
  66. package/resources/skills/skills/career/job-hunter/agents/interview-panel-decoder.md +152 -0
  67. package/resources/skills/skills/career/job-hunter/agents/interview-prep.md +184 -0
  68. package/resources/skills/skills/career/job-hunter/agents/interview-question-bank.md +133 -0
  69. package/resources/skills/skills/career/job-hunter/agents/interview-research.md +148 -0
  70. package/resources/skills/skills/career/job-hunter/agents/offer-compare.md +117 -0
  71. package/resources/skills/skills/career/job-hunter/agents/offer-counteroffer.md +144 -0
  72. package/resources/skills/skills/career/job-hunter/agents/offer-deadline-manager.md +148 -0
  73. package/resources/skills/skills/career/job-hunter/agents/offer-negotiate.md +126 -0
  74. package/resources/skills/skills/career/job-hunter/agents/offer-schedule.md +99 -0
  75. package/resources/skills/skills/career/job-hunter/agents/offer-thankyou.md +80 -0
  76. package/resources/skills/skills/career/job-hunter/agents/search-company-research.md +146 -0
  77. package/resources/skills/skills/career/job-hunter/agents/search-follow-up.md +129 -0
  78. package/resources/skills/skills/career/job-hunter/agents/search-ghost-job-detector.md +152 -0
  79. package/resources/skills/skills/career/job-hunter/agents/search-inbox-scan.md +193 -0
  80. package/resources/skills/skills/career/job-hunter/agents/search-interview-scorecard.md +164 -0
  81. package/resources/skills/skills/career/job-hunter/agents/search-jobs.md +149 -0
  82. package/resources/skills/skills/career/job-hunter/agents/search-momentum-check.md +194 -0
  83. package/resources/skills/skills/career/job-hunter/agents/search-outreach.md +85 -0
  84. package/resources/skills/skills/career/job-hunter/agents/search-referral-finder.md +124 -0
  85. package/resources/skills/skills/career/job-hunter/agents/search-salary.md +96 -0
  86. package/resources/skills/skills/career/job-hunter/agents/search-send-email.md +109 -0
  87. package/resources/skills/skills/career/job-hunter/agents/search-tracker-update.md +127 -0
  88. package/resources/skills/skills/career/job-hunter/inputs/README.md +26 -0
  89. package/resources/skills/skills/career/job-hunter/inputs/apply-linkedin-url.txt +8 -0
  90. package/resources/skills/skills/career/job-hunter/inputs/interview-context.md +24 -0
  91. package/resources/skills/skills/career/job-hunter/inputs/job-description.md +20 -0
  92. package/resources/skills/skills/career/job-hunter/inputs/job-search-criteria.md +36 -0
  93. package/resources/skills/skills/career/job-hunter/inputs/my-linkedin.md +24 -0
  94. package/resources/skills/skills/career/job-hunter/inputs/my-resume.md +28 -0
  95. package/resources/skills/skills/career/job-hunter/inputs/search-outreach-target.md +24 -0
  96. package/resources/skills/skills/career/job-hunter/rules/README.md +37 -0
  97. package/resources/skills/skills/career/job-hunter/rules/writing-rules.md +81 -0
  98. package/resources/skills/skills/design/banana/SKILL.md +375 -0
  99. package/resources/skills/skills/design/banana/references/cost-tracking.md +47 -0
  100. package/resources/skills/skills/design/banana/references/gemini-models.md +236 -0
  101. package/resources/skills/skills/design/banana/references/mcp-tools.md +145 -0
  102. package/resources/skills/skills/design/banana/references/post-processing.md +192 -0
  103. package/resources/skills/skills/design/banana/references/presets.md +69 -0
  104. package/resources/skills/skills/design/banana/references/prompt-engineering.md +481 -0
  105. package/resources/skills/skills/design/banana/scripts/batch.py +97 -0
  106. package/resources/skills/skills/design/banana/scripts/cost_tracker.py +191 -0
  107. package/resources/skills/skills/design/banana/scripts/edit.py +159 -0
  108. package/resources/skills/skills/design/banana/scripts/generate.py +168 -0
  109. package/resources/skills/skills/design/banana/scripts/presets.py +154 -0
  110. package/resources/skills/skills/design/banana/scripts/setup_mcp.py +151 -0
  111. package/resources/skills/skills/design/banana/scripts/validate_setup.py +133 -0
  112. package/resources/skills/skills/gstack/ship/SKILL.md +13 -0
  113. package/resources/skills/skills/media/3d-logo-animation/SKILL.md +59 -0
  114. package/resources/skills/skills/media/action-figure-generator/SKILL.md +48 -0
  115. package/resources/skills/skills/media/ad-creative/SKILL.md +79 -0
  116. package/resources/skills/skills/media/ai-clipping/SKILL.md +194 -0
  117. package/resources/skills/skills/media/ai-clipping/scripts/run-ai-clipping.sh +200 -0
  118. package/resources/skills/skills/media/ai-fight-scene/SKILL.md +132 -0
  119. package/resources/skills/skills/media/amazon-product-listing/SKILL.md +68 -0
  120. package/resources/skills/skills/media/animal-video-generator/SKILL.md +59 -0
  121. package/resources/skills/skills/media/award-ceremony-video/SKILL.md +87 -0
  122. package/resources/skills/skills/media/blog-header/SKILL.md +61 -0
  123. package/resources/skills/skills/media/brand-kit/SKILL.md +72 -0
  124. package/resources/skills/skills/media/brochures/SKILL.md +65 -0
  125. package/resources/skills/skills/media/cartoon-dance-animation/SKILL.md +62 -0
  126. package/resources/skills/skills/media/character-story-video/SKILL.md +84 -0
  127. package/resources/skills/skills/media/chibi-collage-effect/SKILL.md +63 -0
  128. package/resources/skills/skills/media/cinema-director/SKILL.md +93 -0
  129. package/resources/skills/skills/media/cinema-director/scripts/generate-film.sh +78 -0
  130. package/resources/skills/skills/media/color-analysis-board/SKILL.md +71 -0
  131. package/resources/skills/skills/media/core-edit/SKILL.md +48 -0
  132. package/resources/skills/skills/media/core-edit/edit-image.sh +54 -0
  133. package/resources/skills/skills/media/core-edit/enhance-image.sh +191 -0
  134. package/resources/skills/skills/media/core-edit/lipsync.sh +144 -0
  135. package/resources/skills/skills/media/core-edit/video-effects.sh +193 -0
  136. package/resources/skills/skills/media/core-media/SKILL.md +49 -0
  137. package/resources/skills/skills/media/core-media/create-music.sh +169 -0
  138. package/resources/skills/skills/media/core-media/generate-image.sh +161 -0
  139. package/resources/skills/skills/media/core-media/generate-video.sh +137 -0
  140. package/resources/skills/skills/media/core-media/image-to-video.sh +228 -0
  141. package/resources/skills/skills/media/core-media/schema_data.json +18708 -0
  142. package/resources/skills/skills/media/core-media/upload.sh +41 -0
  143. package/resources/skills/skills/media/core-platform/SKILL.md +41 -0
  144. package/resources/skills/skills/media/core-platform/check-result.sh +37 -0
  145. package/resources/skills/skills/media/core-platform/setup.sh +31 -0
  146. package/resources/skills/skills/media/couple-grid-creator/SKILL.md +47 -0
  147. package/resources/skills/skills/media/design-guide/SKILL.md +73 -0
  148. package/resources/skills/skills/media/drone-style-video/SKILL.md +61 -0
  149. package/resources/skills/skills/media/fashion-try-on/SKILL.md +61 -0
  150. package/resources/skills/skills/media/floor-plan-rendering/SKILL.md +56 -0
  151. package/resources/skills/skills/media/freeze-effect-video/SKILL.md +100 -0
  152. package/resources/skills/skills/media/giant-product-showcase/SKILL.md +61 -0
  153. package/resources/skills/skills/media/instagram-post/SKILL.md +58 -0
  154. package/resources/skills/skills/media/interior-design/SKILL.md +61 -0
  155. package/resources/skills/skills/media/interior-design-visualizer/SKILL.md +57 -0
  156. package/resources/skills/skills/media/jewelry-product-video/SKILL.md +61 -0
  157. package/resources/skills/skills/media/kdenlive/SKILL.md +106 -0
  158. package/resources/skills/skills/media/kdenlive/scripts/assemble.sh +57 -0
  159. package/resources/skills/skills/media/kdenlive/scripts/common.sh +30 -0
  160. package/resources/skills/skills/media/kdenlive/scripts/inspect.sh +19 -0
  161. package/resources/skills/skills/media/kdenlive/scripts/reframe.sh +22 -0
  162. package/resources/skills/skills/media/kdenlive/scripts/render.sh +16 -0
  163. package/resources/skills/skills/media/kdenlive/scripts/title-card.sh +25 -0
  164. package/resources/skills/skills/media/keyboard-art-maker/SKILL.md +44 -0
  165. package/resources/skills/skills/media/logo-branding/SKILL.md +70 -0
  166. package/resources/skills/skills/media/logo-creator/SKILL.md +80 -0
  167. package/resources/skills/skills/media/logo-creator/scripts/create-logo.sh +38 -0
  168. package/resources/skills/skills/media/logo-generator/SKILL.md +56 -0
  169. package/resources/skills/skills/media/multi-angle-reshoot/SKILL.md +70 -0
  170. package/resources/skills/skills/media/multi-angle-shots/SKILL.md +73 -0
  171. package/resources/skills/skills/media/music-video/SKILL.md +61 -0
  172. package/resources/skills/skills/media/nano-banana/SKILL.md +80 -0
  173. package/resources/skills/skills/media/nano-banana/scripts/generate-nano-art.sh +54 -0
  174. package/resources/skills/skills/media/one-shot-video/SKILL.md +56 -0
  175. package/resources/skills/skills/media/photo-pack-generator/SKILL.md +205 -0
  176. package/resources/skills/skills/media/photo-pack-generator/scripts/generate-pack.sh +241 -0
  177. package/resources/skills/skills/media/product-ad-cinematic/SKILL.md +78 -0
  178. package/resources/skills/skills/media/product-campaign/SKILL.md +76 -0
  179. package/resources/skills/skills/media/product-showcase-video/SKILL.md +60 -0
  180. package/resources/skills/skills/media/product-video-ad-maker/SKILL.md +59 -0
  181. package/resources/skills/skills/media/rednote-cover/SKILL.md +57 -0
  182. package/resources/skills/skills/media/seedance-2/SKILL.md +632 -0
  183. package/resources/skills/skills/media/seedance-2/scripts/generate-seedance.sh +701 -0
  184. package/resources/skills/skills/media/selfie-with-celebrities/SKILL.md +64 -0
  185. package/resources/skills/skills/media/social-media-video/SKILL.md +277 -0
  186. package/resources/skills/skills/media/social-media-video/scripts/run-social-video.sh +316 -0
  187. package/resources/skills/skills/media/social-pack/SKILL.md +58 -0
  188. package/resources/skills/skills/media/storyboard/SKILL.md +57 -0
  189. package/resources/skills/skills/media/storyboard-to-cooking-video/SKILL.md +143 -0
  190. package/resources/skills/skills/media/talking-baby-video/SKILL.md +57 -0
  191. package/resources/skills/skills/media/ugc-ads-workflow/SKILL.md +70 -0
  192. package/resources/skills/skills/media/ugc-lifestyle-try-on/SKILL.md +65 -0
  193. package/resources/skills/skills/media/ugc-video-factory/SKILL.md +134 -0
  194. package/resources/skills/skills/media/ui-design/SKILL.md +81 -0
  195. package/resources/skills/skills/media/ui-design/scripts/generate-mockup.sh +49 -0
  196. package/resources/skills/skills/media/url-to-design/SKILL.md +61 -0
  197. package/resources/skills/skills/media/workflow/SKILL.md +197 -0
  198. package/resources/skills/skills/media/workflow/scripts/discover-workflow.sh +18 -0
  199. package/resources/skills/skills/media/workflow/scripts/generate-workflow.sh +33 -0
  200. package/resources/skills/skills/media/workflow/scripts/interactive-run.sh +16 -0
  201. package/resources/skills/skills/media/workflow/scripts/list-workflows.sh +20 -0
  202. package/resources/skills/skills/media/workflow/scripts/run-workflow.sh +34 -0
  203. package/resources/skills/skills/media/youtube-shorts/SKILL.md +173 -0
  204. package/resources/skills/skills/media/youtube-shorts/scripts/run-youtube-shorts.sh +141 -0
  205. package/resources/skills/skills/media/youtube-thumbnail/SKILL.md +66 -0
  206. package/resources/skills/skills/meta/cue-developer/references/architecture.md +2 -2
  207. package/resources/skills/skills/meta/cue-usage/SKILL.md +1 -1
  208. package/resources/skills/skills/meta/profile-fit-monitor/SKILL.md +2 -2
  209. package/resources/skills/skills/meta/profile-optimizer/SKILL.md +1 -1
  210. package/resources/skills/skills/meta/profile-suggest/SKILL.md +7 -7
  211. package/resources/skills/skills/meta/profile-summon/SKILL.md +159 -0
  212. package/resources/skills/skills/meta/profile-summon/evals/evals.json +53 -0
  213. package/resources/skills/skills/meta/save-profile/SKILL.md +1 -1
  214. package/resources/skills/skills/meta/skill-reviewer/SKILL.md +3 -0
  215. package/resources/skills/skills/meta/skill-reviewer/references/tdd-for-skills.md +55 -0
  216. package/resources/skills/skills/research/find-skills/SKILL.md +1 -1
  217. package/resources/skills/skills/review/code-review-deep/SKILL.md +20 -0
  218. package/resources/skills/skills/security/trivy-scan/SKILL.md +139 -0
  219. package/resources/skills/skills/security/trivy-scan/scripts/ensure-trivy.sh +21 -0
  220. package/resources/skills/skills/tools/ccusage/SKILL.md +142 -0
  221. package/src/commands/_index.ts +8 -0
  222. package/src/commands/ai.ts +2 -2
  223. package/src/commands/auto-detect.test.ts +74 -0
  224. package/src/commands/auto-detect.ts +9 -7
  225. package/src/commands/cli.test.ts +20 -4
  226. package/src/commands/cli.ts +36 -20
  227. package/src/commands/create-profile.ts +2 -2
  228. package/src/commands/debug.ts +2 -2
  229. package/src/commands/discover.ts +14 -4
  230. package/src/commands/export-docker.ts +1 -1
  231. package/src/commands/features-batch1.test.ts +1 -1
  232. package/src/commands/gates.ts +1 -1
  233. package/src/commands/import-profile.ts +1 -1
  234. package/src/commands/init.ts +15 -11
  235. package/src/commands/install.test.ts +192 -0
  236. package/src/commands/install.ts +610 -0
  237. package/src/commands/launch-handoff.e2e.test.ts +33 -1
  238. package/src/commands/launch.e2e.test.ts +15 -10
  239. package/src/commands/launch.ts +73 -116
  240. package/src/commands/materialize.ts +2 -2
  241. package/src/commands/prune.ts +1 -1
  242. package/src/commands/security-audit.ts +1 -1
  243. package/src/commands/shell.ts +7 -7
  244. package/src/commands/skill-report.ts +1 -1
  245. package/src/commands/skills.ts +3 -3
  246. package/src/commands/snapshot.ts +2 -2
  247. package/src/commands/summon.test.ts +116 -0
  248. package/src/commands/summon.ts +338 -0
  249. package/src/commands/trigger-gaps.ts +1 -1
  250. package/src/commands/use.ts +47 -3
  251. package/src/commands/watch-live.ts +5 -5
  252. package/src/commands/watch.ts +8 -8
  253. package/src/index.ts +2 -0
  254. package/src/lib/active-sessions.test.ts +3 -3
  255. package/src/lib/active-sessions.ts +4 -4
  256. package/src/lib/auto-detect.test.ts +172 -8
  257. package/src/lib/auto-detect.ts +191 -136
  258. package/src/lib/codex-persona-parity.test.ts +58 -0
  259. package/src/lib/companion-detect.test.ts +43 -1
  260. package/src/lib/companion-detect.ts +35 -0
  261. package/src/lib/credentials-sync.test.ts +121 -1
  262. package/src/lib/credentials-sync.ts +95 -1
  263. package/src/lib/cwd-resolver.test.ts +8 -8
  264. package/src/lib/cwd-resolver.ts +2 -2
  265. package/src/lib/dashboard-merge.test.ts +9 -4
  266. package/src/lib/dashboard-server.ts +1 -1
  267. package/src/lib/picker.test.ts +1 -1
  268. package/src/lib/picker.ts +5 -5
  269. package/src/lib/profile-merge.test.ts +8 -0
  270. package/src/lib/profile-names.test.ts +3 -3
  271. package/src/lib/runtime-install.ts +166 -0
  272. package/src/lib/runtime-materializer.test.ts +137 -0
  273. package/src/lib/runtime-materializer.ts +105 -2
  274. package/src/lib/skill-router.test.ts +38 -0
  275. package/src/lib/skill-router.ts +65 -4
  276. package/profiles/eu-tender-research/README.md +0 -48
  277. package/profiles/eu-tender-research/logo.png +0 -0
  278. package/profiles/eu-tender-research/profile.yaml +0 -108
@@ -0,0 +1,481 @@
1
+ # Prompt Engineering Reference -- Banana Claude
2
+
3
+ > Load this on-demand when constructing complex prompts or when the user
4
+ > asks about prompt techniques. Do NOT load at startup.
5
+ >
6
+ > Aligned with Google's March 2026 "Ultimate Prompting Guide" for Gemini image generation.
7
+
8
+ ## The 5-Component Prompt Formula
9
+
10
+ > Based on Google's officially validated prompt structure for Gemini image models.
11
+ > Write as natural narrative paragraphs -- NEVER as comma-separated keyword lists.
12
+
13
+ ### Component 1 -- SUBJECT
14
+ Who or what is the primary focus. Be specific about physical characteristics,
15
+ material, species, age, expression. Never write just "a person" or "a product."
16
+
17
+ **Good:** "A weathered Japanese ceramicist in his 70s, deep sun-etched
18
+ wrinkles mapping decades of kiln work, calloused hands cradling a
19
+ freshly thrown tea bowl with an irregular, organic rim"
20
+
21
+ **Bad:** "old man, ceramic, bowl"
22
+
23
+ ### Component 2 -- ACTION
24
+ What the subject is doing, or the primary visual state. Use strong present-
25
+ tense verbs. "floats weightlessly," "holds a glowing lantern," "sits perfectly
26
+ still." If no action, describe pose or arrangement.
27
+
28
+ **Good:** "leaning forward with intense concentration, gently smoothing
29
+ the rim with a wet thumb, a thin trail of slip running down his wrist"
30
+
31
+ **Bad:** "making pottery"
32
+
33
+ ### Component 3 -- LOCATION / CONTEXT
34
+ Where the scene takes place. Include environmental details, time of day,
35
+ atmospheric conditions. "inside the cupola module of the International Space
36
+ Station," "on a rain-slicked Tokyo alley at 2am."
37
+
38
+ **Good:** "inside a traditional wood-fired anagama kiln workshop,
39
+ stacked shelves of drying pots visible in the soft background, late
40
+ afternoon light filtering through rice paper screens"
41
+
42
+ **Bad:** "workshop, afternoon"
43
+
44
+ ### Component 4 -- COMPOSITION
45
+ Camera perspective, framing, and spatial relationship. "medium shot centered
46
+ against the window," "extreme low-angle looking up," "bird's-eye view from
47
+ 30 meters," "tight close-up on hands."
48
+
49
+ **Good:** "intimate close-up shot from slightly below eye level,
50
+ shallow depth of field isolating the hands and bowl against the
51
+ soft bokeh of the workshop behind"
52
+
53
+ **Bad:** "close up"
54
+
55
+ ### Component 5 -- STYLE (includes lighting)
56
+ The visual register, aesthetic, medium, and lighting combined. Reference real
57
+ cameras, film stock, photographers, publications, or art movements. Lighting
58
+ lives here as a sub-element, not a separate component.
59
+
60
+ **Good:** "shot on a Fujifilm X-T4 with warm color science and natural
61
+ bokeh, warm directional light from a single high window camera-left
62
+ creating gentle Rembrandt lighting on the face with deep warm shadows.
63
+ Reminiscent of Dorothea Lange's documentary portraiture"
64
+
65
+ **Bad:** "photorealistic, 8K, masterpiece" (see Banned Keywords below)
66
+
67
+ ## Domain Mode Modifier Libraries
68
+
69
+ ### Cinema Mode
70
+ **Camera specs:** RED V-Raptor, ARRI Alexa 65, Sony Venice 2, Blackmagic URSA
71
+ **Lenses:** Cooke S7/i, Zeiss Supreme Prime, Atlas Orion anamorphic
72
+ **Film stocks:** Kodak Vision3 500T (tungsten), Kodak Vision3 250D (daylight), Fuji Eterna Vivid
73
+ **Lighting setups:** three-point, chiaroscuro, Rembrandt, split, butterfly, rim/backlight
74
+ **Shot types:** establishing wide, medium close-up, extreme close-up, Dutch angle, overhead crane, Steadicam tracking
75
+ **Color grading:** teal and orange, desaturated cold, warm vintage, high-contrast noir
76
+
77
+ ### Product Mode
78
+ **Surfaces:** polished marble, brushed concrete, raw linen, acrylic riser, gradient sweep
79
+ **Lighting:** softbox diffused, hard key with fill card, rim separation, tent lighting, light painting
80
+ **Angles:** 45-degree hero, flat lay, three-quarter, straight-on, worm's-eye
81
+ **Style refs:** Apple product photography, Aesop minimal, Bang & Olufsen clean, luxury cosmetics
82
+
83
+ ### Portrait Mode
84
+ **Focal lengths:** 85mm (classic), 105mm (compression), 135mm (telephoto), 50mm (environmental)
85
+ **Apertures:** f/1.4 (dreamy bokeh), f/2.8 (subject-sharp), f/5.6 (environmental context)
86
+ **Pose language:** candid mid-gesture, direct-to-camera confrontational, profile silhouette, over-shoulder glance
87
+ **Skin/texture:** freckles visible, pores at macro distance, catch light in eyes, subsurface scattering
88
+
89
+ ### Editorial/Fashion Mode
90
+ **Publication refs:** Vogue Italia, Harper's Bazaar, GQ, National Geographic, Kinfolk
91
+ **Styling notes:** layered textures, statement accessories, monochromatic palette, contrast patterns
92
+ **Locations:** marble staircase, rooftop at golden hour, industrial loft, desert dunes, neon-lit alley
93
+ **Poses:** power stance, relaxed editorial lean, movement blur, fabric in wind
94
+
95
+ ### UI/Web Mode
96
+ **Styles:** flat vector, isometric 3D, line art, glassmorphism, neumorphism, material design
97
+ **Colors:** specify exact hex or descriptive palette (e.g., "cool blues #2563EB to #1E40AF")
98
+ **Sizing:** design at 2x for retina, specify exact pixel dimensions needed
99
+ **Backgrounds:** transparent (request solid white then post-process), gradient, solid color
100
+
101
+ ### Logo Mode
102
+ **Construction:** geometric primitives, golden ratio, grid-based, negative space
103
+ **Typography:** bold sans-serif, elegant serif, custom lettermark, monogram
104
+ **Colors:** max 2-3 colors, works in monochrome, high contrast
105
+ **Output:** request on solid white background, post-process to transparent
106
+
107
+ ### Landscape Mode
108
+ **Depth layers:** foreground interest, midground subject, background atmosphere
109
+ **Atmospherics:** fog, mist, haze, volumetric light rays, dust particles
110
+ **Time of day:** blue hour (pre-dawn), golden hour, magic hour (post-sunset), midnight blue
111
+ **Weather:** dramatic storm clouds, clearing after rain, snow-covered, sun-dappled
112
+
113
+ ### Infographic Mode
114
+ **Layout:** modular sections, clear visual hierarchy, bento grid, flow top-to-bottom
115
+ **Text:** use quotes for exact text, descriptive font style, specify size hierarchy
116
+ **Data viz:** bar charts, pie charts, flow diagrams, timelines, comparison tables
117
+ **Colors:** high-contrast, accessible palette, consistent brand colors
118
+
119
+ ### Abstract Mode
120
+ **Geometry:** fractals, voronoi tessellation, spirals, fibonacci, organic flow, crystalline
121
+ **Textures:** marble veining, fluid dynamics, smoke wisps, ink diffusion, watercolor bleed
122
+ **Color palettes:** analogous harmony, complementary clash, monochromatic gradient, neon-on-black
123
+ **Styles:** generative art, data visualization art, glitch, procedural, macro photography of materials
124
+
125
+ ## Advanced Techniques
126
+
127
+ ### Character Consistency (Multi-turn)
128
+ Use `gemini_chat` and maintain descriptive anchors:
129
+ - First turn: Generate character with exhaustive physical description
130
+ - Following turns: Reference "the same character" + repeat 2-3 key identifiers
131
+ - Key identifiers: hair color/style, distinctive clothing, facial feature
132
+
133
+ **Multi-image reference technique** (3.1 Flash):
134
+ - Provide up to 4-5 character reference images in the conversation
135
+ - Assign distinct names to each character ("Character A: the red-haired knight")
136
+ - Model preserves features across different angles, actions, and environments
137
+ - Works best when reference images show the character from multiple angles
138
+
139
+ ### Style Transfer Without Reference Images
140
+ Describe the target style exhaustively instead of referencing an image:
141
+ ```
142
+ Render this scene in the style of a 1950s travel poster: flat areas of
143
+ color in a limited palette of teal, coral, and cream. Bold geometric
144
+ shapes with visible paper texture. Hand-lettered title text with a
145
+ mid-century modern typeface feel.
146
+ ```
147
+
148
+ ### Text Rendering Tips
149
+ - Quote exact text: `with the text "OPEN DAILY" in bold condensed sans-serif`
150
+ - **25 characters or less** -- this is the practical limit for reliable rendering
151
+ - **2-3 distinct phrases max** -- more text fragments degrade quality
152
+ - Describe font characteristics, not font names
153
+ - Specify placement: "centered at the top third", "along the bottom edge"
154
+ - High contrast: light text on dark, or vice versa
155
+ - **Text-first hack:** Establish the text concept conversationally first ("I need a sign that says FRESH BREAD"), then generate -- the model anchors on text mentioned early
156
+ - Expect creative font interpretations, not exact replication of described styles
157
+
158
+ ### Positive Framing (No Negative Prompts)
159
+ Gemini does NOT support negative prompts. Rephrase exclusions:
160
+ - Instead of "no blur" → "sharp, in-focus, tack-sharp detail"
161
+ - Instead of "no people" → "empty, deserted, uninhabited"
162
+ - Instead of "no text" → "clean, uncluttered, text-free"
163
+ - Instead of "not dark" → "brightly lit, high-key lighting"
164
+
165
+ ### Search-Grounded Generation
166
+ For images based on real-world data (weather, events, statistics),
167
+ Gemini can use Google Search grounding to incorporate live information.
168
+ Useful for infographics with current data.
169
+
170
+ **Three-part formula for search-grounded prompts:**
171
+ 1. `[Source/Search request]` -- What to look up
172
+ 2. `[Analytical task]` -- What to analyze or extract
173
+ 3. `[Visual translation]` -- How to render it as an image
174
+
175
+ **Example:** "Search for the current top 5 programming languages by GitHub usage in 2026, analyze their relative popularity percentages, then generate a clean infographic bar chart with the language logos and percentages in a modern dark theme."
176
+
177
+ ## ❌ BANNED PROMPT KEYWORDS -- NEVER USE THESE
178
+
179
+ The Nano Banana model's internal system prompt explicitly penalizes these
180
+ Stable Diffusion-era terms. Using them degrades output quality.
181
+
182
+ NEVER include:
183
+ - "4k" / "8k" / "ultra HD" / "high resolution" (use the `imageSize` parameter instead)
184
+ - "masterpiece"
185
+ - "highly detailed" / "ultra detailed"
186
+ - "trending on artstation"
187
+ - "hyperrealistic" / "ultra realistic"
188
+ - "photorealistic" (describe the camera/film instead)
189
+ - "best quality"
190
+ - "award winning" (use specific publication names instead)
191
+
192
+ USE THESE INSTEAD (prestigious context anchors that actively improve composition):
193
+ - "Pulitzer Prize-winning cover photograph"
194
+ - "Vanity Fair editorial portrait"
195
+ - "National Geographic cover story"
196
+ - "WIRED magazine feature spread"
197
+ - "Architectural Digest interior"
198
+ - "Magnum Photos documentary"
199
+
200
+ ## ⚠️ NEGATIVE PROMPTS -- No API parameter exists
201
+
202
+ Nano Banana models have NO dedicated negative prompt parameter. Do not pass
203
+ negative instructions as a separate API argument -- it will be ignored.
204
+
205
+ Correct approach: semantic reframing. Express what you want, not what you
206
+ don't want.
207
+
208
+ ❌ WRONG: "no cars, no people, no clutter in the background"
209
+ ✅ RIGHT: "an empty, deserted street, completely still, no signs of activity"
210
+
211
+ ❌ WRONG: "no watermarks, no text"
212
+ ✅ RIGHT: (add to prompt) "NEVER include any text, labels, or watermarks"
213
+
214
+ For critical constraints, ALL CAPS emphasis improves adherence:
215
+ - "MUST contain exactly three figures"
216
+ - "NEVER include any visible horizon line"
217
+ - "ONLY show the product, nothing else in frame"
218
+
219
+ ## Prompt Length Guide
220
+
221
+ | Use case | Target length | Notes |
222
+ |---|---|---|
223
+ | Quick draft / concept | 20–60 words (1–2 sentences) | Good for ideation |
224
+ | Standard generation | 100–200 words (3–5 sentences) | Production default |
225
+ | Complex professional | 200–300 words | Full 5-component treatment |
226
+ | Maximum specification | Up to 2,600 tokens | JSON/Markdown structured format supported |
227
+
228
+ Nano Banana 2 accepts up to 131,072 input tokens. Do not artificially truncate
229
+ a prompt to hit a word count target -- quality and specificity matter more.
230
+
231
+ ## Text Rendering in Images
232
+
233
+ Nano Banana 2 has excellent text rendering. Rules:
234
+ 1. Enclose desired text in quotation marks in the prompt: "LAUNCH DAY"
235
+ 2. Specify font characteristics explicitly: "bold white sans-serif," "Century Gothic"
236
+ 3. Specify placement: "centered at the bottom third," "upper left corner"
237
+ 4. For complex layouts, describe text placement before requesting the image
238
+
239
+ Example: Place the text "Happy Birthday, Sarah" in a warm gold serif font
240
+ centered in the lower third of the image.
241
+
242
+ Known limitation: Small text (<16px equivalent) and complex multilingual text
243
+ may require iterative refinement.
244
+
245
+ ## Prompt Adaptation Rules
246
+
247
+ When adapting prompts from the claude-prompts database (Midjourney/DALL-E/etc.)
248
+ to Gemini's natural language format:
249
+
250
+ | Source Syntax | Gemini Equivalent |
251
+ |---------------|-------------------|
252
+ | `--ar 16:9` | Call `set_aspect_ratio("16:9")` separately |
253
+ | `--v 6`, `--style raw` | Remove -- Gemini has no version/style flags |
254
+ | `--chaos 50` | Describe variety: "unexpected, surreal composition" |
255
+ | `--no trees` | Positive framing: "open clearing with no vegetation" |
256
+ | `(word:1.5)` weight | Descriptive emphasis: "prominently featuring [word]" |
257
+ | `8K, masterpiece, ultra-detailed` | Remove ALL of these -- they are banned. Use prestigious context anchors instead (see Banned Keywords section) |
258
+ | Comma-separated tags | Expand into descriptive narrative paragraphs |
259
+ | `shot on Hasselblad` | Keep -- camera specs work well in Gemini |
260
+
261
+ ## Common Prompt Mistakes
262
+
263
+ 1. **Keyword stuffing** -- stacking generic quality terms ("8K, masterpiece, best quality, ultra-realistic") actively degrades output. Use prestigious context anchors instead (see Banned Keywords section)
264
+ 2. **Tag lists** -- Gemini wants prose, not "red car, sunset, mountain, cinematic"
265
+ 3. **Missing lighting** -- The single biggest quality differentiator
266
+ 4. **No composition direction** -- Results in generic centered framing
267
+ 5. **Vague style** -- "make it look cool" vs specific art direction
268
+ 6. **Ignoring aspect ratio** -- Always set before generating
269
+ 7. **Overlong prompts** -- Diminishing returns past ~200 words; be precise, not verbose
270
+ 8. **Text longer than ~25 characters** -- Rendering degrades rapidly past this limit
271
+ 9. **Burying key details at the end** -- In long prompts, details placed last may be deprioritized; put critical specifics (exact text, key constraints) in the first third of the prompt
272
+ 10. **Not iterating with follow-up prompts** -- Use `gemini_chat` for progressive refinement instead of trying to get everything right in one generation
273
+
274
+ ## Proven Prompt Templates
275
+
276
+ > Extracted from 2,500+ tested prompts. These patterns consistently produce
277
+ > high-quality results. Use them as starting points and adapt to the request.
278
+
279
+ ### The Winning Formula (Weight Distribution)
280
+
281
+ | Component | Weight | What to include |
282
+ |-----------|--------|-----------------|
283
+ | **Subject** | 30% | Age, skin tone, hair color/style, eye color, body type, expression |
284
+ | **Action** | 10% | Movement, pose, gesture, interaction, state of being |
285
+ | **Context** | 15% | Location + time of day + weather + context details |
286
+ | **Composition** | 10% | Shot type, camera angle, framing, focal length, f-stop |
287
+ | **Lighting** | 10% | Quality, direction, color temperature, shadows |
288
+ | **Style** | 25% | Art medium, brand names, textures, camera model, color grading |
289
+
290
+ ### Instagram Ad / Social Media
291
+
292
+ **Pattern:** `[Subject with age/appearance] + [outfit with brand/texture] + [action verb] + [setting] + [camera spec] + [lighting] + [platform aesthetic]`
293
+
294
+ **Example (Product Placement):**
295
+ ```
296
+ Hyper-realistic gym selfie of athletic 24yo influencer with glowing olive
297
+ skin, wearing crinkle-textured athleisure set in mauve. iPhone 16 Pro Max
298
+ front-facing portrait mode capturing sweat droplets on collarbones, hazel
299
+ eyes enhanced by gym LED lighting. Mirror reflection shows perfect form,
300
+ golden morning light through floor-to-ceiling windows. Frayed chestnut
301
+ ponytail with baby hairs, visible skin texture with natural erythema from
302
+ workout. Vanity Fair wellness editorial aesthetic.
303
+ ```
304
+
305
+ **Example (Lifestyle Ad):**
306
+ ```
307
+ A 24-year-old blonde fitness model in a high-energy sports drink
308
+ advertisement. Mid-run on a beach, wearing a vibrant orange sports bra
309
+ and black shorts, playful smile and sparkling blue eyes exuding vitality.
310
+ Bottle of the drink held in hand, waves crashing in background. Shot on
311
+ Nikon D850 with 70-200mm f/2.8 lens, natural light, fast shutter speed
312
+ capturing motion. Visible skin texture, water droplets, product label
313
+ clearly visible. National Geographic fitness feature aesthetic.
314
+ ```
315
+
316
+ **Example (Luxury Lifestyle):**
317
+ ```
318
+ Gorgeous Instagram model wearing a designer silk gown, luxury rooftop
319
+ restaurant, golden hour lighting, champagne in hand, luxurious aspirational
320
+ lifestyle. Captured with Sony A7R IV, 85mm f/1.4 lens, shallow depth of
321
+ field, warm color grading.
322
+ ```
323
+
324
+ ### Product / Commercial Photography
325
+
326
+ **Pattern:** `[Product with brand/detail] + [dynamic elements] + [surface/setting] + "commercial photography for advertising campaign" + [lighting] + [prestigious publication reference]`
327
+
328
+ **Example (Beverage):**
329
+ ```
330
+ Gatorade bottle with condensation dripping down the sides, surrounded by
331
+ lightning bolts and a burst of vibrant blue and orange light rays. The
332
+ Gatorade logo is prominently displayed on the bottle, with splashes of
333
+ water frozen in mid-air. Commercial food photography for an advertising
334
+ campaign, vibrant complementary colors. Bon Appetit magazine cover aesthetic.
335
+ ```
336
+
337
+ **Example (Food):**
338
+ ```
339
+ In and Out burger with layers of fresh lettuce, melted cheese, and pretzel
340
+ bun, placed on a white surface with the In and Out logo subtly glowing in
341
+ the background. Falling french fries and golden light, warm scene.
342
+ Commercial food photography for an advertising campaign, vibrant
343
+ complementary colors. Shot in the style of a Bon Appetit feature spread.
344
+ ```
345
+
346
+ ### Fashion / Editorial
347
+
348
+ **Pattern:** `[Subject with ethnicity/age/features] + [outfit with texture/brand/cut] + [location] + [pose/action] + [camera + lens] + [lighting quality]`
349
+
350
+ **Example (Street Style):**
351
+ ```
352
+ A 24-year-old female AI influencer posing confidently in an urban cityscape
353
+ during golden hour. Flawless sun-kissed skin, long wavy brown hair, deep
354
+ green eyes. Wearing a chic streetwear outfit -- oversized beige blazer,
355
+ white top, high-waisted jeans. Captured with Sony A7R IV at 85mm f/1.4,
356
+ shallow depth of field with warm golden bokeh.
357
+ ```
358
+
359
+ **Example (High Fashion):**
360
+ ```
361
+ Stunning 24-year-old woman, long platinum blonde hair, radiant skin,
362
+ piercing blue eyes, dressed in a chic pastel blazer with a modern
363
+ minimalist aesthetic, soft sunlight glow, high-end fashion appeal.
364
+ Shot on Canon EOS R5, 85mm f/1.2 lens.
365
+ ```
366
+
367
+ **Example (Avant-Garde):**
368
+ ```
369
+ A blonde fitness model transformed into a runway-ready fashion icon,
370
+ wearing a bold avant-garde outfit: cropped leather jacket with neon pink
371
+ accents, paired with high-waisted athletic shorts and knee-high boots.
372
+ Captured mid-stride on a minimalist white runway, playful twinkle in her
373
+ eye, dramatic studio lighting from above.
374
+ ```
375
+
376
+ ### SaaS / Tech Marketing
377
+
378
+ **Pattern:** `[UI mockup or abstract visual] + "on [dark/light] background" + [specific colors with hex] + [typography description] + "clean, premium SaaS aesthetic" + [glassmorphism/gradient/glow effects]`
379
+
380
+ **Example (Dashboard Hero):**
381
+ ```
382
+ A floating glassmorphism UI card on a deep charcoal background showing a
383
+ content analytics dashboard with a rising line graph in teal (#14B8A6),
384
+ bar charts in coral (#F97316), and a circular progress indicator at 94%.
385
+ Subtle grid lines, frosted glass effect with 20% opacity, teal glow
386
+ bleeding from the card edges. Clean premium SaaS aesthetic, no text
387
+ smaller than headline size.
388
+ ```
389
+
390
+ **Example (Feature Highlight):**
391
+ ```
392
+ An isometric 3D illustration of interconnected data nodes on a dark navy
393
+ background. Each node is a glowing teal sphere connected by thin luminous
394
+ lines, forming a constellation pattern. One central node pulses brighter
395
+ with radiating rings. Modern tech illustration style with subtle depth
396
+ of field, volumetric lighting from below.
397
+ ```
398
+
399
+ **Example (Comparison/Before-After):**
400
+ ```
401
+ Split-screen image: left side shows a cluttered, dim workspace with
402
+ scattered papers, red error indicators, and a frustrated expression
403
+ conveyed through a cracked coffee mug and tangled cables. Right side
404
+ shows a clean, organized dashboard interface glowing in teal and white
405
+ on a dark background, with smooth flowing lines and checkmarks. A sharp
406
+ vertical dividing line separates chaos from clarity.
407
+ ```
408
+
409
+ ### Logo / Branding
410
+
411
+ **Pattern:** `[Product/bottle/item] + "with [brand element] prominently displayed" + [dynamic visual elements] + "commercial photography" + [lighting style] + [prestigious publication reference]`
412
+
413
+ **Example:**
414
+ ```
415
+ A sleek matte black bottle with a minimal white logo mark centered on the
416
+ label, surrounded by swirling gradient ribbons of teal and coral light.
417
+ The bottle sits on a reflective dark surface, sharp studio rim lighting
418
+ separating it from the background. Product photography for luxury
419
+ branding, dramatic contrast. Wallpaper* magazine design editorial.
420
+ ```
421
+
422
+ ### Key Tactics That Make Prompts Work
423
+
424
+ 1. **Name real cameras** -- "Sony A7R IV", "Canon EOS R5", "iPhone 16 Pro Max" anchor realism
425
+ 2. **Specify exact lens** -- "85mm f/1.4" gives the model precise depth-of-field information
426
+ 3. **Use age + ethnicity + features** -- "24yo with olive skin, hazel eyes" beats "a person"
427
+ 4. **Name brands for styling** -- "Lululemon mat", "Tom Ford suit" triggers specific visual associations
428
+ 5. **Include micro-details** -- "sweat droplets on collarbones", "baby hairs stuck to neck"
429
+ 6. **Add platform context** -- "Instagram aesthetic", "commercial photography for advertising"
430
+ 7. **Describe textures** -- "crinkle-textured", "metallic silver", "frosted glass"
431
+ 8. **Use action verbs** -- "mid-run", "posing confidently", "captured mid-stride"
432
+ 9. **Use prestigious context anchors** -- "Pulitzer Prize-winning photograph," "Vanity Fair editorial," "National Geographic cover" actively improve quality. NEVER use "ultra-realistic," "8K," "masterpiece" -- these are banned (see Banned Keywords)
433
+ 10. **For products, say "prominently displayed"** -- ensures the product/logo isn't hidden
434
+
435
+ ### Anti-Patterns (What NOT to Do)
436
+
437
+ - **"A dark-themed Instagram ad showing..."** -- too meta, describes the concept not the image
438
+ - **"A sleek SaaS dashboard visualization..."** -- abstract, no visual anchors
439
+ - **"Modern, clean, professional..."** -- vague adjectives that mean nothing to the model
440
+ - **"A bold call to action with..."** -- describes marketing intent, not visual content
441
+ - **Describing what the viewer should feel** -- instead, describe what creates that feeling
442
+
443
+ ## Safety Filter Rephrase Strategies
444
+
445
+ Gemini's safety filters (Layer 2: server-side output filter) cannot be disabled.
446
+ When a prompt is blocked, the only path forward is rephrasing.
447
+
448
+ ### Common Trigger Categories
449
+
450
+ | Category | Triggers on | Rephrase approach |
451
+ |----------|------------|-------------------|
452
+ | Violence/weapons | Combat, blood, injuries, firearms | Use metaphor or aftermath: "battle-worn" → "weathered veteran" |
453
+ | Medical/gore | Surgery, wounds, anatomical detail | Abstract or clinical: "open wound" → "medical illustration" |
454
+ | Real public figures | Named celebrities, politicians | Use archetypes: "Elon Musk" → "a tech entrepreneur in a minimalist office" |
455
+ | Children + risk | Minors in any ambiguous context | Add safety context: specify educational, family, or playful framing |
456
+ | NSFW/suggestive | Revealing clothing, intimate poses | Use artistic framing: "fashion editorial, fully clothed, editorial pose" |
457
+
458
+ ### Rephrase Patterns
459
+
460
+ 1. **Abstraction** -- Replace specific dangerous elements with abstract concepts
461
+ 2. **Artistic framing** -- Frame content as art, editorial, or documentary
462
+ 3. **Metaphor** -- Use symbolic language instead of literal descriptions
463
+ 4. **Positive emphasis** -- Describe what IS present, not what's dangerous
464
+ 5. **Context shift** -- Move from threatening to educational/professional context
465
+
466
+ ### Example Rephrases
467
+
468
+ | Blocked prompt | Successful rephrase |
469
+ |----------------|---------------------|
470
+ | "a soldier in combat firing a rifle" | "a determined soldier standing guard at dawn, rifle slung over shoulder, morning mist over the outpost" |
471
+ | "a scary horror monster" | "a fantastical creature from a dark fairy tale, intricate organic textures, bioluminescent accents, concept art style" |
472
+ | "dog in a fight" | "a friendly golden retriever playing energetically in a sunny park, action shot, joyful expression" |
473
+ | "medical surgery scene" | "a clean modern operating room viewed from the observation gallery, soft blue surgical lights, professional documentary style" |
474
+ | "celebrity portrait of [name]" | "a distinguished middle-aged man in a tailored navy suit, warm studio lighting, editorial portrait style" |
475
+
476
+ ### Key Principle
477
+
478
+ Layer 2 (output filter) analyzes the generated image, not just the prompt.
479
+ Even well-phrased prompts can be blocked if the model's interpretation triggers
480
+ the output filter. When this happens, try shifting the visual concept further
481
+ from the trigger rather than just changing words.
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env python3
2
+ """Banana Claude -- CSV Batch Workflow
3
+
4
+ Parse a CSV file of image generation requests and output a structured plan.
5
+ Claude then executes each row via MCP.
6
+
7
+ Usage:
8
+ batch.py --csv path/to/file.csv
9
+
10
+ CSV columns:
11
+ prompt (required), ratio, resolution, model, preset (all optional)
12
+
13
+ Example CSV:
14
+ prompt,ratio,resolution
15
+ "coffee shop hero image",16:9,2K
16
+ "team photo placeholder",1:1,1K
17
+ "product shot on marble",4:3,2K
18
+ """
19
+
20
+ import argparse
21
+ import csv
22
+ import json
23
+ import sys
24
+ from pathlib import Path
25
+
26
+ # Inline pricing for estimates
27
+ PRICING = {
28
+ "gemini-3.1-flash-image-preview": {"512": 0.020, "1K": 0.039, "2K": 0.078, "4K": 0.156},
29
+ "gemini-2.5-flash-image": {"512": 0.020, "1K": 0.039},
30
+ }
31
+ DEFAULT_MODEL = "gemini-3.1-flash-image-preview"
32
+ DEFAULT_RESOLUTION = "1K"
33
+ DEFAULT_RATIO = "1:1"
34
+
35
+
36
+ def estimate_cost(model, resolution):
37
+ """Estimate cost for a single image."""
38
+ model_pricing = PRICING.get(model, PRICING[DEFAULT_MODEL])
39
+ return model_pricing.get(resolution, model_pricing.get("1K", 0.039))
40
+
41
+
42
+ def main():
43
+ parser = argparse.ArgumentParser(description="Parse CSV batch and output generation plan")
44
+ parser.add_argument("--csv", required=True, help="Path to CSV file")
45
+ args = parser.parse_args()
46
+
47
+ csv_path = Path(args.csv).resolve()
48
+ if not csv_path.exists():
49
+ print(json.dumps({"error": True, "message": f"CSV not found: {csv_path}"}))
50
+ sys.exit(1)
51
+
52
+ rows = []
53
+ errors = []
54
+
55
+ try:
56
+ with open(csv_path, "r", newline="") as f:
57
+ reader = csv.DictReader(f)
58
+ if not reader.fieldnames or "prompt" not in reader.fieldnames:
59
+ print(json.dumps({"error": True, "message": "CSV must have a 'prompt' column header"}))
60
+ sys.exit(1)
61
+ for i, row in enumerate(reader, start=2): # Line 2+ (1 is header)
62
+ prompt = row.get("prompt", "").strip()
63
+ if not prompt:
64
+ errors.append(f"Row {i}: missing prompt")
65
+ continue
66
+
67
+ rows.append({
68
+ "row": i,
69
+ "prompt": prompt,
70
+ "ratio": row.get("ratio", "").strip() or DEFAULT_RATIO,
71
+ "resolution": row.get("resolution", "").strip() or DEFAULT_RESOLUTION,
72
+ "model": row.get("model", "").strip() or DEFAULT_MODEL,
73
+ "preset": row.get("preset", "").strip() or None,
74
+ })
75
+ except (csv.Error, UnicodeDecodeError) as e:
76
+ print(json.dumps({"error": True, "message": f"Failed to parse CSV: {e}"}))
77
+ sys.exit(1)
78
+
79
+ if errors:
80
+ print("Validation errors:")
81
+ for e in errors:
82
+ print(f" - {e}")
83
+ if not rows:
84
+ sys.exit(1)
85
+ print()
86
+
87
+ # Cost estimate
88
+ total_cost = sum(estimate_cost(r["model"], r["resolution"]) for r in rows)
89
+
90
+ # Output structured JSON for Claude to consume
91
+ print(json.dumps({"rows": rows, "total_count": len(rows),
92
+ "estimated_cost": round(total_cost, 3),
93
+ "errors": errors}, indent=2))
94
+
95
+
96
+ if __name__ == "__main__":
97
+ main()