Blog cover poster

From digoal/blog · View interactive version

Blog cover poster is an AI agent skill from the GitHub repository digoal/blog. Turn a blog post, article, notes, or any source material into a set of vertical poster images — one cover plus several coherent content slides that explain the core points. Renders HTML/CSS to exact-size PNGs via headless Chrome. Use whenever the user wants cover art, 讲解图/配图, carousel slides, 封面图, p

How to use this skill

Skill file

Blog Cover Poster

Overview

Generate a cover image (1.png) plus N coherent content slides (2.png, 3.png, …) from source material. Each image is an exact 1080×1920 PNG. The pipeline authors one HTML file per page using bundled CSS/templates, then renders them to PNG with headless Chrome — this gives precise control over Chinese/English typography, color semantics, and emphasis.

Workflow

  1. Read the source. Take the file/text the user provides. Extract the title/hook and the core points. Verify facts against the source only — do not invent stats, names, or claims that aren't in the material.
  2. Plan the deck (do this before writing any HTML):
  1. Set up a scratch working dir — author intermediate HTML/CSS here, not in the source directory and not littering the project dir:

```bash

WORK=$(mktemp -d)

cp <SKILL_DIR>/assets/poster.css "$WORK"/

```

Author pages as $WORK/page-1.html (cover), $WORK/page-2.html, … using the templates as a starting point (see Authoring pages). The relative <link href="poster.css"> resolves because the CSS sits beside them.

  1. Render PNGs into the current project directory ($PWD — where the user invoked the skill), never the source file's directory:

```bash

python3 <SKILL_DIR>/scripts/render.py --in "$WORK" --out "$PWD"

```

This writes 1.png, 2.png, … (exact 1080×1920) into $PWD. page-1.html always becomes the cover 1.png. If the user names a different output dir, use that instead — but default to $PWD.

  1. Inspect every PNG with the Read tool. Check the checklist below. Fix the HTML in $WORK and re-render until clean.
  2. Clean up the scratch dir (rm -rf "$WORK"). Only the N.png files remain in the project dir — that is the deliverable. The source directory is never touched.

Authoring pages

Start from the templates and edit — don't write markup from scratch:

Keep the same theme-* class on <body> across all pages.

Content-slide layouts

The content template ships three layout blocks — keep one per page, delete the rest:

Emphasis rules (semantic coloring & sizing)

Emphasis must track meaning and importance, not decoration:

Copywriting for posters

Verification checklist (per image)

Notes

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.