360 Secure SkillHub
360 安全技能中心

Generate Image

读取文章 Markdown 草稿,推断主题与视觉角色,通过共享运行时调用远程 OpenAI 兼容图像接口生成配图,失败时回退本地信息卡片渲染,并把 PNG 导出到流水线输出路径。图像提供商、接口地址与模型可由文章 frontmatter 覆盖。

abigale-cyber
abigale-cyber
热度 49.55
最近更新 2026-05-18 11:39:39
分类:创作依赖:代码执行 / 读写文件 / 第三方 API应用场景:图像生成 / 博客写作 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add content-system-generate-image
Metadata
name
generate-image
description
Generate article companion images for the content factory pipeline. Use when Codex needs article images, infographic cards, inline visuals, or a PNG exported from an article markdown draft before preview or publishing.

Generate Image

Generate the image asset for an article draft as an independent executor. On ClawHub, this skill is published as content-system-generate-image.

Quick Start

Run the default command:

.venv/bin/python -m skill_runtime.cli run-skill generate-image --input content-production/drafts/ai-content-system-article.md

Prepare Source Article

Start from an article markdown draft that already has a stable title, structure, and core message. Use the article content to infer the primary visual theme and the most useful image role, such as header art, infographic card, or inline supporting visual.

The default remote image backend is:

provider: openai
api base: https://new.suxi.ai/v1
model: nano-nx

This is meant for the 香蕉画图 endpoint, which is treated as an OpenAI-compatible image API.

Follow Generation Workflow

  1. Read the article draft and extract the topic, tone, and the strongest visualizable idea.
  2. Generate the preferred image through the shared runtime in skills/generate-image/runtime.py.
  3. Fall back to the local infographic renderer when external generation fails or is unavailable.
  4. Write the exported PNG to the pipeline output path. If wechat-studio is involved, let the workbench decide whether and how to ingest the result.

Per-article overrides are supported through Markdown frontmatter fields:

  • image_provider
  • image_api_base
  • image_model

Write Output

Write the primary exported file to:

content-production/ready/<slug>-img-1.png

Respect Constraints

  • External image generation may fail because of network or API issues
  • The skill injects its own provider, base URL, and default model at runtime instead of changing the global md2wechat config
  • Users with an existing 香蕉制作平台 can use it directly
  • Users without one can open job.suxi.ai, generate an SK, place it into the token field, and log in
  • When fallback is used, the PNG is still valid but is a local placeholder-style information card
  • Treat content-production/ready/*.png as the executor's exported artifact; any workbench copy should be managed by wechat-studio, not by this skill

Read Related Files

  • Shared runtime: skills/generate-image/runtime.py
  • Pipeline entry: skill_runtime/engine.py
  • Visual workbench: skills/wechat-studio/frontend/server.py
  • Execution guide: docs/generate-image-execution-spec.md