Linyuebanzi Image Gen logo

Linyuebanzi Image Gen

Community
lqshow
linyuebanzi-image-gen

通用图像生成执行层,支持 MuleRun Nano Banana 2、APImart GPT Image 2 和 Atlas Cloud GPT Image 2 三种生图 API。通过 --provider 切换。支持 generation(纯文本生图)和 edit(带参考图修图)两种模式,单张和批量执行。这是被其他 skill 调用的基础设施 skill,不直接面向终端用户。当其他 skill(如 cover-hero、inline-diagram)需要调 API 生图时,调用本 skill 的 scripts/generate.py。不要用于:提示词撰写、风格注入、业务校验——这些由调用方 skill 负责。

Overview

Publisherlqshow
Repositorylinyuebanzi-skills
Skill namelinyuebanzi-image-gen
Stars
77
Forks
12
Bundled files
6
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.

  • 6 bundled files

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

  • Open source

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

Installation

Install the Linyuebanzi Image Gen 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/lqshow/linyuebanzi-skills/tree/main/skills/linyuebanzi-image-gen
  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/lqshow/linyuebanzi-skills.git /tmp/linyuebanzi-skills
mkdir -p .claude/skills
cp -r /tmp/linyuebanzi-skills/skills/linyuebanzi-image-gen .claude/skills/linyuebanzi-image-gen
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Linyuebanzi Image Gen 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 Linyuebanzi Image Gen 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 Linyuebanzi Image Gen 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.

林月半子通用图像生成器

支持三种生图 API 的执行层,通过 --provider 参数切换。调用方 skill 负责 prompt 撰写、样式注入、业务校验;本 skill 只管"接收 prompt → 调 API → 返回结果"。

什么时候触发这个 skill

本 skill 是被其他 skill 调用的基础设施,不直接由用户触发。当 Claude 正在执行某个生图相关的 skill(如 linyuebanzi-cover-hero、linyuebanzi-inline-diagram)时,通过 bash 调用本 skill 的脚本。

生图 API 切换

通过 --provider 参数或环境变量自动检测选择生图平台:

bash
# 方式 1: 自动检测 —— 只设一个环境变量就行
export APIMART_API_KEY=sk-xxx
python linyuebanzi-image-gen/scripts/generate.py \
  --mode generation --prompt "..." --output-dir ./out
# 自动检测到 APIMART_API_KEY,使用 apimart

# 方式 2: 显式指定 —— 两个都设了时用这个覆盖
python linyuebanzi-image-gen/scripts/generate.py \
  --provider apimart --mode generation --prompt "..." --output-dir ./out
Provider--provider环境变量模型
MuleRunmulerun(默认)MULERUN_API_KEYNano Banana 2
APImartapimartAPIMART_API_KEYGPT Image 2
Atlas CloudatlascloudATLASCLOUD_API_KEYGPT Image 2

自动检测逻辑(不传 --provider 时):

  1. 只设了 APIMART_API_KEY → 自动用 apimart
  2. 只设了 ATLASCLOUD_API_KEY → 自动用 atlascloud
  3. 只设了 MULERUN_API_KEY → 用 mulerun
  4. 多个都设了 → 默认 mulerun(向后兼容),想用其他需显式传 --provider apimart 或 --provider atlascloud

两种模式

generation — 纯文本生图

从纯文字 prompt 生成图片,不依赖参考图。适合:概念图、流程图、信息图等。

bash
# 单张
python linyuebanzi-image-gen/scripts/generate.py \
  --mode generation \
  --prompt "A notebook-style diagram showing..." \
  --name-tag diagram-001 \
  --output-dir ./out

# 单张(从文件读 prompt)
python linyuebanzi-image-gen/scripts/generate.py \
  --mode generation \
  --prompt-file ./prompt.txt \
  --name-tag diagram-001 \
  --output-dir ./out

edit — 带参考图修图

在参考图基础上生成新图,适合需要人物一致性的场景。

bash
# 单张
python linyuebanzi-image-gen/scripts/generate.py \
  --mode edit \
  --prompt "A portrait of..." \
  --images "https://r2.cloudnative101.net/portrait.png" \
  --name-tag cover-hero \
  --output-dir ./out

批量模式

通过 manifest JSON 批量提交,支持串行和并行。

bash
# 串行
python linyuebanzi-image-gen/scripts/generate.py \
  --manifest ./batch.json \
  --output-dir ./out

# 并行
python linyuebanzi-image-gen/scripts/generate.py \
  --manifest ./batch.json \
  --output-dir ./out \
  --parallel

Manifest JSON 格式

json
{
  "mode": "generation",
  "aspect_ratio": "16:9",
  "resolution": "2K",
  "items": [
    {
      "id": "diagram-001",
      "prompt": "完整提示词(调用方已注入风格前缀)"
    },
    {
      "id": "cover-001",
      "prompt": "完整提示词",
      "images": ["https://example.com/ref.png"]
    }
  ]
}
  • mode: generation 或 edit(默认 generation)
  • aspect_ratio / resolution: 全局默认,可省略
  • items[].id: 必填,用于输出文件命名
  • items[].prompt: 必填,完整提示词(调用方已完成所有拼接)
  • items[].images: 可选,edit 模式需要传参考图 URL

CLI 参数

参数单张批量必填说明
--providerYY否mulerun(默认) / apimart / atlascloud
--modeYN(在 manifest)单张必填generation 或 edit
--promptY(或 --prompt-file)N否内联提示词
--prompt-fileY(或 --prompt)N否提示词文件路径
--manifestNY否manifest JSON 路径
--imagesY(edit 模式)N(在 items)edit 模式必填逗号分隔的参考图 URL
--name-tagYN否输出文件名前缀(默认 image)
--output-dirYY否输出目录(默认 ./output)
--aspect-ratioYY(可被 manifest 覆盖)否默认 16:9
--resolutionYY(可被 manifest 覆盖)否默认 2K
--parallelNY否启用并行执行
--blocklistYY否禁用词表文件路径(每行一个词,命中即停止)

输出结构

单张:

{output-dir}/
├── {name-tag}-{timestamp}.png   # 生成图片
├── {name-tag}-{timestamp}.txt   # 使用的 prompt
└── {name-tag}-{timestamp}.json  # 元数据

批量:

{output-dir}/
├── {id}.png            # 每项图片
├── {id}.txt            # 每项 prompt
├── {id}.json           # 每项元数据
└── _run_metadata.json  # 整体运行信息

环境变量

根据 --provider 设置对应的 API Key:

  • MULERUN_API_KEY: --provider mulerun 时必填,MuleRun API 的 Bearer token
  • APIMART_API_KEY: --provider apimart 时必填,APImart API 的 Bearer token
  • ATLASCLOUD_API_KEY: --provider atlascloud 时必填,Atlas Cloud API 的 Bearer token

调用方 skill 集成指南

新 skill 如何使用

  1. 在你的 SKILL.md 中定义 prompt 生成工作流
  2. 生成 prompt 后,通过 bash 调用本 skill:
bash
# 单张(默认 mulerun)
python /path/to/linyuebanzi-image-gen/scripts/generate.py \
  --mode generation \
  --prompt-file ./my-prompt.txt \
  --name-tag my-image \
  --output-dir ./my-output

# 单张(指定 apimart)
python /path/to/linyuebanzi-image-gen/scripts/generate.py \
  --provider apimart \
  --mode generation \
  --prompt-file ./my-prompt.txt \
  --name-tag my-image \
  --output-dir ./my-output

# 单张(指定 atlascloud)
python /path/to/linyuebanzi-image-gen/scripts/generate.py \
  --provider atlascloud \
  --mode generation \
  --prompt-file ./my-prompt.txt \
  --name-tag my-image \
  --output-dir ./my-output

# 批量:先写 manifest JSON,再调用
python /path/to/linyuebanzi-image-gen/scripts/generate.py \
  --manifest ./my-manifest.json \
  --output-dir ./my-output \
  --parallel
  1. 脚本退出码:0 成功,1 失败
  2. 读取输出目录中的 .txt 文件可获取保存的 prompt,方便重跑

调用方负责的事情

  • 提示词撰写和拼接(包括风格前缀注入)
  • 业务校验(如禁用特定词汇)
  • 参考图 URL 管理
  • 后处理(如生成 manifest.md 插图位置清单)

故障排除

问题原因对策
API KEY 未找到环境变量未设置mulerun: export MULERUN_API_KEY=sk-xxx,apimart: export APIMART_API_KEY=sk-xxx,atlascloud: export ATLASCLOUD_API_KEY=sk-xxx
HTTP 403Cloudflare WAF 拦截脚本已内置浏览器 UA,检查网络
轮询超时API 服务繁忙等待后重试,或检查 API 状态
edit 模式未传 --images缺少参考图edit 模式必须通过 --images 传参考图 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 Linyuebanzi Image Gen AI skill do?

通用图像生成执行层,支持 MuleRun Nano Banana 2、APImart GPT Image 2 和 Atlas Cloud GPT Image 2 三种生图 API。通过 --provider 切换。支持 generation(纯文本生图)和 edit(带参考图修图)两种模式,单张和批量执行。这是被其他 skill 调用的基础设施 skill,不直接面向终端用户。当其他 skill(如 cover-hero、inline-diagram)需要调 API 生图时,调用本 skill 的 scripts/generate.py。不要用于:提示词撰写、风格注入、业务校验——这些由调用方 skill 负责。

Why use Linyuebanzi Image Gen on TypingMind?

Because you install it once and use it with any model. Linyuebanzi Image Gen 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 Linyuebanzi Image Gen in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lqshow/linyuebanzi-skills/tree/main/skills/linyuebanzi-image-gen. 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 Linyuebanzi Image Gen?

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 Linyuebanzi Image Gen?

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

Is the Linyuebanzi Image Gen AI skill free?

It is published on GitHub by lqshow. 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 👇