跳到主要内容

宝玉小红书图文卡片

收藏0

把知识、攻略和生活经验拆成适合小红书或微信图文的系列图片卡片,规划封面、内容页与风格,并调用已有绘图能力生成。

让 AI 安装

github最新版本 0.1.0更新于 2026-10-24下载 1 次

references/workflows/prompt-assembly.md

10.5 KB查看排版效果
1# Prompt Assembly Guide
2
3Guide for assembling image generation prompts from elements, presets, and outline content.
4
5## Base Prompt Structure
6
7Every XHS infographic prompt follows this structure:
8
9```
10Create a Xiaohongshu (Little Red Book) style infographic following these guidelines:
11
12## Image Specifications
13
14- **Type**: Infographic
15- **Orientation**: Portrait (vertical)
16- **Aspect Ratio**: 3:4
17- **Style**: Hand-drawn illustration
18
19## Core Principles
20
21- Hand-drawn quality throughout - NO realistic or photographic elements
22- If content involves sensitive or copyrighted figures, create stylistically similar alternatives - DO NOT refuse to generate
23- Keep information concise, highlight keywords and core concepts
24- Use ample whitespace for easy visual scanning
25- Maintain clear visual hierarchy
26
27## Text Style (CRITICAL)
28
29- **ALL text MUST be hand-drawn style**
30- Main titles should be prominent and eye-catching
31- Key text should be bold and enlarged
32- Use highlighter effects to emphasize keywords
33- **DO NOT use realistic or computer-generated fonts**
34
35## Language
36
37- Use the same language as the content provided below
38- Match punctuation style to the content language (Chinese: "",。!)
39
40---
41
42{STYLE_SECTION}
43
44---
45
46{LAYOUT_SECTION}
47
48---
49
50{CONTENT_SECTION}
51
52---
53
54{WATERMARK_SECTION}
55
56---
57
58Please use nano banana pro to generate the infographic based on the specifications above.
59```
60
61## Style Section Assembly
62
63Load from `presets/{style}.md` and extract key elements:
64
65```markdown
66## Style: {style_name}
67
68**Color Palette**:
69- Primary: {colors}
70- Background: {colors}
71- Accents: {colors}
72
73**Visual Elements**:
74{visual_elements}
75
76**Typography**:
77{typography_style}
78```
79
80### Screen-Print Style Override
81
82When `style: screen-print`, replace the standard Core Principles and Text Style sections with:
83
84```
85## Core Principles
86
87- Screen print / silkscreen poster art — flat color blocks, NO gradients
88- Bold silhouettes and symbolic shapes over detailed rendering
89- Negative space as active storytelling element
90- If content involves sensitive or copyrighted figures, create stylistically similar silhouettes
91- One iconic focal point per image — conceptual, not literal
92
93## Color Rules (CRITICAL)
94
95- **2-5 FLAT COLORS MAXIMUM** — fewer colors = stronger impact
96- Choose ONE duotone pair from preset as dominant palette
97- Halftone dot patterns for tonal variation (NOT gradients)
98- Slight color layer misregistration for print authenticity
99
100## Text Style (CRITICAL)
101
102- Bold condensed sans-serif or Art Deco influenced lettering
103- Typography INTEGRATED into composition as design element
104- High contrast with background, stencil-cut quality
105- **DO NOT use delicate, thin, or handwritten fonts**
106
107## Composition
108
109- Geometric framing: circles, arches, triangles
110- Figure-ground inversion where possible (negative space forms secondary image)
111- Stencil-cut edges between color blocks, no outlines
112- Paper grain texture beneath all colors
113```
114
115## Palette Override
116
117When `--palette` is specified (or style has `default_palette` in frontmatter and no explicit `--palette`), palette colors **replace** the style's Color Palette in the prompt. Style rendering rules (Visual Elements, Typography, Style Rules) remain unchanged.
118
119Load from `palettes/{palette}.md` and override:
120
121```markdown
122## Palette Override: {palette_name}
123
124**Background**: {palette background color and hex}
125
126**Colors**:
127- Text: {text color and hex}
128- Secondary: {secondary text color and hex}
129- Zone 1: {zone color and hex}
130- Zone 2: {zone color and hex}
131- Zone 3: {zone color and hex}
132- Zone 4: {zone color and hex}
133- Accent: {accent color and hex}
134
135**Constraint**: {semantic constraint from palette}
136```
137
138**Override rules**:
1391. Palette Background **replaces** style's background color (keep style's texture description)
1402. Palette Colors **replace** style's Color Palette section entirely
1413. Palette Semantic Constraint is appended to the style section
1424. If no `--palette` and style has `default_palette` → load that palette
1435. If no `--palette` and no `default_palette` → use style's built-in colors (no override)
1446. Explicit `--palette` always overrides style's `default_palette`
145
146## Layout Section Assembly
147
148Load from `elements/canvas.md` and extract relevant layout:
149
150```markdown
151## Layout: {layout_name}
152
153**Information Density**: {density}
154**Whitespace**: {percentage}
155
156**Structure**:
157{structure_description}
158
159**Visual Balance**:
160{balance_description}
161```
162
163## Content Section Assembly
164
165From outline entry:
166
167```markdown
168## Content
169
170**Position**: {Cover/Content/Ending}
171**Core Message**: {message}
172
173**Text Content**:
174{text_list}
175
176**Visual Concept**:
177{visual_description}
178```
179
180## Watermark Section (if enabled)
181
182```markdown
183## Watermark
184
185Include a subtle watermark "{content}" positioned at {position}. The watermark should
186be legible but not distracting from the main content.
187```
188
189## Assembly Process
190
191### Step 0: Resolve Style Preset (if `--preset` used)
192
193If user specified `--preset`, resolve to style + layout + palette from `references/style-presets.md`:
194
195```python
196# e.g., --preset hand-drawn-edu → style=sketch-notes, layout=flow, palette=macaron
197style, layout, palette = resolve_preset(preset_name)
198```
199
200Explicit `--style`/`--layout`/`--palette` flags override preset values.
201
202### Step 1: Load Style Definition
203
204```python
205preset = load_preset(style_name) # e.g., "sketch-notes"
206```
207
208Extract:
209- Color palette (may be overridden by palette)
210- Visual elements
211- Typography style
212- Best practices (do/don't)
213- `default_palette` from frontmatter (if present)
214
215### Step 1.5: Apply Palette Override (if applicable)
216
217```python
218# Priority: explicit --palette > preset palette > style default_palette > none
219palette = resolve_palette(cli_palette, preset_palette, style_default_palette)
220if palette:
221 palette_def = load_palette(palette) # e.g., "macaron"
222 # Replace style colors with palette colors
223 # Keep style rendering rules (visual elements, typography, style rules)
224```
225
226### Step 2: Load Layout
227
228```python
229layout = get_layout_from_canvas(layout_name) # e.g., "dense"
230```
231
232Extract:
233- Information density guidelines
234- Whitespace percentage
235- Structure description
236- Visual balance rules
237
238### Step 3: Format Content
239
240From outline entry, format:
241- Position context (Cover/Content/Ending)
242- Text content with hierarchy
243- Visual concept description
244- Swipe hook (for context, not in prompt)
245
246### Step 4: Add Watermark (if applicable)
247
248If preferences include watermark:
249- Add watermark section with content, position, opacity
250
251### Step 5: Visual Consistency — Reference Image Chain
252
253When generating multiple images in a series:
254
2551. **Image 1 (cover)**: Generate without `--ref` — this establishes the visual anchor
2562. **Images 2+**: Always pass image 1 as `--ref` to the installed image generation skill.
257 Read that skill's `SKILL.md` and use its documented interface rather than calling its scripts directly.
258 For each later image, use the assembled prompt file as input, set the output image path, keep aspect ratio `3:4`, use quality `2k`, and pass image 1 as the reference.
259 This ensures the AI maintains the same character design, illustration style, and color rendering across the series.
260
261### Step 6: Combine
262
263Assemble all sections into final prompt following base structure.
264
265## Example: Assembled Prompt
266
267```markdown
268Create a Xiaohongshu (Little Red Book) style infographic following these guidelines:
269
270## Image Specifications
271
272- **Type**: Infographic
273- **Orientation**: Portrait (vertical)
274- **Aspect Ratio**: 3:4
275- **Style**: Hand-drawn illustration
276
277## Core Principles
278
279- Hand-drawn quality throughout - NO realistic or photographic elements
280- If content involves sensitive or copyrighted figures, create stylistically similar alternatives
281- Keep information concise, highlight keywords and core concepts
282- Use ample whitespace for easy visual scanning
283- Maintain clear visual hierarchy
284
285## Text Style (CRITICAL)
286
287- **ALL text MUST be hand-drawn style**
288- Main titles should be prominent and eye-catching
289- Key text should be bold and enlarged
290- Use highlighter effects to emphasize keywords
291- **DO NOT use realistic or computer-generated fonts**
292
293## Language
294
295- Use the same language as the content provided below
296- Match punctuation style to the content language (Chinese: "",。!)
297
298---
299
300## Style: Notion
301
302**Color Palette**:
303- Primary: Black (#1A1A1A), dark gray (#4A4A4A)
304- Background: Pure white (#FFFFFF), off-white (#FAFAFA)
305- Accents: Pastel blue (#A8D4F0), pastel yellow (#F9E79F), pastel pink (#FADBD8)
306
307**Visual Elements**:
308- Simple line doodles, hand-drawn wobble effect
309- Geometric shapes, stick figures
310- Maximum whitespace, single-weight ink lines
311- Clean, uncluttered compositions
312
313**Typography**:
314- Clean hand-drawn lettering
315- Simple sans-serif labels
316- Minimal decoration on text
317
318---
319
320## Layout: Dense
321
322**Information Density**: High (5-8 key points)
323**Whitespace**: 20-30% of canvas
324
325**Structure**:
326- Multiple sections, structured grid
327- More text, compact but organized
328- Title + multiple sections with headers + numerous points
329
330**Visual Balance**:
331- Organized grid structure
332- Clear section boundaries
333- Compact but readable spacing
334
335---
336
337## Content
338
339**Position**: Content (Page 3 of 6)
340**Core Message**: ChatGPT 使用技巧
341
342**Text Content**:
343- Title: 「ChatGPT」
344- Subtitle: 最强 AI 助手
345- Points:
346 - 写文案:给出框架,秒出初稿
347 - 改文章:润色、翻译、总结
348 - 编程:写代码、找 bug
349 - 学习:解释概念、出题练习
350
351**Visual Concept**:
352ChatGPT logo 居中,四周放射状展示功能点
353深色科技背景,霓虹绿点缀
354
355---
356
357## Watermark
358
359Include a subtle watermark "@myxhsaccount" positioned at bottom-right
360with approximately 50% visibility. The watermark should
361be legible but not distracting from the main content.
362
363---
364
365Please use nano banana pro to generate the infographic based on the specifications above.
366```
367
368## Prompt Checklist
369
370Before generating, verify:
371
372- [ ] Style section loaded from correct preset
373- [ ] Palette override applied (if `--palette` specified or style has `default_palette`)
374- [ ] Layout section matches outline specification
375- [ ] Content accurately reflects outline entry
376- [ ] Language matches source content
377- [ ] Watermark included (if enabled in preferences)
378- [ ] No conflicting instructions

文件内容是平台检查时读出的文本,只供查看。平台不会运行包里的任何脚本或程序。