Article Cover Generator logo

Article Cover Generator

Community
wwwzhouhui
article-cover-generator

为文章生成 AI 封面图。用户提供文章标题和内容(或文章文件路径),通过第三方中转站(image.mlgb7.com)的 gpt-image-2.5 文生图 API 生成文章封面并下载到本地,支持 16:9、9:16、3:4、4:3、1:1 比例。当用户要求"生成文章封面/封面图/题图/头图/公众号封面/配图"、说"帮我把这篇文章做个封面"、给出文章让配图时使用本技能。

Overview

Publisherwwwzhouhui
Repositoryskills_collection
Skill namearticle-cover-generator
Stars
288
Forks
59
Bundled files
2
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wwwzhouhui on GitHub. Read the source before you install it.

Installation

Install the Article Cover Generator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wwwzhouhui/skills_collection/tree/main/article-cover-generator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wwwzhouhui/skills_collection.git /tmp/skills_collection
mkdir -p .claude/skills
cp -r /tmp/skills_collection/article-cover-generator .claude/skills/article-cover-generator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Article Cover Generator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Article Cover Generator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Article Cover Generator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

文章封面生成器

把一篇文章的标题+内容,变成一张指定比例的 AI 封面图(文生图模型 gpt-image-2.5,经第三方中转站调用)。

工作流程

第 1 步:确认输入

需要两样东西,缺了先向用户要:

  1. 文章标题(必需)— 用户直接给出,或从文章文件第一行/文件名提取。
  2. 文章内容(可选但强烈建议)— 用于提炼画面元素。可以是文件路径(读文件)或内联文字。只有标题也能生成,但画面元素会偏泛。
  3. 比例 — 用户没指定就默认 4:3,并在结果里说明用了什么比例、支持哪些(16:9、9:16、3:4、4:3、1:1),方便用户换比例重跑。

第 2 步:从文章提炼画面元素

通读文章,回答三个问题(不需要写给用户看,直接进入提示词):

  • 文章核心主题是什么?(如:AI 语音克隆、低代码部署、开源工具实测)
  • 文章里有哪些具体视觉符号?(如:麦克风、声波、AI 机器人、代码编辑器窗口、GitHub 卡片、云部署图标、聊天气泡)挑 2~4 个最核心的,不要堆砌。
  • 有没有流程感/对比感?(如"提示词→生成→上线"的三段式)有就体现为画面中的元素流转。

第 3 步:写图片提示词

用中文写,按下述模板组装(这是已验证出好图的结构,字段顺序保持不变):

text
现代科技感扁平插画风格的技术文章封面,浅蓝到淡紫渐变背景,明亮干净。画面中央是<核心视觉符号1>和<核心视觉符号2>,<两者之间发生的动作/关联>;周围漂浮<文章相关的UI卡片,如代码编辑器窗口、部署状态卡片>。顶部横幅区域写大标题《<文章标题>》,下方小字副标题"<从标题拆出的短副标题,10字内,可省略>"。科技蓝为主色,橙色点缀,<横版/竖版> <比例> 构图,细节丰富,高清

写作规则:

  • 标题必须原文照抄进提示词,用《》括起来——模型渲染中文大标题的准确率很高(已实测),这是封面的核心信息。
  • 副标题只在主标题偏短时加,10 字以内;小字(代码注释、卡片细节)必然糊,不要要求生成成段文字。
  • 视觉符号要具体("发光的麦克风、向外扩散的声波光带"),不要抽象("科技的感觉")。
  • 末尾的构图方向词和比例要写(如"横版 16:9 构图"),与请求参数双保险。
  • 用户的原始描述里如果给了风格要求(如"极简海报风"),覆盖模板默认风格。

第 4 步:调用脚本生成

脚本一次性完成:创建任务 → 轮询 → 下载到本地 → 校验尺寸。不要自己手搓 curl 分步调用。

bash
node "<本技能目录>/scripts/gen_cover.mjs" --prompt-file <提示词临时文件> --ratio 16:9 --out <输出路径.png>
  • --prompt-file(推荐,中文长提示词经命令行传参在 Windows 下有编码风险,先 Write 成 UTF-8 临时文件);也支持 --prompt "..."。
  • --ratio:16:9 / 9:16 / 3:4 / 4:3 / 1:1;或用 --size 1536x864 直接指定像素。
  • --out:完整输出路径。默认存当前工作目录,命名建议 封面_<比例>_<标题slug>.png;用户给了文章文件路径时,默认存到文章同目录。
  • 无 Node 环境时的兜底:按 scripts/gen_cover.mjs 顶部的注释用 curl 手动走 创建→轮询→下载 三步。
  • 首次使用配置:API key 等配置只存放在技能根目录 .env(即本 SKILL.md 所在目录下的 .env;API_KEY 必填,API_BASE/MODEL 可选),脚本内无硬编码密钥。脚本报"缺少配置文件 / 缺少 API_KEY"时,向用户询问 apikey(说明 key 只会写入本地 .env,不会出现在代码里),按报错信息里的格式指引创建 .env 后重跑;不要把 key 写进脚本、提示词或任何其他文件。

成功时脚本输出最后一行 JSON:{"ok":true,"path":"...","width":1672,"height":940,"task_id":"api_gen_..."}。

第 5 步:交付

  1. 用 Read 打开生成的 PNG 给用户预览。
  2. 报告:本地文件路径、实际尺寸、比例。提醒:生成的 URL 链接会过期,本地文件是唯一持久副本,不要只留链接。
  3. 用户不满意时,先问清不满意的是构图/文字/配色哪一项,改提示词对应部分再重跑(每次重跑都是一次新的计费生成,不要擅自连环重试)。

失败处理

  • 脚本退出码非 0 时会打印服务端 error_code / public_error:
    • 内容审核类失败(prompt 被拒)→ 调整提示词里敏感表述,先向用户说明再重新生成。
    • 网络超时/任务查询超时 → 报错里带 task_id,可让用户稍后手动查询;不要自动重复创建任务(会重复计费)。
    • 401/403 → API key 失效,让用户更新技能根目录 .env 里的 API_KEY,不改脚本。

成本与行为边界

  • 每次生成出图 1 张,走用户自己的中转站账户计费;一篇文章一个比例一张图,不主动生成多张备选。
  • 生成耗时约 40~90 秒,脚本内轮询上限 5 分钟。
  • 模型实际出图像素与请求 size 不完全一致,但比例精确匹配(如请求 1536x864 出 1672x940),以脚本报告的实际尺寸为准。

技术备忘(脚本已封装,仅供排查)

  • 创建:POST https://image.mlgb7.com/v1/images/generations,body {"model":"gpt-image-2.5","prompt":"...","n":1,"async":true,"response_format":"url","size":"1536x864"},返回 202 + task_id。
  • 轮询:GET https://image.mlgb7.com/api/image-tasks?ids=<task_id>,items[0].status:queued → running → success/failed,terminal:true 即结束,图 URL 在 items[0].results[0].url(带签名有效期,需及时下载)。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Article Cover Generator AI skill do?

为文章生成 AI 封面图。用户提供文章标题和内容(或文章文件路径),通过第三方中转站(image.mlgb7.com)的 gpt-image-2.5 文生图 API 生成文章封面并下载到本地,支持 16:9、9:16、3:4、4:3、1:1 比例。当用户要求"生成文章封面/封面图/题图/头图/公众号封面/配图"、说"帮我把这篇文章做个封面"、给出文章让配图时使用本技能。

Why use Article Cover Generator on TypingMind?

Because you install it once and use it with any model. Article Cover Generator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Article Cover Generator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wwwzhouhui/skills_collection/tree/main/article-cover-generator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Article Cover Generator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Article Cover Generator?

As many as you like. As long as a model supports skills, you can use Article Cover Generator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Article Cover Generator AI skill free?

It is published on GitHub by wwwzhouhui. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇