Install
openclaw skills install ai-prompt-genGenerate 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.
openclaw skills install ai-prompt-genGenerate optimized prompts for various AI models. Create prompts for ChatGPT, Midjourney, code generation, and more with customizable styles and parameters.
python3 scripts/ai-prompt-gen.py general writing "人工智能" creative general long
python3 scripts/ai-prompt-gen.py chatgpt "专业作家" "写一篇关于AI的文章" "背景信息" "字数500字"
python3 scripts/ai-prompt-gen.py midjourney "未来城市" "futuristic" "科技感" "high"
python3 scripts/ai-prompt-gen.py analyze "写一个关于AI的文章"
general <category> <topic> [style] [audience] [length]Generate general AI prompts for various categories.
Categories:
writing - Content writing and creative writingcoding - Code generation and programmingmarketing - Marketing and SEOdesign - Graphic and UI designresearch - Research and analysisanalysis - Data and business analysisStyle Options:
concise - Brief and to the pointcreative - Creative and imaginativetechnical - Technical and detaileddetailed - Comprehensive and thoroughLength Options:
short - Brief outputmedium - Moderate length (default)long - Detailed and comprehensiveExamples:
# 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 styleartistic - Artistic and creativecartoon - Cartoon and animatedminimalist - Simple and cleanvintage - Vintage and retrofuturistic - Sci-fi and futuristicQuality Options:
high - High quality (default)medium - Good qualitylow - Basic qualityExamples:
# 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-commentedintermediate - Moderate complexity (default)advanced - Complex and optimizedExamples:
# 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 "你是一个程序员,帮我写代码"
listList all available prompt templates and categories.
python3 scripts/ai-prompt-gen.py list
# 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
# Cyberpunk city
python3 scripts/ai-prompt-gen.py midjourney "赛博朋克城市" "futuristic" "霓虹灯" "high"
# Minimalist logo
python3 scripts/ai-prompt-gen.py midjourney "简约logo" "minimalist" "现代" "high"
# Python data analysis
python3 scripts/ai-prompt-gen.py code "Python" "数据分析脚本" "intermediate"
# JavaScript calculator
python3 scripts/ai-prompt-gen.py code "JavaScript" "计算器应用" "beginner"
# Role-playing prompt
python3 scripts/ai-prompt-gen.py chatgpt "历史学家" "解释二战历史" "面向中学生" "用简单易懂的语言"
# Expert consultation
python3 scripts/ai-prompt-gen.py chatgpt "财务顾问" "分析投资策略" "高风险承受能力" "包含具体建议"
The analyze command evaluates prompts based on:
"Unsupported category" error:
list command to see available categoriesGeneric prompts:
Poor AI results:
analyze command to improve prompt quality# 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 "生成的提示词"
# 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
The script includes built-in templates, but you can modify the code to add your own custom prompt templates for specific use cases.