Skip to content
Back to skills

Content Image

ASecurity

Renders post images (1920x1920 PNG) in the author's visual style: a title card (big English heading + emoji or logo, optional subtitle) or a text page (paragraphs with bold spans, inline emoji, the author's handle). Title cards come as 3 variants whose emoji never repeat another post's. Fills an HTML template and screenshots it with headless Chrome — no Figma at run time. Use when the user wants "make an image for the post", "a cover for the post", "a card with text", "picture for the channel...

  • 6 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 17, 2026
ai-agentspythongoshellbash

Works with

  • cli
  • mcp

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned November 17, 2026

npx -y skills add alexeyshishin/as-skill --skill content-image --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Content Image?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Content Image
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alexeyshishin-content-image/badge)](https://www.skillsdirectory.com/skills/alexeyshishin-content-image)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: content-image
description: >
  Renders post images (1920x1920 PNG) in the author's visual style: a title
  card (big English heading + emoji or logo, optional subtitle) or a text page
  (paragraphs with bold spans, inline emoji, the author's handle). Title cards
  come as 3 variants whose emoji never repeat another post's. Fills an HTML
  template and screenshots it with headless Chrome — no Figma at run time. Use when the user wants "make an image for the post", "a cover for the
  post", "a card with text", "picture for the channel", "post image".
---

# content-image — post images from the design system

Goal: turn a heading or a few paragraphs into a finished PNG that looks like the author's Figma posts, without opening Figma.

The design system (colors, fonts, sizes, offsets) lives in `references/tokens.css`, the layouts in `references/templates/`. Both were measured from the author's Figma file; renders match it to within 1-2 px. Roboto Light/Medium is bundled in `references/fonts/` (Apache 2.0, `LICENSE-Roboto`).

The renderer is `scripts/render.py` (Python 3 stdlib + Chrome/Chromium; set `CHROME_BIN` if Chrome is not found). Emoji come from the system emoji font — on macOS that is Apple Color Emoji, the same set as in the Figma file.

## Step 1. Pick the template

| The author wants | Template |
|------------------|----------|
| a cover, a section title, a series/digest card: a short heading, optionally an emoji or a logo | `title` |
| a quote, a thesis, a short text slide: 1-3 short paragraphs | `text` |

If the material fits neither (a diagram, a chart, a photo collage) — say so; this skill only renders the two templates. Don't improvise a new layout inside a render call.

If it's unclear which one — ask: "a cover with a heading or a card with text?"

## Step 2. Get the content

Take the author's wording as is. Don't rewrite it and don't invent text. If the author asks to write the text itself — do that first with `content-tg-post` or ask for the text. The one exception is a title card heading and subtitle, see below.

**title** — heading and subtitle are always in English, whatever language the post is in
- heading: English, lowercase like every frame in the Figma file (`introduction`, `obsidian`, `digest`), one line, short — roughly up to 14 characters at the default size (`introduction` fits). Longer — the renderer refuses; shorten it or ask for a shorter variant
- subtitle (optional): one short English word under the heading (`daily`, `soon`)
- if the author gives a Russian heading or subtitle, translate it into the shortest natural English word yourself (`лонгриды` → `longreads`, `скоро` → `soon`) and name the translation in your report. The renderer rejects any Cyrillic in the heading and subtitle
- mark: one emoji (`--emoji`) or a logo file (`--icon path.png|svg`), not both. By default an emoji, chosen under "Emoji and variants" below

**text** — the body keeps the author's language (Russian as is)
- paragraphs are separated by a blank line, a single newline is a line break
- `**bold**` for emphasis, nothing else is parsed
- emoji go inline; a space before it is not needed (the renderer sets the gap)
- capacity: about 10-12 lines of ~25-30 characters; a line with a 150 px emoji is taller than a plain one, so emoji-heavy text fits fewer lines; longer text is refused — split it into several images
- handle: `--handle @name`; otherwise the image handle from `CONTENT.md` in a content workspace, passed as `--handle`; otherwise the `CONTENT_IMAGE_HANDLE` environment variable; `--handle ""` turns it off. If none is set, ask the author once and suggest putting the variable into their shell profile

## Emoji and variants

Two standing rules for every title card.

**Never repeat an emoji from another post.** In a content workspace, list what is taken before choosing:

```bash
python3 scripts/render.py used <workspace-root> --slug <slug>
```

It prints every emoji found in the other posts' text (`drafts/`, `ready/`, `published/`, `archive/`) and in their `images/<slug>/emoji.txt`. A skin-tone or variation-selector form counts as the same emoji. Pick only from what is not listed. `render.py title --workspace <root> --slug <slug>` refuses a taken emoji too. Without a workspace nothing records earlier posts: say the check could not run, ask the author which emoji are taken, and suggest `content-init`.

**Always render 3 different variants.** Three title cards with the same heading and subtitle, each with its own emoji that fits the heading: three different pictures, not tones or genders of one emoji, none taken by another post. Show all three and let the author pick; don't pick for them. If the author named an emoji, it is variant 1 when it's free — if another post has it, name that post and offer a fresh one instead; variants 2 and 3 are yours.

Nothing to vary — render once and say why:
- a logo (`--icon`) or an author who asked for no emoji
- a text page: the author's wording, emoji included, is never swapped; if an emoji in it is already used in another post, name that post and let the author decide

## Step 3. Render

```bash
python3 scripts/render.py title --heading "digest" --emoji "🧊" --workspace content --slug february-digest -o content/images/february-digest/cover-1.png
python3 scripts/render.py title --heading "obsidian" --subtitle "daily" --icon assets/logo.svg -o out/obsidian-daily.png
python3 scripts/render.py text --file post.txt --handle "@name" -o out/post.png
```

`scripts/` is relative to this skill's directory. Every emoji, in headings and in body text, is rendered at 150×150 px (`--emoji-size` in `references/tokens.css`).

Output path in a content workspace (`references/rules/content-workspace.md`), where `<slug>` is the post's slug:
- title card variants: `images/<slug>/cover-1.png`, `cover-2.png`, `cover-3.png`, straight into the post's folder. When the author picks one, rename it to `images/<slug>/cover.png`, then ask whether to delete the other two — delete only on the author's word
- text pages: `images/<slug>/01.png`, `02.png`… directly
- every emoji on a picked or rendered image goes into `images/<slug>/emoji.txt`, one per line, no duplicates. This file is what keeps later posts from reusing the emoji
- if the post's file exists, add the final path to its `images:` list

Without a workspace: ask where to put it; if the author has no preference, use `post-images/<slug>-1.png`, `-2`, `-3` for variants (the pick becomes `post-images/<slug>.png`) and `post-images/<slug>.png` for a text page, in the current directory. Create the folder, don't overwrite an existing file without saying so.

On failure the script exits non-zero with a one-line reason (`content does not fit the canvas…`, `Chrome/Chromium not found…`). Fix the cause; don't retry with the same input.

## Step 4. Check the result

Open the PNG (Read tool) and look at it before showing it:
- the heading and the subtitle are English and lowercase
- the heading and the emoji sit on one line, centered on the canvas
- nothing is clipped, the text does not touch the handle
- emoji rendered as pictures, not as empty boxes
- the handle is correct
- title cards: all three variants were opened, their emoji differ from each other and none is in the `used` output

Report the file paths and which emoji each variant carries. For variants, ask which one to keep. Otherwise ask whether to adjust the text or make the next image in the series.

## Changing the style

Edit `references/tokens.css` — sizes, colors, offsets live there as variables, the templates only use them. A new layout = a new file in `references/templates/` plus a small builder in `scripts/render.py`. To re-sync with the Figma file, re-read the frames with the Figma MCP and compare the numbers against the tokens; don't guess values.

## What not to do

- don't put Russian, or any Cyrillic, into a title card heading or subtitle; Russian belongs only in the body of a text page
- don't uppercase a heading — the Figma frames are all lowercase
- don't reuse an emoji that another post already carries
- don't render fewer than 3 title card variants unless one of the listed reasons applies
- don't render without looking at the result
- don't shrink font sizes to squeeze more text in — split the text or shorten it
- don't add colors, gradients, shadows or other fonts that are not in the Figma design system
- don't put a handle on a card the author didn't ask a handle for; title cards have none by design
- don't publish or send the images anywhere — the author does that

Files in this skill

  • README.md2.8 KB
  • SKILL.md5.6 KB
  • references/fonts/LICENSE-Roboto11.1 KB
  • references/fonts/fonts.css1.1 KB
  • references/fonts/roboto-cyrillic-300-normal.woff29.4 KB
  • references/fonts/roboto-cyrillic-500-normal.woff29.6 KB
  • references/fonts/roboto-latin-300-normal.woff215.4 KB
  • references/fonts/roboto-latin-500-normal.woff215.5 KB
  • references/templates/text-page.html872 B
  • references/templates/title-card.html880 B
  • references/tokens.css1.2 KB
  • scripts/render.py9.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.