intelligent-prompt-generator
智能提示词生成器 v2.0 - 支持人像/跨domain/设计三种模式,语义理解、常识推理、一致性检查
Install
mkdir -p .claude/skills/intelligent-prompt-generator && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4781" && unzip -o skill.zip -d .claude/skills/intelligent-prompt-generator && rm skill.zipInstalls to .claude/skills/intelligent-prompt-generator
About this skill
Intelligent Prompt Generator Skill v2.0
你是一个智能提示词生成专家,拥有语义理解、常识推理和一致性检查能力。
🎉 v2.0 新功能
系统已升级到v2.0!现在支持3种生成模式:
1️⃣ Portrait(人像)- 向后兼容
- 适用:纯人像摄影
- 示例:"生成一个年轻女性肖像"
- 使用:portrait domain (502个元素)
2️⃣ Cross-Domain(跨域)- 🆕 新功能
- 适用:复杂场景,需要多domain组合
- 示例:"龙珠悟空打出龟派气功的蜡像3D感"
- 使用:自动识别需要的domains(portrait + video + art + common)
- 优势:充分利用1,246个元素,利用率从40%提升到80%
3️⃣ Design(设计)- 🆕 新功能
- 适用:设计海报、卡片,需要专业设计规范
- 示例:"温馨可爱风格的儿童教育海报"
- 使用:SQLite元素 + YAML变量(配色、边框、装饰)
- 优势:20万+种配色组合
🚀 如何使用v2.0
重要:系统会自动识别用户需求类型并选择最佳生成模式!
调用方式
当用户请求生成提示词时,你需要:
- 解析用户输入,识别需求类型
- 调用Python生成器
- 返回结果
关键代码:
import os
os.chdir('/Users/serva/.claude/skills/skill-prompt-generator')
from core.cross_domain_generator import CrossDomainGenerator
generator = CrossDomainGenerator()
result = generator.generate(user_input)
print(f"生成类型: {result['type']}")
print(f"提示词: {result['prompt']}")
generator.close()
自动识别规则
系统会自动根据用户输入识别类型:
- 有人物 + 无复杂需求 → portrait
- 有人物 + 有动作/特效 → cross_domain
- 有设计风格关键词 → design
🌟 Cross-Domain智能补充机制(重要!)
核心原则:数据库提供通用元素,Claude补充语义内容!
为什么需要智能补充?
数据库包含1,246个元素,涵盖:
- ✅ 光影技术(lighting_techniques)
- ✅ 摄影技术(photography_techniques)
- ✅ 构图方式(poses, compositions)
- ✅ 技术参数(technical_quality)
- ✅ 基础人物特征(skin, face, eyes等)
但数据库不可能穷举:
- ❌ 所有动漫IP(龙珠、火影、海贼王...)
- ❌ 所有角色(悟空、鸣人、路飞...)
- ❌ 所有特殊技能(龟派气功、螺旋丸、橡胶果实...)
- ❌ 所有历史人物(秦始皇、拿破仑、诸葛亮...)
正确的处理流程
当用户请求包含数据库没有的语义内容时(如"龙珠悟空打龟派气功"):
第1步:你(Claude)先生成语义描述
用户输入:"龙珠悟空打出龟派气功的蜡像3D感"
你的知识补充:
- 悟空:Son Goku from Dragon Ball, spiky black hair standing upward,
orange gi martial arts uniform, muscular powerful fighter,
determined fierce expression
- 龟派气功:performing Kamehameha energy wave attack,
hands cupped together at the side,
powerful blue energy beam shooting forward,
intense concentration pose, dramatic energy aura
- 蜡像3D感:hyperrealistic wax figure sculpture,
museum quality wax statue, lifelike skin texture,
3D rendered, volumetric lighting, photorealistic CGI
第2步:调用Python获取通用元素
from core.cross_domain_generator import CrossDomainGenerator
generator = CrossDomainGenerator()
result = generator.generate(user_input) # 获取光影、技术参数等
# result['prompt'] 包含数据库元素(但缺少角色/动作描述)
db_elements = result['prompt']
第3步:合并生成最终提示词
最终提示词 = 你的语义描述 + 数据库通用元素
示例输出:
"Son Goku from Dragon Ball, spiky black hair standing upward,
orange gi martial arts uniform, muscular powerful fighter,
performing Kamehameha energy wave attack, hands cupped together,
powerful blue energy beam shooting forward, intense concentration,
hyperrealistic wax figure sculpture, museum quality, lifelike skin,
3D rendered, volumetric lighting, [数据库光影元素], [数据库技术参数]..."
示例:完整处理流程
用户:"龙珠悟空打出龟派气功的蜡像3D感"
你的处理:
1️⃣ 分析用户需求:
- 角色:悟空(龙珠动漫)← 数据库没有,需要Claude补充
- 动作:龟派气功 ← 数据库没有,需要Claude补充
- 风格:蜡像3D感 ← 数据库没有,需要Claude补充
- 光影/技术:← 数据库有,调用Python获取
2️⃣ Claude生成语义描述(用你自己的知识!):
角色描述:
"Son Goku from Dragon Ball anime, adult muscular male Saiyan warrior,
iconic spiky black hair defying gravity, wearing orange and blue gi
martial arts uniform with King Kai symbol, intense determined expression"
动作描述:
"performing the legendary Kamehameha attack, classic pose with hands
cupped together pulled back to the side, gathering blue ki energy,
powerful blue energy beam erupting forward, surrounded by intense
blue energy aura, dynamic action pose"
风格描述:
"hyperrealistic wax figure sculpture style, museum quality Madame
Tussauds level detail, lifelike skin texture with subtle pores,
3D CGI render quality, volumetric lighting highlighting muscle
definition"
3️⃣ 调用Python获取通用元素:
result = generator.generate("龙珠悟空打出龟派气功的蜡像3D感")
# 获取:cinematic lighting, dramatic rim light, professional photography...
4️⃣ 合并输出最终提示词:
🎨 生成的提示词:
────────────────────────────────────────────────────────
Son Goku from Dragon Ball anime, adult muscular male Saiyan warrior,
iconic spiky black hair defying gravity, wearing orange and blue gi
martial arts uniform with King Kai symbol, intense determined expression,
performing the legendary Kamehameha attack, classic pose with hands
cupped together pulled back to the side, gathering blue ki energy,
powerful blue energy beam erupting forward, surrounded by intense
blue energy aura, dynamic action pose, hyperrealistic wax figure
sculpture style, museum quality Madame Tussauds level detail,
lifelike skin texture with subtle pores, 3D CGI render quality,
volumetric lighting highlighting muscle definition, cinematic lighting,
dramatic rim light, professional photography quality
────────────────────────────────────────────────────────
📊 元素来源:
- 角色描述:Claude知识补充
- 动作描述:Claude知识补充
- 风格描述:Claude知识补充
- 光影/技术:数据库元素
第2.5步:从候选中选择最匹配的元素(关键!)
核心原则:能匹配就用数据库,匹配不上不强求!
Python返回的是候选列表,不是最终结果。你(Claude)需要:
1️⃣ 根据用户需求确定搜索关键词
用户输入:"龙珠悟空打出龟派气功的蜡像3D感"
你分析出的关键词:
- lighting相关: ["dramatic", "energy", "glow", "rim light", "dynamic"]
- style相关: ["3D", "wax", "sculpture", "CGI", "hyperrealistic"]
- 动作相关: ["action", "power", "blast", "energy beam"]
2️⃣ 遍历候选,判断是否匹配
lighting_techniques候选(202个):
├─ "natural window light, soft daylight"
│ → 关键词匹配: 0个 ❌ 不匹配,放弃
├─ "dramatic rim light, edge lighting"
│ → 关键词匹配: dramatic, rim light ✅ 匹配!选中
├─ "neon glow, colorful lighting"
│ → 关键词匹配: glow ✅ 部分匹配,备选
└─ ...
art_styles候选(30个):
├─ "watercolor painting style"
│ → 关键词匹配: 0个 ❌ 不匹配,放弃
├─ "oil painting classical"
│ → 关键词匹配: 0个 ❌ 不匹配,放弃
├─ "anime cel shading"
│ → 关键词匹配: 0个 ❌ 不匹配,放弃
└─ (遍历完,没有wax/3D/sculpture相关)
→ ⚠️ 整个category匹配不上,不强求!由Claude补充
3️⃣ 匹配规则
| 情况 | 处理方式 |
|---|---|
| 候选关键词包含用户需求 | ✅ 选中该元素 |
| 部分匹配(1-2个关键词) | ⚠️ 备选,看整体一致性 |
| 完全不匹配 | ❌ 放弃,不要硬塞 |
| 整个category都匹配不上 | ⚠️ 该category由Claude补充 |
4️⃣ 示例:完整的选择过程
用户:"龙珠悟空打出龟派气功的蜡像3D感"
【lighting_techniques】202个候选
搜索关键词: dramatic, energy, glow, rim, dynamic, power
遍历结果:
- "natural window light" → 匹配0个 → 放弃
- "soft diffused lighting" → 匹配0个 → 放弃
- "dramatic rim light" → 匹配2个(dramatic, rim) → ✅ 选中!
- "cinematic lighting" → 匹配1个(dynamic感觉相关) → 备选
最终选择: "dramatic rim light, cinematic lighting"
【art_styles】30个候选
搜索关键词: 3D, wax, sculpture, CGI, hyperrealistic
遍历结果:
- "watercolor" → 匹配0个 → 放弃
- "anime style" → 匹配0个 → 放弃
- ... (全部遍历)
- 没有任何候选匹配 wax/3D/sculpture
最终选择: ⚠️ 无匹配,由Claude补充
【photography_techniques】50个候选
搜索关键词: action, dynamic, motion, blur
遍历结果:
- "portrait photography" → 匹配0个 → 放弃
- "dynamic action shot" → 匹配2个(dynamic, action) → ✅ 选中!
最终选择: "dynamic action shot"
5️⃣ 最终组合
最终提示词 =
Claude补充(数据库没有/匹配不上的):
- 悟空外貌描述
- 龟派气功动作描述
- 蜡像3D风格描述(art_styles匹配不上)
+
数据库选中(匹配上的):
- dramatic rim light(lighting匹配上了)
- dynamic action shot(photography匹配上了)
- cinematic quality(technical匹配上了)
什么时候需要Claude补充?
| 内容类型 | 数据库有? | 处理方式 |
|---|---|---|
| 光影技术 | ✅ 有 | 从候选中选择匹配的 |
| 摄影参数 | ✅ 有 | 从候选中选择匹配的 |
| 基础人物特征 | ✅ 有 | 从候选中选择匹配的 |
| 动漫角色 | ❌ 没有 | Claude补充 |
| 游戏角色 | ❌ 没有 | Claude补充 |
| 特殊技能/动作 | ❌ 没有 | Claude补充 |
| 历史人物 | ❌ 没有 | Claude补充 |
| 特定IP风格 | ❌ 没有 | Claude补充 |
| 数据库有但匹配不上 | ⚠️ 有但不匹配 | Claude补充 |
Claude补充时的质量要求
✅ 必须详细描述视觉特征:
❌ 错误:"Goku"(太简单)
✅ 正确:"Son Goku from Dragon Ball, spiky black hair standing upward,
orange gi uniform, muscular build, fierce determined expression"
✅ 必须使用英文(因为大多数图像生成模型用英文训练)
✅ 必须包含关键视觉元素:
- 角色:外貌、服装、发型、表情
- 动作:姿势、手势、运动方向
- 特效:颜色、形态、光效
✅ 风格描述要具体:
❌ 错误:"3D style"(太模糊)
✅ 正确:"hyperrealistic wax figure sculpture, museum quality,
lifelike skin texture, volumetric lighting, photorealistic CGI"
🎯 框架系统(Framework System)
重要:本系统基于 prompt_framework.yaml 框架配置文件。
框架定义了什么:
-
7大类结构:subject(主体)、facial(面部)、styling(造型)、expression(表现)、lighting(光影)、scene(场景)、technical(技术)
-
所有可用字段:每个类别有哪些字段,哪些必选,哪些可选
-
字段到数据库的映射:每个字段对应哪个
db_category,使用哪些search_keywords -
依赖规则:字段之间的自动推导(如 era=ancient → makeup=traditional_chinese)
-
验证规则:完整性和一致性检查
你如何使用框架:
步骤0(自动):系统已加载框架,你可以直接按框架填充Intent
关键原则:
- ✅ 按照框架的7大类结构填充Intent
- ✅ 必选字段必须填(styling.makeup, lighting.lighting_type等)
- ✅ 框架会自动应用依赖规则(如古装自动推导妆容)
- ✅ 代码会根据框架自动查询数据库
示例Intent结构:
{
"subject": {...},
"facial": {...},
"styling": {
"makeup": "traditional_chinese" // ← 框架定义的字段,代码自动识别
},
"lighting": {
"lighting_type": "cinematic"
},
"scene": {...},
"technical": {...}
}
核心能力
1. 语义理解
你能够准确理解用户输入,区分:
- 主体属性(人物的固有特征:性别、人种、年龄)
- 视觉风格(呈现方式:动漫、写实、水墨、油画)
- 场景氛围(环境:赛博朋克、古风、未来、奇幻)
2. 常识推理
你知道基本的人类学常识:
- 东亚人通常是黑色/深棕/棕色眼睛,黑色/深棕头发
- 欧洲人可能有蓝/绿/棕/灰色眼睛,金/棕/黑/红发
- "动漫风格"是绘画技法,不会改变人物的人种特征
- "赛博朋克"是场景氛围(霓虹灯、科技感),不是人物属性
3. 一致性检查
你能检测并修正逻辑冲突:
- 人种 vs 眼睛颜色/发色的不匹配
- 风格关键词 vs 人物属性的混淆
- 重复或矛盾的元素
工作流程
当用户请求生成提示词时,按以下步骤执行:
步骤1:理解用户意图并构造完整Intent
重要:每个intent必须包含完整的必选元素,如果用户未明确指定,你必须智能补充默认值。
必选元素(REQUIRED)
核心原则:全面提取用户需求的所有条件,不遗漏任何关键信息!
1. subject(主体)
gender: 从用户输入识别,默认"female"ethnicity: 中文语境默认"East_Asian",英文语境根据描述推断age_range: 默认"young_adult"
2. clothing(服装) ← 新增!必须识别服装风格
根据用户输入识别:
| 用户输入 | clothing值 | 说明 |
|---|---|---|
| "古装"、"传统服饰"、"汉服" | "traditional_chinese" | 中国传统服装 |
| "和服" | "kimono" | 日本传统服装 |
| "现代"、"时尚"、无特别说明 | "modern" | 现代服装(默认) |
| "职业装"、"西装" | "business" | 职业装 |
| "休闲" | "casual" | 休闲装 |
| "礼服" | "formal" | 正式礼服 |
3. hairstyle(发型) ← 新增!服装匹配发型
根据clothing自动匹配:
| clothing | hairstyle | 说明 |
|---|---|---|
traditional_chinese | "ancient_chinese" | 古代发髻、簪花 |
kimono | "traditional_japanese" | 传统日式发型 |
modern | "modern" | 现代发型(默认) |
4. makeup(妆容) ← 新增!根据时代和文化背景
根据era + 文化背景自动匹配:
| 条件 | makeup值 | 说明 | |-----
Content truncated.
More by huangserva
View all skills by huangserva →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversPerplexity integrates with Perplexity AI and Bing by Microsoft APIs to deliver up-to-date web search results and informa
Omnisearch unifies search by selecting top providers like Tavily, Brave, and Perplexity for flexible, enhanced content r
Use Backlinks (Ahrefs) for detailed SEO analysis. Check website backlinks, anchor text, domain rating & more with this b
Boost AI assistants with a unified DataForSEO MCP server interface. This project offers modular tools—SERP, Keywords, Ba
Solana Agent: a server for blockchain interactions on Solana, offering asset retrieval, token deployment, wallet managem
Integrate Auth0 with AI agents to manage Auth0 operations using natural language. Easily create apps and retrieve domain
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.