baoyu-article-illustrator
Contentjimliu/baoyu-skillsskills.sh ↗
Installs
30,545
deduplicated, at the last sync
Since we started
+0.4%
40 readings, about 2 hours apart. Not a live curve.
Our category
Content
ours
Last read
Sep 3, 2026
from the directory
Our brief
oursAnalyzes article content to identify where illustrations would add value, then generates raster images using a Type × Style × Palette framework. It supports multiple illustration types (infographic, flowchart, comparison, etc.) and visual styles (hand-drawn, vector, blueprint, etc.), with configurable density and batch generation. The skill works with various image generation backends available in the runtime (Codex native, codex CLI, Cursor, or baoyu-image-gen) and requires user confirmation before generating.
- illustration outline (outline.md)
- prompt files (prompts/NN-{type}-{slug}.md)
- generated images (PNG files)
- reference image copies (references/)
- article file path or pasted content
- optional reference images
- runtime with image generation backend
- EXTEND.md preferences file
not detected
The skill itself does not require paid services; it routes to whatever image generation backend is available in the runtime (Codex native, codex CLI, Cursor, or baoyu-image-gen). A reference file mentions codex CLI may need a subscription, but this is a backend detail, not a skill requirement.
not detected
The skill does not require registration; it uses the current runtime's native image tools or installed skills. One backend path (codex CLI) requires an active login, but this is not a skill-level requirement.
Cannot generate images if no raster image backend is available in the runtime. Does not produce SVG, HTML, canvas, or code-based vector output. Cannot repair text inside already-generated bitmaps; only regeneration or user selection of imperfect candidates is supported.
Evidencestatic findingsskills/baoyu-article-illustrator/references/codex-imagegen.md:1-47skills/baoyu-article-illustrator/references/prompt-construction.md:1-74skills/baoyu-article-illustrator/references/style-presets.md:1-34+4
[{"code":"env_var","match":"OPENAI_API_KEY","path":"references/codex-imagegen.md"},{"code":"payment","match":"subscription","path":"references/codex-imagegen.md"}]# `codex-imagegen` Wrapper Invocation
Load this reference only when the [Image Generation Tools](../SKILL.md#image-generation-tools) rule has resolved to `codex-imagegen` — i.e., the current runtime exposes no native `imagegen` skill but `codex` CLI is on `PATH` with an active `codex login`.
## Preferred path: route through `baoyu-image-gen`
If the `baoyu-image-gen` skill is available in this runtime, **always** invoke through it rather than calling the wrapper directly. It handles retry/cache/batch/EXTEND.md preferences uniformly with every other provider.
```bash
${BUN_X} <baoyu-image-gen-base>/scripts/main.ts \
--provider codex-cli \
--image <ABSOLUTE_output> \
--promptfiles <ABSOLUTE_prompts/NN-{type}-{slug}.md> \
--ar <ratio> \
[--ref <ABSOLUTE_file>]...
```
Resolve `<baoyu-image-gen-base>` the same way you resolve any sibling skill — through your runtime's skill registry (`Skill` tool, plugin marketplace, or `$HOME/.baoyu-skills/baoyu-image-gen/`).
## Fallback: spawn the wrapper directly
Only when `baoyu-image-gen` is NOT installed in the current runtime. Discover the wrapper's location at runtime — do NOT hard-code `../../packages/...` from this skill:
1. *# Prompt Construction
## Prompt File Format
Each prompt file uses YAML frontmatter + content:
```yaml
---
illustration_id: 01
type: infographic
style: blueprint
references: # ⚠️ ONLY if files EXIST in references/ directory
- ref_id: 01
filename: 01-ref-diagram.png
usage: direct # direct | style | palette
---
[Type-specific template content below...]
```
**⚠️ CRITICAL - When to include `references` field**:
| Situation | Action |
|-----------|--------|
| Reference file saved to `references/` | Include in frontmatter ✓ |
| Style extracted verbally (no file) | DO NOT include in frontmatter, append to prompt body instead |
| File path in frontmatter but file doesn't exist | ERROR - remove references field |
**Reference Usage Types** (only when file exists):
| Usage | Description | Generation Action |
|-------|-------------|-------------------|
| `direct` | Primary visual reference | Pass to `--ref` parameter |
| `style` | Style characteristics only | Describe style in prompt text |
| `palette` | Color palette extraction | Include colors in prompt |
**If no reference file but style/palette extracted verbally**, append directly to prompt# Style Presets `--preset X` expands to a type + style + optional palette combination. Users can override any dimension. ## Default Preset When content analysis surfaces no strong signal (generic knowledge article, mixed-topic post, no clear data/comparison/narrative cue), recommend **`hand-drawn-edu`** as the primary option in Step 3 Q1. It is the warm, friendly educational-infographic default — safe for most articles and universally readable. ## By Category ### Technical & Engineering | --preset | Type | Style | Palette | Best For | |----------|------|-------|---------|----------| | `tech-explainer` | `infographic` | `blueprint` | — | API docs, system metrics, technical deep-dives | | `system-design` | `framework` | `blueprint` | — | Architecture diagrams, system design | | `architecture` | `framework` | `vector-illustration` | — | Component relationships, module structure | | `science-paper` | `infographic` | `scientific` | — | Research findings, lab results, academic | ### Knowledge & Education | --preset | Type | Style | Palette | Best For | |----------|------|-------|---------|----------| | `knowledge-base` | `infographic` | `vector-illustration` | — | Concept explain
# Style Reference ## Core Styles Simplified style tier for quick selection: | Core Style | Maps To | Best For | |------------|---------|----------| | `hand-drawn` | sketch-notes | **Default.** Warm cream paper, black hand-drawn lines, pastel blocks — educational infographics, concept explainers, onboarding, general knowledge articles | | `vector` | vector-illustration | Knowledge articles, tutorials, tech content | | `minimal-flat` | notion | General, knowledge sharing, SaaS | | `sci-fi` | blueprint | AI, frontier tech, system design | | `editorial` | editorial | Processes, data, journalism | | `scene` | warm/watercolor | Narratives, emotional, lifestyle | | `poster` | screen-print | Opinion, editorial, cultural, cinematic | Use Core Styles for most cases. **When no strong content signal is detected, default to `hand-drawn` (→ sketch-notes).** See full Style Gallery below for granular control. --- ## Style Gallery | Style | Description | Best For | |-------|-------------|----------| | `vector-illustration` | Clean flat vector art with bold shapes | Knowledge articles, tutorials, tech content | | `notion` | Minimalist hand-drawn line art | Knowledge sharing, SaaS, productivit
# Usage ## Command Syntax ```bash # Auto-select type and style based on content /baoyu-article-illustrator path/to/article.md # Specify type /baoyu-article-illustrator path/to/article.md --type infographic # Specify style /baoyu-article-illustrator path/to/article.md --style blueprint # Combine type and style /baoyu-article-illustrator path/to/article.md --type flowchart --style notion # Specify density /baoyu-article-illustrator path/to/article.md --density rich # Generate up to 4 images in parallel after prompts are saved /baoyu-article-illustrator path/to/article.md --batch-size 4 # Direct content input (paste mode) /baoyu-article-illustrator [paste content] ``` ## Options | Option | Description | |--------|-------------| | `--type <name>` | Illustration type (see Type Gallery in SKILL.md) | | `--style <name>` | Visual style (see references/styles.md) | | `--preset <name>` | Shorthand for type + style combo (see [references/style-presets.md](references/style-presets.md)) | | `--density <level>` | Image count: minimal / balanced / rich | | `--batch-size <n>` | Temporary generation batch size for this run. Default: `generation_batch_size` from EXTEND.md, otherwise 4. Cla
# Detailed Workflow Procedures
## Step 1: Pre-check
### 1.0 Detect & Save Reference Images ⚠️ REQUIRED if images provided
Check if user provided reference images. Handle based on input type:
| Input Type | Action |
|------------|--------|
| Image file path provided | Copy to `references/` subdirectory → can use `--ref` |
| Image in conversation (no path) | **ASK user for file path** with AskUserQuestion |
| User can't provide path | Extract style/palette verbally → append to prompts (NO frontmatter references) |
**CRITICAL**: Only add `references` to prompt frontmatter if files are ACTUALLY SAVED to `references/` directory.
**If user provides file path**:
1. Copy to `references/NN-ref-{slug}.png`
2. Create description: `references/NN-ref-{slug}.md`
3. Verify files exist before proceeding
**If user can't provide path** (extracted verbally):
1. Analyze image visually, extract: colors, style, composition
2. Create `references/extracted-style.md` with extracted info
3. DO NOT add `references` to prompt frontmatter
4. Instead, append extracted style/colors directly to prompt text
**Description File Format** (only when file saved):
```yaml
---
ref_id: NN
filename: NN-ref-{slug}.p---
name: baoyu-article-illustrator
description: Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style × Palette three-dimension approach. Use when user asks to "illustrate article", "add images", "generate images for article", or "为文章配图".
version: 1.117.4
metadata:
openclaw:
homepage: https://github.com/JimLiu/baoyu-skills#baoyu-article-illustrator
---
# Article Illustrator
Analyze articles, identify illustration positions, generate images with Type × Style × Palette consistency.
## User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
1. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.
2. **Fallback**: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
3. **Batching**: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.
Concrete `AskUserQuestion` referRead 8 of 8 text files in the skill.
Installfrom the directory
npx skills add https://github.com/jimliu/baoyu-skillsInstalling happens there, not here. We are an index with an opinion, not a mirror.
What is inside itfrom the directory
37 files — names only. The directory does not report sizes.
What the auditors foundfrom the directory
A skill is instructions your agent will follow and scripts it may run, so who checked it matters as much as how many people installed it.
Installs, reading by readingours
Axis starts at 30.4k, not zero — the range is 30.4k to 30.5k.