Children's Picture Book Generator: Transforming Story Scenes into ERNIE-Image Illustrations with Agent Skill

Preface

When creating children’s content, a common approach is to hand-draw storyboards, then call an image API to compose pages individually. This workflow is long, and resolution and API key configurations often end up repeated in scripts. The “Children’s Picture Book Generator” on SkillHub wraps Baidu Wenxin ERNIE-Image-Turbo’s text-to-image capability into a standard SKILL.md, accompanied by scripts/generate_image.py, letting Agents follow fixed steps to break down stories, write visual prompts, and save PNGs to disk. Below we introduce what it is, what it does, and how to install and invoke it.

What Is This

The “Children’s Picture Book Generator” is a community-published OpenClaw-type Agent Skill, with coordinates @user_50478668/children-picture. The current store version is 1.0.0, category design-media, subcategory Image Generation, source community. The publisher account is user_50478668 (SkillHub display name livingbody). The SkillHub tag indicates requires_api_key=true, so you need to prepare a Baidu AI Studio API Key yourself before use.

Official entry points:

  • API coordinates page: https://api.skillhub.cn/user_50478668/children-picture
  • Skill details page: https://www.skillhub.cn/skills/user_50478668/children-picture

The Skill’s self-description positions it as: based on Baidu Wenxin’s image model, it generates picture book illustrations via Text-to-Image by extracting the core visuals of a children’s story; underneath, it accesses https://aistudio.baidu.com/llm/lmapi/v3 through an OpenAI-compatible client, with the model name ERNIE-Image-Turbo.

Core Features

All the following capabilities come from SKILL.md and scripts/generate_image.py inside the Skill package and can be verified against the Zip package.

Text-to-Image and Picture Book Workflow

The designed data flow is: input a children’s story or theme → Agent generates multiple key visual prompts → call generate_image.py to produce images. A single call generates one image; batch generation is marked as currently unsupported in the documentation.

Resolution

Supports 7 preset sizes (--resolution choices): 1024x1024 (default), 1376x768, 1264x848, 1200x896, 896x1200, 848x1264, 768x1376, covering square, landscape, and portrait scenarios.

API Key and Client

Key resolution order: the --api-key parameter takes priority; otherwise, the environment variables ERNIE-Image_API_KEY, ERNIE_Image_API_KEY, BAIDU_API_KEY are read in sequence. If none is provided, it reports Error: No API key provided. and exits.

Prompt and Chinese Text

The Skill passes prompts through mostly unchanged; the documentation states that Chinese text, font style, and position in the image can be specified in the description, relying on the model’s Chinese rendering capability.

Community-Side Data (SkillHub, as of page scrape)

  • Downloads: 937, favorites: 2, SkillHub-counted installs: 0 (subject to store statistics).
  • Security scan: Keen reports “Safe, no risks”; another scan flags it as “Suspicious, potential risks.” Before installing, it is recommended to check the security report link on the SkillHub details page yourself.
  • The details page’s overviewMd is empty; the full description is in SKILL.md inside the Zip package.

Installation and Activation

First, check or install the skillhub CLI according to the official installation instructions at https://skillhub.cn/install/skillhub.md. When installing the skill, you must point --dir to the current Agent’s skills directory; otherwise, it defaults to ./skills/ and may not be recognized.

command -v skillhub && skillhub --version

skillhub install user_50478668/children-picture --dir ~/.cursor/skills/

Skills paths for common Agents (excerpted from the same installation doc):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, restart or refresh the Agent as required by your client so the Skill is loaded.

Method 2: Have an AI Install via Prompt

The installation prompt provided on the SkillHub page is: according to https://skillhub.cn/install/skillhub.md, install @user_50478668/children-picture.

Method 3: Zip Package

The details page offers a Zip download (version 1.0.0), with an address of the form:

https://api.skillhub.cn/api/v1/download?slug=@user_50478668/children-picture

After extraction, the directory contains SKILL.md and scripts/generate_image.py; you need to manually place them into the corresponding Agent’s skills directory and satisfy its loading rules.

Runtime Dependencies

The script declares Python 3.7+ and depends on the openai package (see the inline metadata at the top of the script). Execute Python commands from the Skill root directory or the correct working path.

Configure API Key

In production, a more secure approach is to set a user-level environment variable to avoid long-term exposure of the Key on the command line:

export ERNIE-Image_API_KEY="your Baidu AI Studio Key"

The Key needs the image generation capability related to ERNIE-Image enabled in Baidu AI Studio; the Skill lists AI Studio and model introduction links at the end of its documentation for you to review the application process as needed.

Typical Usage

1. Agent Side (Picture Book Scenario)

When the Skill is enabled and the API Key is available, you can provide the Agent with the full text of a children’s story or a theme, and have it:

  1. Break down several key shots, writing an image prompt for each page (you can refer to the English structured template in the Skill: subject, style, composition, lighting, background, color, Avoid fields, etc.).
  2. Call the script for each prompt, specifying the output filename and resolution (portrait pages can use 896x1200 or 768x1376).

2. Command-Line Single Image (Skill Official Example)

Execute in the skill package directory to verify the pipeline or produce a single illustration:

python scripts/generate_image.py \
  --prompt "A serene Japanese garden with cherry blossoms" \
  --filename "japanese-garden.png" \
  --resolution 1024x1024

Portrait wallpaper example (includes a temporary Key parameter; be cautious on shared machines):

python scripts/generate_image.py \
  --prompt "A mystical dark fantasy meadow with a glowing-eyed kitten..." \
  --filename "wallpaper.png" \
  --resolution 768x1376 \
  --api-key "your-api-key-here"

Before calling, you can run a pre-check as suggested by the Skill:

test -n "$ERNIE-Image_API_KEY" || echo "API Key not set"

On success, the script decodes the base64 into a PNG and writes it to the path specified by --filename; parent directories that don’t exist are created automatically; files with the same name will be overwritten without confirmation.

Use Cases and Considerations

Who it’s for: Developers or content creators who need to quickly generate illustrations for children’s stories, parent-child content, or educational scenarios within Agent workflows, and who already have Baidu AI Studio image API quota and Keys.

Limitations and pitfalls:

  • An API Key must be configured; when quota is exhausted, authentication fails, or a prompt triggers content policies, you need to adjust the Key or rewrite the description according to the Skill’s troubleshooting table.
  • The current version does not support batch image generation within the script; multi-page picture books require multiple calls or looping by the Agent.
  • --api-key will appear in the process list; use it only for temporary debugging.
  • SkillHub’s security scan results are not fully consistent, the source is community, and the author is unverified (isAuthorVerified: false); in production, review SKILL.md and the script yourself before enabling.
  • The store metadata version is 1.0.0; if the version table in the package documentation differs from the store, the SkillHub-published Zip 1.0.0 is authoritative.

Conclusion

The “Children’s Picture Book Generator” wraps ERNIE-Image text-to-image into an Agent-executable Skill: a fixed script entry point, seven resolutions, and clear Key conventions, making it easy to break stories into visuals and save them to disk. If you want to try it in a client like Cursor, install it from SkillHub or download the Zip, configure ERNIE-Image_API_KEY, and invoke it according to the SKILL.md examples.

Official address: https://api.skillhub.cn/user_50478668/children-picture

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye