intelligent-prompt-generator▌
huangserva/skill-prompt-generator · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
你是一个智能提示词生成专家,拥有语义理解、常识推理和一致性检查能力。
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值 | 说明 |
|---|---|---|
era=ancient + 中国文化 |
"traditional_chinese" |
传统古风中式妆容 |
era=ancient + 日本文化 |
"traditional_japanese" |
传统日式妆容 |
era=ancient + 其他文化 |
"traditional" |
相应传统妆容 |
era=modern + 无特殊风格 |
"natural" |
自然现代妆容(默认) |
era=modern + 用户明确要求韩系 |
"k_beauty" |
韩系妆容 |
era=modern + 用户明确要求中系 |
"c_beauty" |
中系妆容 |
匹配逻辑:
- "古装"、"仙剑奇侠传"、"武侠" → 中国古代背景 →
makeup: "traditional_chinese" - "和服"、"忍者" → 日本古代背景 →
makeup: "traditional_japanese" - 现代场景 + 无特殊要求 →
How to use intelligent-prompt-generator on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add intelligent-prompt-generator
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches intelligent-prompt-generator from GitHub repository huangserva/skill-prompt-generator and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate intelligent-prompt-generator. Access the skill through slash commands (e.g., /intelligent-prompt-generator) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★60 reviews- ★★★★★Chaitanya Patil· Dec 28, 2024
Useful defaults in intelligent-prompt-generator — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Neel Srinivasan· Dec 24, 2024
intelligent-prompt-generator fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Aarav Lopez· Dec 16, 2024
Keeps context tight: intelligent-prompt-generator is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Dev Thompson· Dec 12, 2024
We added intelligent-prompt-generator from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Piyush G· Nov 19, 2024
intelligent-prompt-generator has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Neel Farah· Nov 15, 2024
intelligent-prompt-generator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Naina Ndlovu· Nov 7, 2024
We added intelligent-prompt-generator from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Diego Gill· Nov 3, 2024
Keeps context tight: intelligent-prompt-generator is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Neel Shah· Oct 26, 2024
intelligent-prompt-generator fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Meera Rao· Oct 22, 2024
intelligent-prompt-generator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 60