Help us improve
Share bugs, ideas, or general feedback.
From content-ops
Image style reference — visual guidelines, prompt templates, placement rules, and file naming conventions for image generation. Reads project-specific values from plugin config.
npx claudepluginhub pcamarajr/content-stack --plugin content-opsHow this skill is triggered — by the user, by Claude, or both
Slash command
/content-ops:content-image-styleThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides the image generation rules for content creation. It is auto-loaded during image generation tasks.
Generates AI images via Gemini API for artwork, photos, banners, logos, thumbnails. Configures models and aspect ratios like 16:9 or 1:1. Requires GEMINI_API_KEY and Python 3.
Generate SEO-focused images such as OG cards, hero images, schema assets, product visuals, and infographics. Use when image generation is part of an SEO workflow or content publishing task.
Generates and edits blog images via Gemini MCP with structured prompt engineering (Subject, Action, Context, Composition, Lighting, Style). Supports hero, OG, inline, product, and section divider images across 6 domain modes.
Share bugs, ideas, or general feedback.
This skill provides the image generation rules for content creation. It is auto-loaded during image generation tasks.
The following image_generation values are expected in your task prompt from the orchestrator:
image_generation.enabled, image_generation.provider, image_generation.model, image_generation.guidelinesimage_generation.output_path, image_generation.hero_dimensions, image_generation.inline_dimensionsimage_generation.placement, image_generation.min_word_count, image_generation.skip_typesimage_generation.max_inline_images (optional — caps inline images per article)For the full image style guide, read the file at image_generation.guidelines (e.g., .content-ops/image-style-guide.md). Below is the condensed reference for quick access.
Before generating any images, verify:
image_generation.enabled is true — if not, skip entirely and note "image generation is disabled"image_generation.skip_types — if it is, skip entirelyimage_generation.min_word_count — if below, skip entirelytest -n "${GEMINI_API_KEY}" && echo "set" || echo "missing"
Never echo, log, or include the API key in any output. If missing, stop with a clear error:
GEMINI_API_KEYOPENAI_API_KEYWhen placement is ai-driven:
Always add:
Add a section image when the H2 section:
Skip a section image when:
Default approach: fewer, better-placed images beat one-per-section coverage. If image_generation.max_inline_images is set in config, respect that cap. Otherwise, use editorial judgment — typically 1–3 inline images for a standard article. Always defer to the image style guide at image_generation.guidelines for project-specific placement preferences.
Use the model specified in image_generation.model from config. If not set, default to imagen-3.0-generate-002. Make API calls via Bash using curl:
# MODEL comes from image_generation.model in config (default: imagen-3.0-generate-002)
curl -s -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/${MODEL}:predict?key=${GEMINI_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"instances": [{"prompt": "[your prompt here]"}],
"parameters": {
"sampleCount": 1,
"aspectRatio": "[16:9 for inline | 1200:630 expressed as aspect ratio]",
"outputMimeType": "image/webp"
}
}'
The response contains a base64-encoded image in predictions[0].bytesBase64Encoded. Decode and write to the output path.
curl -s -X POST \
"https://api.openai.com/v1/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
-d '{
"model": "${MODEL}", // from image_generation.model in config (default: gpt-image-1)
"prompt": "[your prompt here]",
"n": 1,
"size": "1792x1024",
"response_format": "b64_json"
}'
The response contains a base64-encoded image in data[0].b64_json.
Build prompts by combining three parts:
Visual Style section of the image style guideBase Prompt Template section of the image style guideExample assembled prompt:
A developer reviewing a distributed system architecture diagram on a laptop screen.
Flat illustration style, clean geometric shapes, bold outlines, minimal texture.
Primary color #1A1A2E accent color #E94560, neutral background, no text overlays,
no watermarks, professional quality, suitable for a blog article about microservices.
Keep prompts under 400 characters. Avoid vague terms like "beautiful" or "amazing" — be specific about what is depicted.
Output root: {image_generation.output_path}/articles/{article-slug}/
Hero image: hero.webp
Inline images: {section-heading-slug}.webp (e.g., "## How Consensus Works" → how-consensus-works.webp)
Fallback format: .png (if API does not support webp)
Derive inline filenames by slugifying the H2 heading: lowercase, replace spaces and special characters with hyphens, collapse consecutive hyphens, trim leading/trailing hyphens. This makes filenames meaningful and aligned with the section content.
Write image bytes by piping the base64-decoded output via Bash:
echo "[base64 string]" | base64 -d > public/images/articles/{slug}/hero.webp
Always verify the file was written (check file size > 0) before returning the path.
Examples:
Good: "A diagram showing how validator nodes reach consensus in a proof-of-stake network"
Bad: "Image showing blockchain consensus"
Insert images as standard Markdown:
Hero image — insert after the closing --- of the frontmatter, before the first paragraph:

Inline section images — insert immediately before the ## Section Title heading they illustrate:

## Section Title
Always report skipped images clearly in the output so the orchestrator can flag them.