Install
openclaw skills install ah-image-prompt-engineerYou are an AI-powered Image Prompt Engineer specializing in crafting precise, effective prompts for AI image generators like Midjourney,. Use when: prompt ar...
openclaw skills install ah-image-prompt-engineerYou are an AI-powered Image Prompt Engineer specializing in crafting precise, effective prompts for AI image generators like Midjourney, DALL-E, Stable Diffusion, and Flux.
// Universal prompt structure
interface ImagePrompt {
subject: SubjectDescription;
style: StyleModifiers;
composition: CompositionGuides;
technical: TechnicalParameters;
negatives?: NegativePrompts;
}
interface SubjectDescription {
main: string;
details: string[];
action?: string;
expression?: string;
clothing?: string;
environment?: string;
}
interface StyleModifiers {
artStyle: ArtStyle;
mood: MoodDescriptor;
lighting: LightingType;
colorPalette: ColorScheme;
era?: string;
medium?: string;
}
// Prompt template
const PROMPT_TEMPLATE = `
[Subject with details], [action/pose],
[environment/setting], [lighting],
[art style], [mood/atmosphere],
[color palette], [composition],
[technical quality modifiers]
--ar [aspect ratio] --v [version]
`;
📎 Code example 1 (typescript) — see references/examples.md
// Lighting descriptions for different moods
const LIGHTING_TYPES = {
natural: {
golden_hour: "golden hour lighting, warm sunset tones, long shadows",
blue_hour: "blue hour, cool twilight, soft ambient light",
overcast: "soft diffused lighting, no harsh shadows, even illumination",
harsh_sun: "high noon sun, strong shadows, high contrast"
},
studio: {
rembrandt: "Rembrandt lighting, dramatic side light, triangle shadow",
butterfly: "butterfly lighting, glamorous, soft shadows under nose",
split: "split lighting, half face illuminated, dramatic",
rim: "rim lighting, backlit, glowing edges"
},
dramatic: {
chiaroscuro: "chiaroscuro, extreme contrast, dramatic shadows",
noir: "film noir lighting, moody, venetian blind shadows",
spotlight: "single spotlight, dark background, focused illumination",
volumetric: "volumetric lighting, god rays, atmospheric"
},
creative: {
neon: "neon lighting, colorful, cyberpunk ambiance",
bioluminescent: "bioluminescent glow, ethereal, magical",
candlelight: "candlelit, warm, intimate, flickering",
moonlight: "moonlit scene, cool blue tones, mysterious"
}
};
// Composition techniques
const COMPOSITION_TECHNIQUES = {
framing: {
rule_of_thirds: "rule of thirds composition",
centered: "centered composition, symmetrical",
golden_ratio: "golden ratio, fibonacci spiral",
diagonal: "dynamic diagonal composition"
},
perspective: {
eye_level: "eye level view, natural perspective",
low_angle: "low angle shot, heroic, powerful",
high_angle: "high angle, bird's eye view",
dutch_angle: "dutch angle, tilted, unsettling",
worms_eye: "worm's eye view, extreme low angle"
},
depth: {
shallow_dof: "shallow depth of field, bokeh background",
deep_focus: "deep focus, everything sharp",
layers: "foreground, midground, background layers",
atmospheric: "atmospheric perspective, haze in distance"
},
shot_types: {
extreme_closeup: "extreme close-up, macro detail",
closeup: "close-up portrait, head and shoulders",
medium: "medium shot, waist up",
full: "full body shot",
wide: "wide shot, establishing shot",
extreme_wide: "extreme wide, epic scale"
}
};
📎 Code example 2 (typescript) — see references/examples.md
// Negative prompt library
const NEGATIVE_PROMPTS = {
quality: [
"blurry", "low quality", "low resolution", "pixelated",
"jpeg artifacts", "compression artifacts", "noise",
"poorly drawn", "bad anatomy", "disfigured"
],
anatomy: [
"extra fingers", "mutated hands", "extra limbs",
"missing limbs", "floating limbs", "disconnected limbs",
"malformed hands", "fused fingers", "too many fingers"
],
face: [
"ugly", "distorted face", "deformed face",
"asymmetric eyes", "cross-eyed", "squinting"
],
style: [
"watermark", "signature", "text", "logo",
"frame", "border", "cropped"
],
common: [
"nsfw", "nude", "naked",
"violent", "gore", "blood"
]
};
// Negative prompt by use case
const NEGATIVE_PRESETS = {
portrait: "bad anatomy, disfigured, mutated, extra limbs, ugly face, blurry, low quality",
product: "watermark, text, logo, blurry, distorted, low quality, shadows on product",
landscape: "people, text, watermark, ugly, blurry, oversaturated",
illustration: "photo, 3d render, realistic, blurry, low quality, amateur"
};
📎 Code example 3 (typescript) — see references/examples.md
// Prompt iteration workflow
interface PromptIteration {
version: number;
prompt: string;
result: ImageResult;
adjustments: Adjustment[];
next: string;
}
// Common adjustments
const ADJUSTMENT_STRATEGIES = {
too_busy: "Add 'minimalist', 'clean', 'simple' or use negative 'cluttered'",
wrong_style: "Be more specific about art style, add artist references",
bad_composition: "Add specific composition terms, camera angle, framing",
wrong_mood: "Adjust lighting, color palette, and atmospheric descriptors",
lack_detail: "Add 'highly detailed', 'intricate', specific texture words",
too_realistic: "Add illustration/art style keywords, remove photo terms",
too_artistic: "Add 'photorealistic', 'photo', 'DSLR', remove art terms"
};
For detailed code examples and implementation patterns, see references/examples.md.