invalidandnull/article-figure-spot-skill
Overview
This skill scans a full article, finds every position that benefits from an illustration, and then either inserts inline image-generation prompt placeholders for the author or generates all figures and saves them to disk. It produces a placement list, prompt files, and an output article with image references so authors can quickly add or accept illustrations.
How this skill works
The skill reads the article from a file path or pasted text, analyzes structure and language, and applies rules to identify places where figures add clarity (concepts, processes, comparisons, timelines, data). It can run in two modes: Prompts-only (inserts inline prompt blocks at each chosen spot) or Generate-all (writes prompt files, calls the built-in Node image script to produce images, and writes an article with image links).
When to use it
- You want to add explanatory visuals to a technical or long-form article.
- You need an audit of where images would improve comprehension or flow.
- You prefer to generate all illustrations in one automated run.
- You want ready-to-run prompt files for your image pipeline.
- You need a clear map of which image goes where in the text.
Best practices
- Choose density: sparse (2–3), medium (4–6), or rich (7+) to control number of figures.
- Review and confirm the suggested placement list before generating images.
- Keep each prompt focused: one subject, clear composition, and aspect ratio (e.g. 16:9).
- Set OPENAI_API_KEY in .env when using generate-all mode.
- Use concise alt text and match prompt language to the article language.
Example use cases
- Convert a long how-to into a version with diagrams for each major step.
- Automatically generate concept diagrams for an academic explainer.
- Add comparison charts and timelines to a product retrospective article.
- Produce all illustrations for a blog post in one batch and get ready-to-paste image files.
- Create prompt files so a designer can review and refine visuals before final insertion.
FAQ
Provide a Markdown file path or paste the full article text in the chat; the skill will read and analyze the content.
How does generate-all work with the image script?
The skill writes prompt files, then runs scripts/generate-image.mjs via Node for each prompt. The environment must include OPENAI_API_KEY; failures retry once and are logged.