Wechat illustrator

From cnproduct/workbuddy-wechat-publisher · View interactive version

Wechat illustrator is an AI agent skill from the GitHub repository cnproduct/workbuddy-wechat-publisher. 分析文章内容,为公众号文章生成或匹配配图。将 `[配图: 描述]` 占位符转换为实际图片URL。

How to use this skill

Skill file

wechat-illustrator - 公众号配图生成技能

概述

分析文章内容,为公众号文章生成或匹配配图。将 [配图: 描述] 占位符转换为实际图片URL。

触发词

配图, 生成图片, 公众号图片, 文章配图, AI配图

功能说明

核心能力

  1. 占位符识别:解析 Markdown 文章中的所有 [配图: 描述] 标记
  2. Prompt生成:为每个占位符生成详细的图片生成提示词
  3. 图片生成:调用生图API生成图片(支持 DALL-E 3、Midjourney、国内模型等)
  4. 图库匹配(备选):从 Unsplash、Pexels 等免费图库搜索匹配图片

输入要求

输出格式

{
  "images": [
    {
      "index": 1,
      "placeholder": "[配图: 科技感的办公室,程序员使用AI工具工作]",
      "prompt": "Modern tech office, programmer working with AI tools, clean minimalist style, warm lighting, 16:9 aspect ratio, no text",
      "url": "https://generated-image-url.com/xxx.jpg",
      "source": "dalle3"
    },
    {
      "index": 2,
      "placeholder": "[配图: 工具对比表格图]",
      "prompt": "Comparison chart, software tools icons, clean data visualization, blue and white color scheme, 16:9",
      "url": "https://generated-image-url.com/yyy.jpg",
      "source": "dalle3"
    }
  ],
  "total": 2
}

Prompt 生成要求

风格定义

根据文章基调确定图片风格:

技术要求

Prompt 模板

[风格描述], [主体内容], [场景细节], [光线色彩], [技术参数]

示例:

Modern minimalist style, young professional working on laptop in bright co-working space, natural window light, blue and white color palette, 16:9 aspect ratio, high quality, no text, no watermark

图片生成策略

优先级

  1. 首选:调用生图API生成
  1. 备选:免费图库搜索

生成参数

保存输出

生成的图片保存到:

output/
├── images/
│   ├── image_001.jpg
│   └── image_002.jpg
└── image_manifest.json   # 图片索引文件

使用示例

输入文章片段:

## 为什么程序员需要AI助手?

当你还在为某个Bug抓耳挠腮时,AI已经能在几秒内给出解决方案...

[配图: 程序员面对屏幕,露出惊喜表情]

处理结果:

{
  "index": 1,
  "placeholder": "[配图: 程序员面对屏幕,露出惊喜表情]",
  "prompt": "Programmer sitting in front of computer screen with amazed and delighted expression, looking at AI-generated code suggestion, modern tech office, warm lighting, blue ambient light, 16:9, high quality, no text",
  "url": "https://example.com/images/programmer_ai.jpg",
  "source": "dalle3"
}

错误处理

  1. 生图失败:自动切换到图库搜索
  2. API限流:排队重试,3次后使用备选方案
  3. 图片不匹配:生成多版供选择
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.