Article covers

From cubxxw/blog · View interactive version

Article covers is an AI agent skill from the GitHub repository cubxxw/blog. Design, generate, and inspect a distinctive cover for a finished blog article. Use when creating or replacing article covers, backfilling missing covers, or changing art direction. Compare genuinely different visual directions before generation, preserve technical safety, and keep the site coherent

How to use this skill

Skill file

Article Covers

A cover is editorial interpretation and a share card. Consistency should come from craft and recognizability, not identical palette, medium, and composition.

Tool

Use scripts/generate-covers.mjs:

npm run covers
node --env-file-if-exists=.env scripts/generate-covers.mjs --write \
  --file <article> --scene "<approved art direction and concrete scene>" --variants 2

The default is dry-run. --scene is strongly preferred. Keys remain in the gitignored .env; never print or copy them.

1. Read the finished article

Use the body, not only title and description. Identify:

If a real artifact tells the story better, use it with permission instead of generating an illustration.

2. Compare three art directions

Before generating, propose three materially different directions:

  1. Documentary/artifact — real interface, notebook, object, screenshot, photo, or scan.
  2. Explanatory/diagrammatic — spatial relationship, process, contrast, or annotated object without embedded text.
  3. Metaphorical/editorial — a concrete scene that carries the central tension.

Each direction should state:

subject / medium / composition / light or color logic / what makes it distinct

Choose one direction before generating variants. Variants are for execution quality, not for pretending one idea is three ideas.

Use approved public visual references when available. Do not load private upstream taste notes without permission.

3. Write the scene

Describe a paintable scene in one to three sentences. Include medium and composition when they matter. Avoid abstract jargon and objects that inevitably render text.

Keep these safety constraints:

Do not include hex codes or palette labels that may be painted literally.

4. Generate and inspect

Generate two or three candidates from the selected direction. Open every image and reject:

Pick the best asset, remove unused variants, and confirm cover.image and alt.

Use one image for the Chinese and English versions of the same article. The script reuses the same section/slug asset.

Technical invariants

The fallback without --scene is for low-risk bulk backfill only. A widely shared article requires an inspected art direction and image.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.