✨

AI提示词生成与优化专家

AI Prompt Generator · v1.0.0
可以安装,但有提示 HAS_SCRIPTS
AI 增强 安全 A 级 作者 ouyangabel 公开目录收录
1.9k 下载 4 安装 5.8k 收藏 17 浏览

简介

一键生成ChatGPT、Midjourney、代码生成等AI模型的优化提示词,支持质量分析与多平台适配,提升AI输出效果。

原始描述

Generate optimized prompts for AI models including ChatGPT, Midjourney, and code generation. Use when: (1) creating AI prompts for writing, coding, design, o...

通过你的 Agent 添加

安装目录:ai-prompt-gen/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/ai-prompt-generator-26248/
Codex CLI~/.codex/skills/ai-prompt-generator-26248/
DeepSeek Harness~/.agents/skills/ai-prompt-generator-26248/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

AI Prompt Generator 是一款面向多平台AI模型的提示词生成与优化工具,支持命令行交互式操作。核心功能覆盖四大场景:

  1. 通用提示生成 (general):按类别(写作/编程/营销/设计/研究/分析)+ 主题 + 风格 + 受众 + 长度参数,快速生成结构化提示词
  2. ChatGPT专用优化 (chatgpt):通过角色扮演(role)+ 任务(task)+ 上下文(context)+ 约束条件(constraints)四要素构建精准提示
  3. Midjourney艺术生成 (midjourney):组合主题、风格(写实/艺术/卡通/极简/复古/未来)、氛围、质量等级生成图像提示词
  4. 代码生成提示 (code):针对特定编程语言、任务难度(初级/中级/高级)生成开发提示
  5. 质量分析 (analyze):评估现有提示词的长度、清晰度、上下文完整度并提供改进建议

显著优点

  • 多平台适配:原生支持ChatGPT、Midjourney及通用代码生成场景,覆盖文本、图像、代码三大AI应用领域
  • 结构化参数化:将模糊的提示工程转化为可量化的参数组合(风格/受众/长度/难度),降低 prompt engineering 门槛
  • 角色扮演深度:ChatGPT模块支持专家角色代入,显著提升专业领域输出质量
  • 质量闭环:内置 analyze 命令形成"生成-评估-优化"迭代 workflow

潜在缺点与局限性

  • 模板化风险:预设模板可能限制创意边界,难以生成突破性、实验性的提示词
  • 平台更新滞后:AI模型能力快速迭代(如GPT-4 Turbo、Midjourney V6),内置模板可能未及时适配最新特性
  • 语言局限:示例以中文为主,但底层模板对非英语语义的捕捉可能弱于原生英文提示
  • 依赖用户输入质量:主题描述仍依赖用户自身表达能力,工具仅优化格式而非创造内容

适合人群

  • AI内容创作者:博主、营销人员、设计师,需批量生产高质量AI辅助内容
  • 开发者与Prompt Engineer:需要系统化测试不同提示策略的AI应用开发者
  • AI教学与培训:作为提示工程教学的标准化工具,演示参数对输出的影响
  • 效率型用户:不愿深入学习prompt engineering细节,希望快速获得可用提示词

常规风险

  • 输出不可控:工具生成的是"提示词的提示词",最终AI输出质量仍取决于底层模型能力
  • 风格同质化:过度依赖预设模板可能导致不同用户生成的提示词趋同,降低内容差异化
  • 安全与合规:未内置内容安全过滤,用户输入敏感主题时可能生成不当提示,需配合AI平台的内容政策使用

技能正文


name: ai-prompt-gen description: "Generate optimized prompts for AI models including ChatGPT, Midjourney, and code generation. Use when: (1) creating AI prompts for writing, coding, design, or research, (2) optimizing prompts for specific AI models, (3) analyzing prompt quality, or (4) any AI prompt engineering needs. Supports multiple categories and AI platforms."

AI Prompt Generator

Generate optimized prompts for various AI models. Create prompts for ChatGPT, Midjourney, code generation, and more with customizable styles and parameters.

When to Use

  • Create prompts for AI writing and content generation
  • Generate prompts for AI art and design
  • Optimize prompts for code generation
  • Analyze and improve existing prompts
  • Build prompt engineering workflows

Quick Start

Generate Writing Prompt

python3 scripts/ai-prompt-gen.py general writing "人工智能" creative general long

Generate ChatGPT Prompt

python3 scripts/ai-prompt-gen.py chatgpt "专业作家" "写一篇关于AI的文章" "背景信息" "字数500字"

Generate Midjourney Prompt

python3 scripts/ai-prompt-gen.py midjourney "未来城市" "futuristic" "科技感" "high"

Analyze Prompt Quality

python3 scripts/ai-prompt-gen.py analyze "写一个关于AI的文章"

Commands

general <category> <topic> [style] [audience] [length]

Generate general AI prompts for various categories.

Categories:

  • writing - Content writing and creative writing
  • coding - Code generation and programming
  • marketing - Marketing and SEO
  • design - Graphic and UI design
  • research - Research and analysis
  • analysis - Data and business analysis

Style Options:

  • concise - Brief and to the point
  • creative - Creative and imaginative
  • technical - Technical and detailed
  • detailed - Comprehensive and thorough

Length Options:

  • short - Brief output
  • medium - Moderate length (default)
  • long - Detailed and comprehensive

Examples:

# Creative writing prompt
python3 scripts/ai-prompt-gen.py general writing "人工智能" creative general long

# Technical coding prompt
python3 scripts/ai-prompt-gen.py general coding "排序算法" technical developer medium

# Marketing prompt
python3 scripts/ai-prompt-gen.py general marketing "SEO优化" detailed business short

chatgpt <role> <task> [context] [constraints]

Generate ChatGPT-specific prompts with role-playing.

Examples:

# Basic prompt
python3 scripts/ai-prompt-gen.py chatgpt "专业作家" "写一篇关于AI的文章"

# With context and constraints
python3 scripts/ai-prompt-gen.py chatgpt "数据分析师" "分析销售数据" "过去一年的销售数据" "包含趋势分析和预测"

midjourney <subject> <style> <mood> [quality]

Generate prompts for Midjourney AI art generation.

Style Options:

  • realistic - Photorealistic style
  • artistic - Artistic and creative
  • cartoon - Cartoon and animated
  • minimalist - Simple and clean
  • vintage - Vintage and retro
  • futuristic - Sci-fi and futuristic

Quality Options:

  • high - High quality (default)
  • medium - Good quality
  • low - Basic quality

Examples:

# Futuristic city
python3 scripts/ai-prompt-gen.py midjourney "未来城市" "futuristic" "科技感" "high"

# Artistic portrait
python3 scripts/ai-prompt-gen.py midjourney "人像" "artistic" "优雅" "high"

code <language> <task> [difficulty]

Generate prompts for code generation.

Difficulty Options:

  • beginner - Simple and well-commented
  • intermediate - Moderate complexity (default)
  • advanced - Complex and optimized

Examples:

# Python sorting algorithm
python3 scripts/ai-prompt-gen.py code "Python" "排序算法" "intermediate"

# JavaScript web app
python3 scripts/ai-prompt-gen.py code "JavaScript" "待办事项应用" "beginner"

analyze <prompt>

Analyze the quality of a prompt and provide feedback.

Examples:

python3 scripts/ai-prompt-gen.py analyze "写一个关于AI的文章"

python3 scripts/ai-prompt-gen.py analyze "你是一个程序员,帮我写代码"

list

List all available prompt templates and categories.

python3 scripts/ai-prompt-gen.py list

Prompt Categories

Writing

  • Creative Writing: Generate original, engaging content
  • Technical Writing: Create professional documentation
  • Business Writing: Produce data-driven reports

Coding

  • Algorithms: Implement efficient algorithms
  • Web Development: Build modern web applications
  • Data Analysis: Process and visualize data

Marketing

  • SEO: Optimize for search engines
  • Social Media: Plan social campaigns
  • Email Marketing: Design email campaigns

Design

  • Logo Design: Create brand identities
  • UI Design: Design user interfaces
  • Brand Design: Develop brand guidelines

Research

  • Market Research: Analyze market trends
  • Technical Research: Evaluate technology solutions
  • Academic Research: Write scholarly reviews

Analysis

  • Financial Analysis: Analyze financial data
  • Business Analysis: Diagnose business problems
  • Data Analysis: Discover data insights

Examples

Content Creation

# Blog post about AI
python3 scripts/ai-prompt-gen.py general writing "人工智能的未来" creative general long

# Technical documentation
python3 scripts/ai-prompt-gen.py general writing "API文档" technical developer medium

AI Art Generation

# Cyberpunk city
python3 scripts/ai-prompt-gen.py midjourney "赛博朋克城市" "futuristic" "霓虹灯" "high"

# Minimalist logo
python3 scripts/ai-prompt-gen.py midjourney "简约logo" "minimalist" "现代" "high"

Code Generation

# Python data analysis
python3 scripts/ai-prompt-gen.py code "Python" "数据分析脚本" "intermediate"

# JavaScript calculator
python3 scripts/ai-prompt-gen.py code "JavaScript" "计算器应用" "beginner"

ChatGPT Optimization

# Role-playing prompt
python3 scripts/ai-prompt-gen.py chatgpt "历史学家" "解释二战历史" "面向中学生" "用简单易懂的语言"

# Expert consultation
python3 scripts/ai-prompt-gen.py chatgpt "财务顾问" "分析投资策略" "高风险承受能力" "包含具体建议"

Tips

  • Use specific, clear language in your prompts
  • Provide context and constraints when relevant
  • Choose appropriate difficulty levels
  • Test different styles for optimal results
  • Use the analyze feature to improve prompts
  • Combine multiple prompt types for complex tasks

Prompt Quality Analysis

The analyze command evaluates prompts based on:

  • Length: Prompts should be sufficiently detailed
  • Requirements: Clear objectives and expectations
  • Context: Background information when needed
  • Constraints: Limitations and specific requirements

Troubleshooting

"Unsupported category" error:

  • Check spelling of category names
  • Use list command to see available categories
  • Ensure category is one of: writing, coding, marketing, design, research, analysis

Generic prompts:

  • Add more specific details to the topic
  • Include audience information
  • Specify desired style and length
  • Use role-playing for ChatGPT prompts

Poor AI results:

  • Use the analyze command to improve prompt quality
  • Add more context and constraints
  • Try different style options
  • Be more specific about requirements

Advanced Usage

Combining Prompts

# Generate a writing prompt, then optimize it
python3 scripts/ai-prompt-gen.py general writing "气候变化" creative general long
python3 scripts/ai-prompt-gen.py analyze "生成的提示词"

Batch Generation

# Generate multiple prompts for comparison
python3 scripts/ai-prompt-gen.py general writing "AI" concise general short
python3 scripts/ai-prompt-gen.py general writing "AI" creative general long

Custom Templates

The script includes built-in templates, but you can modify the code to add your own custom prompt templates for specific use cases.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

aiprompt-engineeringchatgptmidjourneycode-generationcontent-creationautomationcli

同类 Skill