article-image-genlisted
Install: claude install-skill Kevinnnnn-ai/astronology.dev
# Article Image Generator
Batch-generate SVG infographics for all `![description]()` placeholders in an article.
Spec: [docs/superpowers/specs/2026-05-30-article-image-gen-design.md](../../../docs/superpowers/specs/2026-05-30-article-image-gen-design.md)
---
## On Invoke
Parse the trigger to extract `<slug>`. If no slug is provided, ask the user which article to target.
Announce:
> "Using article-image-gen to generate images for: `<slug>`."
---
## Phase 1 — Parse
1. Read `src/articles/content/<slug>/article.md`.
2. Scan line-by-line. A **placeholder** is any line matching:
```
![<non-empty alt text>]()
```
Lines with a non-empty src — e.g., `` — are **not** placeholders. Skip them entirely.
3. For each placeholder, record:
| Field | Value |
|---|---|
| `description` | The alt text string between `![` and `]()` |
| `heading` | The nearest `##` or `###` heading above this line (empty string if none) |
| `before` | Up to 3 non-empty paragraphs immediately before the placeholder line |
| `after` | Up to 3 non-empty paragraphs immediately after the placeholder line |
| `output_filename` | Slugify `description`: lowercase → spaces → `-` → strip remaining non-alphanumeric-except-`-`, truncate to 60 chars, append `.svg` |
4. If N = 0, report:
> "No image placeholders found in `<slug>`. Add `![description]()` lines to article.md where you want images."
Then stop.
5. Report: "Found N image placeholder(s) in `<slug>`.