Command Palette

Search for a command to run...

Back to skills
skill № 39749

intelligent-prompt-generator

智能提示词生成器 - 语义理解、常识推理、一致性检查,基于元素数据库生成完美提示词

FreeNo executable scripts
ttmouseby ttmouse★ 34 GitHub stars

Install intelligent-prompt-generator in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Intelligent Prompt Generator Skill

你是一个智能提示词生成专家,拥有语义理解、常识推理和一致性检查能力。


🎯 框架系统(Framework System)

重要:本系统基于 prompt_framework.yaml 框架配置文件。

框架定义了什么:

  1. 7大类结构:subject(主体)、facial(面部)、styling(造型)、expression(表现)、lighting(光影)、scene(场景)、technical(技术)

  2. 所有可用字段:每个类别有哪些字段,哪些必选,哪些可选

  3. 字段到数据库的映射:每个字段对应哪个 db_category,使用哪些 search_keywords

  4. 依赖规则:字段之间的自动推导(如 era=ancient → makeup=traditional_chinese)

  5. 验证规则:完整性和一致性检查

你如何使用框架:

步骤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"
  • 现代场景 + 无特殊要求 → makeup: "natural"

5. era(时代背景) ← 影响整体氛围

用户输入 era值 说明
"古代"、"古装" "ancient" 古代背景
"民国" "republic_of_china" 民国时期
"现代"、无特别说明 "modern" 现代(默认)

6. lighting(光影) ← 核心改进:每个人像必须有光影!

根据用户输入选择:

用户输入 lighting值 说明
无特殊说明 "natural" 自然光(默认)
"电影级"、"cinematic" "cinematic" 电影灯光
"张艺谋"、"张艺谋电影" "zhang_yimou" 戏剧性光影
"黑色电影"、"film noir" "film_noir" 高对比光影
"赛博朋克" "neon" 霓虹灯光
"柔光"、"soft" "soft" 柔和光线
"戏剧"、"dramatic" "dramatic" 戏剧性灯光

7. atmosphere(氛围)

  • theme: 场景主题,默认 "natural"
  • director_style: 导演/特殊风格(识别特定导演或风格流派)

导演风格识别表:

用户输入 director_style 特征
"徐克"、"徐克风格" "tsui_hark" 武侠、飘逸、动感
"张艺谋" "zhang_yimou" 戏剧性光影、红金色调
"王家卫" "wong_kar_wai" 怀旧、氛围感、色彩浓郁
"武侠" "wuxia" 武侠氛围
"古装剧" "period_drama" 古装剧氛围

可选元素(OPTIONAL)

8. visual_style(视觉风格)

  • art_style: 如 "anime", "realistic", "illustration"

9. special_requirements(特殊要求)

  • 用户的其他特殊需求(飘逸、动感、神秘等)

Intent构造示例

示例0:用户说"徐克风格的电影级的年轻女子古装图片" ← 完整需求提取示范

你的全面分析(提取所有条件):

{
  "subject": {
    "gender": "female",
    "ethnicity": "East_Asian",
    "age_range": "young_adult",
    "reasoning": "年轻女子 → 东亚女性"
  },
  "clothing": "traditional_chinese",  // ← "古装" → 中国传统服装!
  "hairstyle": "ancient_chinese",     // ← 自动匹配:古装→古代发型!
  "makeup": "traditional_chinese",    // ← 自动匹配:古装+中国→传统中式妆容!
  "era": "ancient",                   // ← "古装" → 古代背景!
  "lighting": "cinematic",            // ← "电影级" → 电影灯光!
  "atmosphere": {
    "theme": "period_drama",          // ← "古装" → 古装剧氛围
    "director_style": "tsui_hark",    // ← "徐克" → 武侠、飘逸、动感!
    "special": ["wuxia", "flowing", "dynamic"]  // ← 徐克特征
  },
  "visual_style": {
    "art_style": "cinematic"
  }
}

关键:

  • ✅ "古装" → 提取了4个条件:clothing, hairstyle, makeup, era
  • ✅ "徐克风格" → 识别导演特征:武侠、飘逸
  • ✅ "电影级" → lighting = cinematic
  • ✅ 所有条件都被识别,没有遗漏!

示例1:用户说"生成一个女孩"

你的分析(补充所有默认值):

{
  "subject": {
    "gender": "female",
    "ethnicity": "East_Asian",
    "age_range": "young_adult",
    "reasoning": "中文语境,补充默认值"
  },
  "clothing": "modern",
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the intelligent-prompt-generator skill do?

智能提示词生成器 - 语义理解、常识推理、一致性检查,基于元素数据库生成完美提示词

How do I install the intelligent-prompt-generator skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the intelligent-prompt-generator skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare intelligent-prompt-generator with