agentleFS
XPOZpublicXPOZpublic/geo-seo-agent/.claude/skills/generate-hero-image/SKILL.md

generate-hero-image

Skill0 starsChanged 3 months agoMITView on GitHub

Generate a hero image for a finished content draft with scripts/generate-hero-image.py (Claude Haiku writes the image prompt, a Gemini image model renders it). Run when the publishing workflow calls for hero images; the image lands in the item's folder and ships with the draft handoff.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Look at the image before handing it off.

    line 25
  2. Very specific:

    Brand fit: when hero_images.style is set, the image should sit comfortably next to the site's existing pages.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Generate Hero Image

Optional last step of content production, for sites whose publishing workflow expects a hero image. The script is a two-stage chain: Claude Haiku turns the draft's title, description, and keywords into a topic-specific image prompt (respecting the brand style in config.json's hero_images block, when set), and a Gemini image model renders it. Everything stays in the item folder; the human publishes the image with the draft.

Run

.venv/bin/python scripts/generate-hero-image.py \
  --title "<the draft's title>" \
  --content-file content/self-published/items/<slug>/draft.md \
  --out content/self-published/items/<slug>/hero.png
  • --show-prompt prints the generated prompt without rendering: cheap way to sanity-check topic fit before spending an image call.
  • Works the same for docs items (content/docs/items/<slug>/) when the docs platform uses hero images.
  • Rendering needs GEMINI_API_KEY (or the Vertex AI pair); the prompt stage uses ANTHROPIC_API_KEY and falls back to a deterministic prompt without it.

Judge the result

Look at the image before handing it off. Regenerate when it fails either test:

  • Topic fit: someone seeing only the image should guess the article's subject. Generic tech imagery (orbs, network nodes, abstract landscapes) is a miss even when it looks good.
  • Brand fit: when hero_images.style is set, the image should sit comfortably next to the site's existing pages.

A couple of regenerations is normal; more than that usually means the draft's title/description are too vague for a distinctive image, which is feedback on the draft, not the script.

Boundaries

  • Runs only against an existing draft in an item folder; choosing topics and writing drafts belong to /content-generation and /content-rework.
  • The image is part of the handoff, never published by the skill. Note it in the item's handoff checklist.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.