SuperAPI AI Directory

woa-cover-image

Design & creation

View repository

Updated 10-16 06:42

About this skill

WOA Cover Image

Generate article cover images with a simplified, deterministic workflow.

Backend

Single provider only:

  • Endpoint: http://localhost:5678/webhook/qwen_image_2512
  • Method: POST
  • Body: {"prompt": string, "width": number, "height": number}
  • Response: PNG binary

Prompt Language

  • Primary prompt language: Chinese.
  • Prompt structure follows Qwen text-to-image guide: subject + scene + style, with optional lens language, atmosphere words, and detail modifiers.

Script

  • SKILL_DIR = directory containing this SKILL.md
  • Run with: npx -y bun ${SKILL_DIR}/scripts/main.ts

Usage

# From article file
npx -y bun ${SKILL_DIR}/scripts/main.ts path/to/article.md

# Direct content
npx -y bun ${SKILL_DIR}/scripts/main.ts --content "AI 时代如何深度思考..."

# 5D options
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --type conceptual --palette cool --rendering digital --text title-subtitle --mood bold

# Style preset (expands to palette + rendering)
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --style blueprint

# Aspect / output
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --aspect 2.35:1 --image output/cover.png

# Quick mode
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --quick

Options

Option Description
--type <name> hero, conceptual, typography, metaphor, scene, minimal
--palette <name> warm, elegant, cool, dark, earth, vivid, pastel, mono, retro
--rendering <name> flat-vector, hand-drawn, painterly, digital, pixel, chalk
--style <name> Style preset alias; see references/style-presets.md
--text <level> none, title-only, title-subtitle, text-rich
--mood <level> subtle, balanced, bold
--aspect <ratio> 16:9 (default), 2.35:1, 4:3, 3:2, 1:1, 3:4
--lang <code> auto (default), zh, en, ja, ...
--no-title Alias of --text none
--quick Compatibility flag (MVP keeps missing dimensions on auto-selection path by default)
--content <text> Direct article content
--image <path> Output image path override

Workflow

  1. Load preferences from EXTEND.md (optional)
  2. Read source content (file path or direct content)
  3. Resolve dimensions with precedence: CLI > style preset expansion > EXTEND > defaults > auto-selection
  4. Generate prompts/cover.md
  5. Map aspect ratio to width/height
  6. Call Qwen API with JSON body
  7. Retry once on failure
  8. Save cover.png

Default output root (when --image is not specified): Resources/Attachments/cover-image/<topic-slug>/

Preferences (EXTEND.md)

Lookup order:

  1. .baoyu-skills/woa-cover-image/EXTEND.md
  2. $HOME/.baoyu-skills/woa-cover-image/EXTEND.md

Supported keys:

  • quick_mode
  • preferred_type
  • preferred_palette
  • preferred_rendering
  • preferred_text
  • preferred_mood
  • default_aspect
  • default_output_dir (independent, same-dir, imgs-subdir)
  • language

References

  • Auto selection: references/auto-selection.md
  • Style presets: references/style-presets.md
  • Prompt structure: references/prompt-template.md

Notes

  • MVP currently uses non-interactive resolution: missing dimensions are auto-selected whether --quick is provided or not.
  • --quick is retained for forward compatibility with a future confirm/interactive mode.
  • Prompt generation is optimized for Chinese instructions and Qwen's complex text rendering strengths.
  • Auto text strategy: technical/opinion content prefers text=none by default; use explicit --text to force title rendering.