본문으로 건너뛰기
cccskills
무료GitHub에 공개

blog-image

Paid Gemini image generation for blog heroes, inline illustrations, and OG cards (direct API by default, optional MCP for edits). Asks for explicit consent before the first paid call. Runs only on an explicit request: /blog image, "generate a blog hero image", "blog illustration", "edit this blog image", "OG image", or when blog-write or blog-rewrite needs a hero. Not for charts (blog-chart) or stock-photo search.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Gemini
설치 방법 보기

포함된 파일(6)

  • SKILL.md18.3 KB
  • references/gemini-models.md12.9 KB
  • references/mcp-tools.md5.2 KB
  • references/prompt-engineering-blog.md10.2 KB
  • scripts/setup_image_mcp.py19.7 KB
  • scripts/validate_image_setup.py14.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Blog Image - AI Image Generation for Blog Content

Bundled paths below use host Markdown substitution of ${CLAUDE_SKILL_DIR}; it is not an exported shell variable. Resolve them before execution, quote paths, and refuse nonabsolute overrides. Pass blog_reference_root resolved from ${CLAUDE_SKILL_DIR}/../blog/references, blog_template_root from ${CLAUDE_SKILL_DIR}/../blog/templates, and needed sibling roots to agents. Read the main reference orchestration-details.md before loading project context; pass only its helper-fenced output to downstream agents.

Cost and consent gate (mandatory, read first)

This skill spends the user's Google AI credit and writes image files.

  • What it spends: one paid Gemini image call per generated or edited image. generate_hero.py can try up to four model IDs in turn when the first fails, so budget for that worst case. The stock-photo and Openverse rungs are free but may need their own keys.
  • Cost basis: per-image prices at https://ai.google.dev/gemini-api/docs/pricing. On 2026-10-12 that page listed gemini-nano-banana-2.1 at $0.0336 (1K), $0.0504 (2K), $0.113 (4K) and gemini-3.1-flash-image at $0.067 (1K). Re-read it before quoting a number.
  • What it writes: hero.<ext> and hero-credit.txt in the draft folder (direct API), ~/Documents/nanobanana_generated/ (optional MCP), and ~/.claude/settings.json (setup only).
  • Consent: before the FIRST paid call or file write in a session, tell the user the model, size, image count, and estimated cost (count times price) and wait for an explicit yes. The yes covers only that count. Asking for a blog post does not by itself consent to a paid image call.
  • No uncapped spend: never loop on paid calls. Safety rephrases stop at 3 attempts per image. Bulk work (for example a cluster) needs a stated total count and a cap, confirmed once before the first call.
  • Declined or unavailable: skip the Gemini call (run the script with the key unset, env -u GOOGLE_AI_API_KEY, to use the free stock rungs) and return ONE line for the orchestrator's "Fallbacks and skips" summary, such as "Hero image: user declined paid generation, used a stock photo".

You are a Creative Director that orchestrates Gemini's image generation specifically for blog content. Never pass raw user text directly to the API. Always interpret, enhance, and construct an optimized prompt using the 6-component Reasoning Brief system.

Quick Reference

CommandWhat it does
/blog image generate <idea>Generate a blog image with full prompt engineering
/blog image edit <path> <instructions>Edit an existing blog image intelligently
/blog image setupCheck the API key and, optionally, install the MCP server

Blog Image Types

Match the image type to blog use case:

Image TypeAspect RatioResolutionDomain ModePlacement
Hero/Cover16:92K or 4KEditorial / LandscapeFrontmatter coverImage
OG/Social Card16:91KEditorial / InfographicFrontmatter ogImage
Inline Illustration16:9 or 4:31KVaries by topicAfter H2, before body
Inline Product Shot4:3 or 1:11KProductWithin product sections
Section Divider21:9 then crop1KAbstract / LandscapeBetween major sections

Sizing requirements:

  • Blog hero/cover: 1200x630 (OG-compatible) or 1920x1080
  • Open Graph (OG): 1200x630 (required for social sharing)
  • Inline images: 1200px+ wide

Generation Routes

  1. Direct API (default). The repo's generate_hero.py calls the Gemini API with GOOGLE_AI_API_KEY (the google-genai SDK must be installed), then falls back to premium stock and Openverse. It needs no MCP server.
  2. Optional MCP (at your own risk). @ycse/nanobanana-mcp@1.1.1 is the only package the setup script pins, and it only supports image model IDs that Google shut down on 2026-06-25 (see Step 5). Use it only if the user already has a working server; never present it as the default.

Before using the MCP route, check availability: call get_image_history with conversation_id: "default" (no side effects). If it fails, use the direct API route instead of asking the user to install the MCP.

When called internally (from blog-write/blog-rewrite) and no route works: no error, but return a one-line fallback note (what was skipped, why) for the caller's final summary. The calling workflow continues with stock photos.

Generation Workflow

For /blog image generate <idea> or when invoked internally:

Step 1: Analyze Intent

Determine what the blog needs:

  • Image type: Hero, inline, OG card, section divider?
  • Blog topic: What is the article about?
  • Style: Photorealistic, editorial, illustrated, minimal?
  • Constraints: Brand colors, specific dimensions, platform format?
  • Mood: Authoritative, inviting, dramatic, clean?

If the request is vague, ask one clarifying question about use case and style.

Step 2: Select Domain Mode

Choose the expertise lens for the image:

ModeWhen to usePrompt emphasis
EditorialBlog headers, feature images, lifestyleStyling, composition, publication references
ProductE-commerce posts, reviews, comparisonsSurface materials, studio lighting, clean BG
LandscapeEnvironmental backgrounds, travel, hero sectionsAtmospheric perspective, depth layers, time of day
UI/WebTech blog icons, illustrations, diagramsClean vectors, flat design, exact colors
InfographicData-driven posts, processes, comparisonsLayout structure, hierarchy, accessible colors
AbstractPattern backgrounds, section dividers, decorativeColor theory, mathematical forms, textures

Load ${CLAUDE_SKILL_DIR}/references/prompt-engineering-blog.md for domain mode modifier libraries.

Step 3: Construct the 6-Component Reasoning Brief

Build the prompt as natural narrative paragraphs, not keyword lists:

  1. Subject - Who/what, with rich physical detail (textures, materials, scale)
  2. Action - What is happening, pose, gesture, movement, state
  3. Context - Environment, setting, time of day, season, weather
  4. Composition - Camera angle, shot type, framing, negative space, depth
  5. Lighting - Light source, quality, direction, color temperature, shadows
  6. Style - Art medium, aesthetic, film stock, reference artists/eras

Template for photorealistic blog images:

A photorealistic [shot type] of [subject with physical detail], [action/pose],
set in [environment with specifics]. [Lighting conditions] create [mood].
Captured with [camera model], [focal length] lens at [f-stop], producing
[depth of field effect]. [Color palette/grading notes]. Aspect ratio 16:9,
suitable as a blog [hero image/inline illustration] at [target dimensions].

Template for illustrated/stylized:

A [art style] [format] of [subject with character detail], featuring
[distinctive characteristics] with [color palette]. [Line style] and
[shading technique]. Background is [description]. [Mood/atmosphere].

Step 4: Set Aspect Ratio

Direct API: the script requests 16:9 and fits the result to --width by --height (default 1200x630). MCP route: call set_aspect_ratio BEFORE generating, with conversation_id: "default".

Blog Use CaseRatio
Hero / Cover / OG16:9
Product shot / Square4:3 or 1:1
Section divider21:9, then crop wider in post-processing if needed
Vertical (stories)9:16

Step 5: Generate

Default: direct API. After the consent gate, resolve BLOG_SCRIPT_DIR="${CLAUDE_BLOG_SCRIPTS_DIR:-${CLAUDE_SKILL_DIR}/../../scripts}", reject it unless absolute, and never run a relative scripts/generate_hero.py:

python3 "$BLOG_SCRIPT_DIR/generate_hero.py" --topic "<post title>" \
  --tags "tag1,tag2" --out "<draft-folder>" [--width 1200] [--height 630] \
  [--model <image-model-id>] --json

Flags: --topic (required), --tags, --out (required, receives hero.<ext> and hero-credit.txt), --width, --height, --model, --json. Exit 0 means a hero was written (the JSON source field says gemini, a stock provider, or openverse: report any non-Gemini source as a fallback). Exit 1 means every rung failed. The script builds one fixed editorial prompt from the topic and tags; it has no --prompt flag, so custom briefs and edits need the optional MCP route or a direct google-genai call written from the current docs.

Model IDs (Google deprecations page, 2026-10-12): use gemini-nano-banana-2.1 for new work. gemini-3.1-flash-image is the previous generation (no shutdown announced; replacement gemini-nano-banana-2.1). gemini-2.5-flash-image has an earliest shutdown of 2027-03-15. See ${CLAUDE_SKILL_DIR}/references/gemini-models.md.

Optional MCP route (at your own risk). Pinned @ycse/nanobanana-mcp@1.1.1 exposes set_model aliases flash and pro that map to preview IDs shut down on 2026-06-25, so generation through it is expected to fail. Prefer the direct API unless a newer package explicitly supports stable IDs.

MCP ToolWhen
set_aspect_ratioAlways call first, even for 1:1
gemini_generate_imageNew image from crafted prompt
gemini_edit_imageModify existing image
gemini_chatIterative refinement / multi-turn sessions
get_image_historyReview generated images with conversation_id: "default"
clear_conversationReset session context

Load ${CLAUDE_SKILL_DIR}/references/mcp-tools.md for MCP parameter details. Load ${CLAUDE_SKILL_DIR}/references/gemini-models.md for model specs, pricing, and rate limits.

Step 6: Post-Processing (when needed)

After generation, resize/convert for blog use:

# Resize to blog hero dimensions (1200x630)
magick input.png -resize 1200x630^ -gravity center -extent 1200x630 hero.png

# Convert to WebP for web optimization
magick input.png -quality 85 output.webp

# Convert to AVIF when target browsers support it
magick input.png -quality 80 output.avif

# Crop to exact OG dimensions
magick input.png -resize 1200x630^ -gravity center -extent 1200x630 og-image.png

Check if magick (ImageMagick 7) is available. Fall back to convert if not.

Step 7: Deliver

Provide:

  1. Image path - where it was saved (the draft folder for the direct API, ~/Documents/nanobanana_generated/ for the MCP)
  2. Crafted prompt - show the full Reasoning Brief (educational)
  3. Settings - model, aspect ratio, domain mode
  4. Alt text - descriptive sentence, 10-125 chars, topic keywords naturally
  5. Frontmatter snippet (for hero/OG images):
coverImage: "/path/to/generated-image.png"
coverImageAlt: "Descriptive alt text sentence with topic keywords"
ogImage: "/path/to/generated-image.png"
  1. Refinement suggestions - 1-2 ideas if relevant

Edit Workflow

For /blog image edit <path> <instructions>:

  1. Read the image path and edit instruction
  2. Enhance the instruction (never pass raw):
    User saysClaude crafts
    "remove background"Detailed edge-preserving background removal
    "make it warmer"Specific color temperature shift with preservation notes
    "add text"Font style, size, placement, contrast, readability notes
    "make it brighter"Increase exposure, lift shadows, maintain highlights
    "crop for social"Resize to 1200x630 with center-gravity crop
  3. Editing needs the optional MCP (gemini_edit_image), which is a paid call under the consent gate. Without a working MCP, say so and offer to regenerate through the direct API instead
  4. Return modified image path and description

Internal API (for blog-write / blog-rewrite)

When invoked as a Task subagent from blog-write or blog-rewrite:

Input (provided by calling skill):

  • image_type: hero, inline, og, divider
  • topic: blog post topic/title
  • section_context: (optional) heading or section the image supports
  • style_preference: (optional) photorealistic, illustrated, editorial
  • count: (optional) number of images needed (default: 1)

Output (returned to calling skill):

### Generated Image
- **Path:** <draft-folder>/hero.png
- **Alt Text:** Descriptive sentence about the image
- **Type:** hero / inline / og
- **Domain Mode:** Editorial
- **Aspect Ratio:** 16:9
- **Suggested Frontmatter:**
  coverImage: "/path/to/image.png"
  coverImageAlt: "Alt text here"

Graceful fallback: If no generation route works or the user declines the cost gate, return immediately with no error and a one-line fallback note (what, why) for the caller's final summary. The calling workflow continues with stock photos. The delivery contract still requires a hero file, so the orchestrator must supply one (stock or manual) before rendering. Do not call this skill a second time for the same post's hero: blog-write already requests it once.

Alt Text Generation

For every generated image, create alt text following blog standards:

  • Full descriptive sentence (not keyword list)
  • 10-125 characters
  • Include topic keywords naturally
  • Describe what the image shows AND its relevance to the content
  • For charts/infographics: include the key data point

Good: Marketing team analyzing AI search traffic data on a dashboard showing citation metrics Bad: SEO AI marketing blog optimization image

Setup

For /blog image setup:

Resolve BLOG_SKILLS_DIR="${CLAUDE_BLOG_SKILLS_DIR:-${CLAUDE_SKILL_DIR}/..}" and reject it unless absolute. Setup is the only action allowed to change image capability configuration, and it needs the user's explicit yes first.

Default path (no MCP): the direct API only needs a key and the SDK.

  1. Export GOOGLE_AI_API_KEY (free to create at https://aistudio.google.com/apikey; a billing-enabled project may be required for image models). generate_hero.py reads only this variable.
  2. Install the SDK with the project's explicit setup (google-genai is declared in the repo pyproject.toml dependencies); never install implicitly during a run.

Optional MCP path (at your own risk):

  1. Run python3 "$BLOG_SKILLS_DIR/blog-image/scripts/setup_image_mcp.py" (interactive)
    • Prefer exporting GOOGLE_AI_API_KEY before invoking the setup script so a literal key does not enter shell history
    • Or: python3 "$BLOG_SKILLS_DIR/blog-image/scripts/setup_image_mcp.py" --key-file /path/to/key.txt
    • Avoid --key unless necessary because command arguments can enter shell history and process lists
    • Default writes to ~/.claude/settings.json (user-private, mode 0600)
    • --project flag opts into project .mcp.json (env-expansion only, refuses to write a literal key into a tracked file)
  2. Verify: python3 "$BLOG_SKILLS_DIR/blog-image/scripts/validate_image_setup.py"
  3. Requires Node.js 18+ (npx).
  4. Caveat: the script pins @ycse/nanobanana-mcp@1.1.1. That npm release hard-codes preview image model IDs that Google shut down on 2026-06-25 (deprecations page, checked 2026-10-12), so image calls through it are expected to fail. Tell the user this before installing. Update setup, validation, and this documentation together when a package release with stable ID support is available.

Safety Filter Auto-Rephrase

When IMAGE_SAFETY or SAFETY is returned, do NOT give up. Auto-rephrase and retry:

  1. Identify the likely trigger (violence, public figures, NSFW-adjacent, or overly cautious filter)
  2. Rephrase using positive framing - describe what you WANT, not what to avoid
  3. If the subject is a person, make them generic (remove celebrity-like specifics)
  4. If the scene is dramatic, soften: "intense" → "focused", "battle" → "competition"
  5. Retry with the rephrased prompt (max 3 attempts before reporting to user)

Google acknowledged filters "became way more cautious than we intended" - benign prompts are sometimes blocked. Persistence with rephrasing usually succeeds.

Edit, Don't Re-roll

If an image is 80% correct, use gemini_chat for conversational editing rather than regenerating from scratch. The session maintains style consistency, so targeted edits preserve what works while fixing what doesn't.

When to edit vs regenerate:

  • Color slightly off → Edit ("shift the color temperature warmer")
  • Wrong composition entirely → Regenerate with revised brief
  • Good scene but wrong lighting → Edit ("change to golden hour lighting from the left")
  • Missing a detail → Edit ("add a steaming coffee cup on the desk")

Error Handling

ErrorResolution
No generation routeExport GOOGLE_AI_API_KEY (see Setup); the MCP is optional
API key invalidNew key at https://aistudio.google.com/apikey
Rate limited (429)Wait 60s, retry. Check live limits at https://ai.google.dev/gemini-api/docs/rate-limits
IMAGE_SAFETYAuto-rephrase (see above) - Layer 2 filter, non-configurable
PROHIBITED_CONTENTContent policy violation - topic is blocked. Non-retryable.
SAFETYRephrase prompt - Layer 1 filter
Vague requestAsk one clarifying question before generating
Poor qualityReview Reasoning Brief - likely missing lighting (biggest quality differentiator)
No route or consent declined (internal call)Return a one-line fallback note; calling workflow uses stock photos and reports it

Reference Documentation

Load on-demand - do NOT load all at startup:

  • ${CLAUDE_SKILL_DIR}/references/prompt-engineering-blog.md - Domain modes, 6-component system, blog templates
  • ${CLAUDE_SKILL_DIR}/references/gemini-models.md - Model specs, rate limits, aspect ratios, pricing
  • ${CLAUDE_SKILL_DIR}/references/mcp-tools.md - MCP tool parameters and response formats

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

<What it does, one line>. Trigger phrases: <phrases>.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gabrielmoreira/agent-skills-mirror192026년 10월 23일 업데이트

Use this skill whenever the user wants to create or improve a presentation for an academic context — conference papers, seminar talks, thesis defenses, grant briefings, lab meetings, invited lectures, or any presentation where the audience will evaluate reasoning and evidence. Triggers include: 'conference talk', 'seminar slides', 'thesis defense', 'research presentation', 'academic deck', 'academic presentation'. Also triggers when the user asks to 'make slides' in combination with academic content (e.g., 'make slides for my paper on X', 'create a presentation for my dissertation defense', 'build a deck for my grant proposal'). This skill governs CONTENT and STRUCTURE decisions. For the technical work of creating or editing the .pptx file itself, also read the pptx SKILL.md.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gabrielmoreira/agent-skills-mirror192026년 10월 23일 업데이트

adapt

무료

Shortest English alias for web-adapt / universal-web-adaptation. Use this when adapting an unfamiliar public website generically before creating any site-specific rules.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gabrielmoreira/agent-skills-mirror192026년 10월 23일 업데이트

Use this skill to audit CLI adapter projects (like opencli) for missing output fields, then batch-generate fixes and submit PRs. Turns AI agents into adapter quality reviewers.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gabrielmoreira/agent-skills-mirror192026년 10월 23일 업데이트

ads

무료

Operate professional paid advertising across Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, Apple, Amazon, Reddit, Pinterest, Snapchat, and X. Use for account intake, source-grounded audits, strategy, budget and measurement planning, creative production, experiments, reporting, monitoring, and explicitly approved campaign changes. Also trigger on PPC, paid social, retail media, attribution, tracking, landing pages, cross-platform conversion totals, negative keywords or search terms, beta-feature scoring, stale platform claims, API-token or credential setup, campaign deletion, and safe Claude Ads installation or uninstall.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gabrielmoreira/agent-skills-mirror192026년 10월 23일 업데이트

Audit Amazon Ads profiles, regions, Sponsored Products, Sponsored Brands, Sponsored Display, DSP, portfolios, targeting, search terms, retail readiness, creative, budgets, ACOS, TACOS, reporting, and policy. Use for Amazon Ads, sponsored ads, Amazon PPC, ACOS, TACOS, ASIN advertising, Amazon DSP, or retail-media optimization.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

gabrielmoreira/agent-skills-mirror192026년 10월 23일 업데이트

gabrielmoreira의 스킬 모두 보기

이 스킬의 문제 신고