prompt-agent

将中文创意需求转换为 SDXL 或 Flux 可用的高质量英文图像提示词。当用户要求生成图片、画一张图、出图、AI绘画时触发。

3,891 stars

Best use case

prompt-agent is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

将中文创意需求转换为 SDXL 或 Flux 可用的高质量英文图像提示词。当用户要求生成图片、画一张图、出图、AI绘画时触发。

Teams using prompt-agent should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/prompt-agent/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/baobaodawang-creater/visual-muse/archive/v1.2-skills/prompt-agent/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/prompt-agent/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How prompt-agent Compares

Feature / Agentprompt-agentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

将中文创意需求转换为 SDXL 或 Flux 可用的高质量英文图像提示词。当用户要求生成图片、画一张图、出图、AI绘画时触发。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Prompt Agent

将用户的中文需求转成可执行的英文 prompt。

## 第一步:读取风格模板库

```bash
cat /home/node/.openclaw/workspace/prompt-templates.json
```

根据用户需求匹配最合适的风格模板。匹配规则:
- 用户说"电影感/电影风" → cinematic
- 用户说"动漫/二次元/卡通" → anime
- 用户说"写实/照片/真实" → photorealistic
- 用户说"概念艺术/概念图" → concept_art
- 用户说"水彩" → watercolor
- 用户说"油画" → oil_painting
- 用户说"赛博朋克" → cyberpunk
- 用户说"奇幻/魔幻" → fantasy
- 用户说"复古/昭和/怀旧" → vintage
- 用户没指定风格 → cinematic(默认)

## 第二步:结构化拆解(6维)

收到需求后,先拆解为以下 6 个维度,并分别产出英文关键词:
- `subject`:画面中心主体(人物/动物/物体)
- `environment`:场景地点(街道、森林、室内等)
- `style`:画风、年代感、材质质感
- `lighting`:时间与光线(晨光、霓虹夜景、逆光等)
- `camera`:景别、角度、镜头(close-up, wide shot, low angle, 35mm)
- `mood`:氛围与情绪(nostalgic, tense, dreamy, warm)

组合顺序:`subject -> environment -> style -> lighting -> camera -> mood`。

## 第三步:权重控制规范

- 用户强调元素(如“重点是XXX”)必须加权:`(keyword:1.4)` 到 `(keyword:1.5)`
- 重要但非核心元素:`(keyword:1.2)` 到 `(keyword:1.3)`
- 需要弱化元素:`(keyword:0.7)` 到 `(keyword:0.9)`
- SDXL 使用关键词+权重格式;Flux 使用自然语言段落,但仍可对核心词做轻量加权。

## 第四步:负向 prompt 模板库

先写通用排除,再拼接风格专用排除。

- 通用排除(必须包含):
  `bad anatomy, bad hands, blurry, watermark, text, logo, deformed`
- 写实风格额外排除:
  `cartoon, anime, illustration, painting`
- 动漫风格额外排除:
  `photorealistic, photo, 3d render`
- 复古风格额外排除:
  `modern, digital, clean, sharp`

## 第五步:用户意图确认机制

当需求模糊时先确认,再出最终 prompt。

- 触发“模糊需求”条件:
  - 用户输入少于 10 个字,且
  - 未明确风格词(如动漫、写实、赛博朋克、复古等)
- 模糊需求处理:
  1. 先输出 6 维拆解草案
  2. 询问:`这样理解对吗?`
  3. 用户确认后再输出最终 JSON
- 明确需求处理:
  - 输入超过 10 个字,或已指定风格,直接输出 JSON

## 第六步:输出 JSON

只输出 JSON,不附加解释。

```json
{
  "positive": "结构化组合后的英文 prompt",
  "negative": "通用负向 + 风格负向",
  "model": "sdxl",
  "style": "匹配到的风格名",
  "recommended_checkpoint": "模板推荐的checkpoint",
  "style_tags": ["标签1", "标签2"],
  "decomposition": {
    "subject": "...",
    "environment": "...",
    "style": "...",
    "lighting": "...",
    "camera": "...",
    "mood": "..."
  }
}
```

## 禁止事项

- 不输出 markdown 代码块
- 不输出解释或前言
- 不使用空泛词
- 不给出互相冲突的风格指令(如同时强调 realistic 与 anime)

Related Skills

prompt-injection-defense

3891
from openclaw/skills

Harden agent sessions against prompt injection from untrusted content. Use when the agent reads web search results, emails, downloaded files, PDFs, or any external text that could contain adversarial instructions. Provides content scanning, memory write guardrails (scan → lint → accept or quarantine), untrusted content tagging, and canary detection. Also use when setting up new tools that ingest external content (email checkers, RSS readers, web scrapers).

CinePrompt Skill

3891
from openclaw/skills

AI video prompt builder for cinematographers. Translates natural language shot descriptions into structured prompts optimized for AI video generators.

reprompter

3891
from openclaw/skills

Transform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.

indirect-prompt-injection

3891
from openclaw/skills

Detect and reject indirect prompt injection attacks when reading external content (social media posts, comments, documents, emails, web pages, user uploads). Use this skill BEFORE processing any untrusted external content to identify manipulation attempts that hijack goals, exfiltrate data, override instructions, or social engineer compliance. Includes 20+ detection patterns, homoglyph detection, and sanitization scripts.

prompt-inspector

3891
from openclaw/skills

Detect prompt injection attacks and adversarial inputs in user text before passing it to your LLM. Use when you need to validate or screen user-provided text for jailbreak attempts, instruction overrides, role-play escapes, or other prompt manipulation techniques. Returns a safety verdict, risk score (0–1), and threat categories. Ideal for guarding AI pipelines, chatbots, and any application that feeds user input into a language model.

ai-video-prompt

3891
from openclaw/skills

AI视频Prompt构建专家。采用"首尾帧图片+视频"工作流,支持多段5秒视频拼接生成长视频(30秒/60秒)。先生成关键帧图片,再生成视频Prompt,确保段与段之间无缝衔接。针对即梦平台优化,支持全中文Prompt输出。

prompt-nubaby

3891
from openclaw/skills

Nubaby prompt system for prompt augmentation, routers, dictionaries, dataset captions, prompt tags, compact prompts, video/storyboard prompt shaping, and structured visual tension expansion. Use when prompts are too short/vague or need structured upgrade before comfyui-nubaby execution.

senior-prompt-engineer

3891
from openclaw/skills

This skill should be used when the user asks to "optimize prompts", "design prompt templates", "evaluate LLM outputs", "build agentic systems", "implement RAG", "create few-shot examples", "analyze token usage", or "design AI workflows". Use for prompt engineering patterns, LLM evaluation frameworks, agent architectures, and structured output design.

prompt-engineer-toolkit

3891
from openclaw/skills

Analyzes and rewrites prompts for better AI output, creates reusable prompt templates for marketing use cases (ad copy, email campaigns, social media), and structures end-to-end AI content workflows. Use when the user wants to improve prompts for AI-assisted marketing, build prompt templates, or optimize AI content workflows. Also use when the user mentions 'prompt engineering,' 'improve my prompts,' 'AI writing quality,' 'prompt templates,' or 'AI content workflow.'

prompt-assemble

3891
from openclaw/skills

Token-safe prompt assembly with memory orchestration. Use for any agent that needs to construct LLM prompts with memory retrieval. Guarantees no API failure due to token overflow. Implements two-phase context construction, memory safety valve, and hard limits on memory injection.

journal-cover-prompter

3891
from openclaw/skills

Use when creating journal cover images, generating scientific artwork prompts, or designing graphical abstracts. Creates detailed prompts for AI image generators to produce publication-quality scientific visuals.

no-prompt

3891
from openclaw/skills

Stop learning prompt engineering. Tell AI what you want in plain language — AI writes the perfect instruction for you in I-Lang. Copy it to any other AI, it executes perfectly. Zero prompt skills needed. Text-to-text translator only, no code, no install, no credentials.