Design Philosophy: Deconstruct the black box, make the vague clear Core Capability: Answer "how to do X" questions
🎯 Problems Solved
Problem: Prompts are a black box → you don't know:
- How to control color?
- How to control spatial layout?
- How to add iconic symbols?
- How to adjust typography?
- How to control material?
- How to control light and shadow?
Solution: Extract patterns from N excellent prompts → generate a knowledge base
📋 Usage
Method 1: Extract knowledge of a single dimension
从已分析的提示词中,提取"如何控制颜色"的知识
Method 2: Extract knowledge of all dimensions
从已分析的提示词中,构建完整知识库
Method 3: Specify a range
分析moss_terrarium系列,提取配色知识
🔄 Execution Flow
When the user requests knowledge extraction, you need to:
Step 1: Read data
Use the tool to read all extracted_results/ files under *_extracted.json :
from xray_helper import load_prompts
prompts = load_prompts(pattern="*_extracted.json")
Step 2: Analyze by dimension
According to the dimension requested by the user, analyze the corresponding modules:
If the user wants "color" knowledge:
- Extract all
color_schememodules - Analyze color schemes, keywords, techniques
- Generate Markdown according to the template below
If the user wants "layout" knowledge:
- Extract all
compositionmodules - Analyze perspective, composition rules, positioning methods
- Generate Markdown according to the template
If the user wants "symbol" knowledge:
- Extract
constraintsanddetail_enhancersmodules - Analyze text syntax, Logo addition methods
- Generate Markdown according to the template
If the user wants "material" knowledge:
- Extract
detail_enhancersand related descriptions - Analyze surface features, physical properties, texture keywords
- Generate Markdown according to the template
If the user wants "light and shadow" knowledge:
- Extract
technical_parameters.lightingandmood_atmosphere - Analyze light source types, lighting schemes, atmosphere effects
- Generate Markdown according to the template
If the user wants "typography" knowledge (design-related):
- Extract
compositionandvisual_style - Analyze grid systems, visual hierarchy, alignment rules
- Generate Markdown according to the template
Step 3: Generate knowledge cards
Use the tool to save the results:
from xray_helper import save_knowledge_card
save_knowledge_card(dimension="color", content=markdown_content)
📝 Output Templates
Template 1: How to control color?
# 如何控制颜色?
**分析时间**: {当前时间}
**样本数量**: {分析了多少个提示词}
**数据来源**: {哪些提示词}
---
## 🎨 配色公式
### 公式1: 冷暖对立(7:3黄金比例)
- **公式**: `70% cool base + 30% warm accent`
- **来源**: moss_terrarium_001
- **效果**: 自然和谐 + 视觉层次
### 公式2: ...
---
## 📚 颜色关键词库
### 冷色系
- `rich forest greens`
- `deep ocean blues`
- `ice whites`
### 暖色系
- `warm amber wood tones`
- `sunset orange`
- `golden hour light`
### 中性色
- `grayscale`
- `pristine whites`
---
## 🛠️ 配色技巧
1. **温度对比** - 冷色环境 + 暖色焦点 = 视觉层次
2. **7:3比例** - 主色70%,焦点色30%
3. **单色调+焦点色** - 极简风格
---
## 💡 应用案例
### 案例1: moss_terrarium_001
**配色方案**: rich forest greens (70%) + warm amber wood (30%)
**效果**: Natural harmony, clear focal point
**适用场景**: 自然场景、植物摄影
### 案例2: ...
Template 2: How to control spatial layout?
# 如何控制空间布局?
**分析时间**: {当前时间}
**样本数量**: {分析了多少个提示词}
---
## 🎥 视角选择
### `slight top-down angle`
**适用场景**: 微缩场景、产品摄影、生态瓶
**关键词**: `top-down view`, `bird's eye view`, `overhead angle`
**案例**: moss_terrarium_001, moss_terrarium_002
**效果**: 展示全貌,适合平铺布局
### `isometric view`
**适用场景**: 3D产品、游戏场景、建筑
**关键词**: `isometric`, `45-degree angle`
**效果**: 保持平行线,无透视变形
---
## 📐 构图规则
### Golden Ratio(黄金比例)
**关键词**: `golden ratio composition`, `phi grid`
**效果**: 经典和谐比例,视觉平衡
**使用频率**: 3次
### Rule of Thirds(三分法)
**关键词**: `rule of thirds`, `thirds grid`
**效果**: 动态平衡,引导视线
### Centered Symmetry(中心对称)
**关键词**: `centered`, `perfectly symmetrical`
**效果**: 稳定、庄重感
---
## 🎯 定位方法
### 相对位置描述
- `iPhone placed next to notebook`
- `floating in 3D space`
- `bottom-left quadrant`
### 精确坐标(高级)
- `Subject A [X: 20-40, Y: 60-100] (Bottom-Left)`
- `Subject B [X: 60-80, Y: 0-40] (Top-Right)`
---
## 💡 应用案例
### 案例1: moss_terrarium_001
**视角**: slight top-down angle
**构图**: centered in frame, golden ratio
**定位**: terrarium centered, cottage as focal point
Template 3: How to add iconic symbols?
# 如何添加标志性符号?
---
## ✍️ 文字添加语法
### 基础语法
text "HELLO" in bold serif large bold sans-serif text "SALE" in red neon red cursive script "OPEN"
### 位置控制
- `lower left corner`
- `centered at top`
- `floating in 3D space`
---
## 🏷️ Logo/水印添加
### 正确示例
small square watermark in lower left corner simple logo in top-right, 10% opacity brand symbol integrated into design
### ❌ 反面案例(避免)
- `exactly 10x10 pixels` → AI无法保证像素精度
- `Gothic font AND Arial font` → 矛盾指令
- `mandatory mandatory mandatory` → 重复无效
---
## 🎨 符号风格
### 材质效果
- `neon` - 霓虹灯效果
- `embossed` - 浮雕效果
- `metallic sheen` - 金属光泽
- `glowing` - 发光效果
### 字体风格
- `bold serif` - 粗体衬线
- `sans-serif` - 无衬线
- `cursive script` - 草书
- `calligraphy` - 书法体
Template 4: How to control material?
# 如何控制材质?
---
## 🔍 表面特征
### 金属材质
- `brushed titanium` - 拉丝钛金属
- `polished chrome` - 抛光镀铬
- `metallic sheen` - 金属光泽
### 有机材质
- `living green textures` - 生机勃勃的绿色质感
- `natural wood grain` - 天然木纹
- `rough bark` - 粗糙树皮
### 玻璃/透明
- `under glass` - 玻璃下
- `translucent` - 半透明
- `crystal clear` - 晶莹剔透
---
## ⚙️ 物理属性
- `glossy` / `matte` - 光泽/哑光
- `reflective` / `absorptive` - 反射/吸收
- `weathered` / `pristine` - 风化/原始
- `soft` / `rigid` - 柔软/坚硬
---
## ✨ 光学效果
- `morning dew droplets` - 晨露水珠
- `soft sunlight reflections on glass` - 玻璃上的柔和阳光反射
- `condensation` - 冷凝水汽
- `refraction` - 折射
Template 5: How to control light and shadow?
# 如何控制光影?
---
## 💡 光源类型
### 自然光
- `soft diffused daylight` - 柔和漫射日光
- `golden hour light` - 黄金时段光线
- `morning sunlight` - 晨光
- `harsh noon sun` - 正午强光
### 人工光
- `studio lighting` - 影棚灯光
- `neon lights` - 霓虹灯
- `rim light` - 轮廓光
- `softbox overhead` - 头顶柔光箱
---
## 🎬 布光方案
### Rembrandt Lighting(伦勃朗布光)
**效果**: 戏剧性,适合人像
**关键词**: `Rembrandt light`, `triangle highlight`, `dramatic shadows`
### Soft Diffused Light(柔和漫射光)
**效果**: 自然、清新、无硬影
**关键词**: `soft diffused`, `natural ambient`, `no harsh shadows`
### Rim Light(轮廓光)
**效果**: 勾勒边缘,分离主体和背景
**关键词**: `rim lighting`, `backlight`, `edge highlight`
---
## 🌤️ 光线+氛围公式
### 清新宁静
soft diffused daylight + morning dew = fresh, peaceful atmosphere
### 戏剧张力
Rembrandt light + rim light = dramatic portrait with depth
### 科技未来
neon accent lights + volumetric fog = cyberpunk atmosphere
---
## 🌫️ 大气效果
- `volumetric fog` - 体积雾
- `misty` - 雾蒙蒙
- `hazy` - 朦胧
- `clear crisp air` - 清澈空气
🛠️ Tool Functions
You need to use the tool functions in xray_helper.py :
Read prompts
from xray_helper import load_prompts
# 加载所有提示词
all_prompts = load_prompts()
# 加载特定范围
moss_prompts = load_prompts(pattern="moss_terrarium*")
Save knowledge cards
from xray_helper import save_knowledge_card
save_knowledge_card(
dimension="color",
content=markdown_content,
metadata={
'samples': 10,
'source': 'moss_terrarium + ethereal_deity'
}
)
💡 Key Principles
1. Look for patterns, not lists
❌ Wrong: Only list all color keywords ✅ Correct: Discover color formulas (e.g., 70% cool + 30% warm)
2. Extract techniques, not descriptions
❌ Wrong: "This prompt uses forest green" ✅ Correct: "Cool-toned environment + warm-toned focal point = visual hierarchy"
3. Provide examples that can be reused directly
❌ Wrong: vague description "use contrasting colors"
✅ Correct: specific example rich forest greens + warm amber wood
4. Learn from the excellent, and also learn from mistakes
- Learn best practices from A-grade prompts
- Learn negative examples from D-grade prompts (such as pencil_sketch_idol)
📊 Analysis steps (detailed)
When the user says: "Extract knowledge on how to control color"
Step 1: Load data
prompts = load_prompts()
Step 2: Iterate through all prompts, extract the color_scheme module
color_data = []
for prompt in prompts:
if 'color_scheme' in prompt['modules']:
color_data.append({
'id': prompt['prompt_id'],
'scheme': prompt['modules']['color_scheme']
})
Step 3: Analyze color formulas
- Look for
primary_palettefield - Check
temperaturedescription (e.g., "balanced - cool greens + warm wood") - Identify proportional relationships (70%/30%)
- Extract
concept(e.g., "Cold Shell, Warm Heart")
Step 4: Categorize keywords
- Iterate through all color descriptions
- Classify into cool colors/warm colors/neutral colors
- Deduplicate, sort
Step 5: Extract techniques
- Temperature contrast?
- High contrast/low contrast?
- Monochromatic + focal color?
Step 6: Create examples
- Select the best 3-5 examples
- Include: color scheme, effect, applicable scenarios
Step 7: Generate Markdown
- Fill in content according to the template
- Use
save_knowledge_card()to save
🎯 Output location
All knowledge cards are saved to:
knowledge_base/
├── how_to_control_color.md
├── how_to_control_layout.md
├── how_to_add_symbols.md
├── how_to_control_materials.md
├── how_to_control_lighting.md
└── how_to_control_typography.md (针对设计类)
✅ Acceptance criteria
The generated knowledge cards should:
- ✅ Answer the question "how to do X"
- ✅ Include specific keywords and formulas
- ✅ Have 3+ real examples
- ✅ Can be directly reused in new prompts
- ✅ Include both positive examples and negative lessons
Skill status: ✅ Design complete Last updated: 2026-01-04 Tools used: xray_helper.py