Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/muse-illustration/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions external_plugins/muse-illustration/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "muse-illustration",
"displayName": "Muse Illustration",
"displayName_i18n": {
"en": "Muse Illustration",
"zh-CN": "灵感插图"
},
"version": "1.1.2",
"description": "Turn poems, imagery, or a one-line spark of inspiration into illustrations or posters, using a growing built-in style library.",
"description_i18n": {
"en": "Turn poems, imagery, or a one-line spark of inspiration into illustrations or posters, using a growing built-in style library.",
"zh-CN": "把诗词、词句、意象或一句话灵感,转化为插画或海报;内置可成长的风格库(风格配方 = 正向提示词 + 负向约束 + 参考图 + 参数),支持自选风格、出图张数与成品形态。"
},
"author": {
"name": "Stayfoool",
"url": "https://github.com/Stayfoool"
},
"homepage": "https://github.com/Stayfoool/muse-illustration",
"repository": "https://github.com/Stayfoool/muse-illustration",
"license": "MIT",
"keywords": [
"illustration",
"chinese-poetry",
"text-to-image",
"poster",
"art",
"style-recipe"
],
"skills": "skills"
}
30 changes: 30 additions & 0 deletions external_plugins/muse-illustration/.zcode-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "muse-illustration",
"displayName": "Muse Illustration",
"displayName_i18n": {
"en": "Muse Illustration",
"zh-CN": "灵感插图"
},
"version": "1.1.2",
"description": "Turn poems, imagery, or a one-line spark of inspiration into illustrations or posters, using a growing built-in style library.",
"description_i18n": {
"en": "Turn poems, imagery, or a one-line spark of inspiration into illustrations or posters, using a growing built-in style library.",
"zh-CN": "把诗词、词句、意象或一句话灵感,转化为插画或海报;内置可成长的风格库(风格配方 = 正向提示词 + 负向约束 + 参考图 + 参数),支持自选风格、出图张数与成品形态。"
},
"author": {
"name": "Stayfoool",
"url": "https://github.com/Stayfoool"
},
"homepage": "https://github.com/Stayfoool/muse-illustration",
"repository": "https://github.com/Stayfoool/muse-illustration",
"license": "MIT",
"keywords": [
"illustration",
"chinese-poetry",
"text-to-image",
"poster",
"art",
"style-recipe"
],
"skills": "skills"
}
91 changes: 91 additions & 0 deletions external_plugins/muse-illustration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Muse Illustration

[中文](./README_CN.md)

Turn **poems, verses, imagery — or a single line of inspiration** — into illustrations or posters.

The idea behind this plugin: the reusable asset is not any single image, but a **style recipe** — *positive prompt + negative constraints + reference image + parameters*. Images are just samples a recipe produces; the recipe itself is what you reuse, and what keeps growing as new results get adopted into the library.

---

## What's inside

| Component | Name | Description |
|---|---|---|
| **Skill** | `muse-illustration` | The whole workflow: parse imagery → pick a style → confirm output parameters → assemble the prompt → generate → deliver & archive |

No commands, no subagents, no hooks, no MCP servers.

## Built-in styles

| id | Name | Core idea |
|---|---|---|
| `jiangnan-muke` | Watermark woodcut | Warm off-white paper, flat colour blocks, short carved strokes — the flat language of colour-keyed relief printing |
| `riso-print` | Risograph print | A 3–4 colour limited palette, grain, ink unevenness and misregistration — handmade screenprint feel |
| `chunkcolor` | Color-field ink | A calm single-colour mass in the lower two-thirds, fine ink linework along the top edge, generous white space — modern exhibition-poster ink painting |

All three were validated on Du Mu's *Jiangnan Chun*; `jiangnan-muke` also transferred across subject matter to Bai Juyi's *Yi Jiangnan* and was still adopted — evidence that the recipes are portable across subjects.

## When it triggers

When the user supplies a poem / verse / imagery phrase / one-line inspiration and asks to "draw it", "generate an illustration", "make a poster", or "add artwork", or names one of the bundled styles.

## Dependencies and side effects (disclosed)

**Network access**

- The plugin makes **no network requests at runtime** and contains no external API calls.
- Note: the "Examples" section of `skills/muse-illustration/SKILL.md` references absolute image URLs on `raw.githubusercontent.com`. Those images are fetched **only by Markdown-rendering clients that display them**; the plugin itself never reads them. Remove that section if you need a fully offline package.

**Model / API / service dependencies**

- Requires the host's **text-to-image capability**. This plugin bundles no model, holds no API key, and asks for no credentials.
- Without a text-to-image tool available, the skill can only reach the "assemble the prompt" step — it cannot produce an image.

**File writes**

- Generated images go to the host's default output directory (user-overridable).
- When the user **adopts** an image, the skill copies it into `assets/cases/images/` and appends a case note under `assets/cases/` — this is the mechanism that makes the skill improve with use.

**Command execution / hooks / MCP servers**

- **None of the above.** The plugin ships no executable scripts, no hooks and no MCP server configuration.

**Other side effects**

- Consumes quota/credits of the host's text-to-image capability (roughly 5–10 credits per image); the skill states this to the user before generating.

## Third-party material and licensing

| Item | Notes |
|---|---|
| Plugin license | **MIT** |
| Bundled images | All are **AI-generated by this project**; no third-party copyrighted assets |
| `assets/styles/*/ref.jpg` | Style anchor images (passed as `image1` to improve fidelity). They are this project's own adopted output, i.e. the exemplar for that style |
| Original reference for `chunkcolor` | A **third-party exhibition poster** whose copyright is not ours. It is **not bundled**; the case note keeps only its filename to document where the recipe came from |
| Third-party code / binaries | None. No prebuilt binaries, no bundled fonts or asset packs |

## Directory layout

```text
muse-illustration/
├── .zcode-plugin/plugin.json # Plugin manifest
├── .claude-plugin/plugin.json # Same manifest (Claude Code compatibility)
├── skills/
│ └── muse-illustration/
│ ├── SKILL.md # Skill definition and workflow
│ ├── references/ # Assembly rules, style/case templates
│ └── assets/
│ ├── styles/ # Style library (meta.yaml + prompts + reference image)
│ ├── lexicon/ # Imagery → visual element dictionary
│ └── cases/ # Adopted cases (accumulated experience)
└── README.md / README_CN.md
```

## Upstream repository

<https://github.com/Stayfoool/muse-illustration> — also published as a standard Agent Skill (`SKILL.md`) that any host reading the open format (Claude Code, Codex, Cursor, …) can install directly.

## License

MIT
91 changes: 91 additions & 0 deletions external_plugins/muse-illustration/README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Muse Illustration(灵感插图)

[English](./README.md)

把**诗词、词句、意象,甚至一句灵感**,变成插画或海报。

这个插件带来的核心观念是:可复用的资产不是某张图,而是一份**风格配方** ——「正向提示词 + 负向约束 + 参考图 + 参数」。配方跑出来的图只是效果样张;配方本身才是能反复复用、并随采纳案例不断长大的东西。

---

## 包含的组件

| 组件 | 名称 | 说明 |
|---|---|---|
| **Skill** | `muse-illustration` | 主能力:解析意象 → 选风格 → 确认出图参数 → 组装提示词 → 生图 → 交付与归档 |

无 Command、无 Agent、无 Hook、无 MCP Server。

## 内置风格

| id | 名称 | 内核 |
|---|---|---|
| `jiangnan-muke` | 江南春 · 水印木刻 | 米白纸底、平涂色块、短刻痕,套色 / 水印木刻的平面语言 |
| `riso-print` | 江南春 · risograph 版画 | 3–4 色有限调色板、颗粒噪点、套色错位的手工印刷感 |
| `chunkcolor` | 色块彩墨 | 下三分之二沉静单色面 + 上沿细墨线白描 + 大留白,展览海报式的现代彩墨 |

三条风格都已在杜牧《江南春》上验证过,其中 `jiangnan-muke` 跨题材到白居易《忆江南》同样被采纳 —— 证明配方具备跨题材可移植性。

## 何时会被调用

用户给出诗词 / 词句 / 意象词 / 单句灵感,并要求「画成画 / 出图 / 生成插画 / 做海报 / 配图」,或指定用某个已收录风格出图时。

## 依赖与副作用(如实声明)

**网络访问**

- 插件**运行时不发起任何网络请求**,不含任何外部 API 调用。
- 提醒:`skills/muse-illustration/SKILL.md` 的「效果示例」区块引用了 `raw.githubusercontent.com` 上的绝对图片地址。这些图片**只在支持渲染 Markdown 的客户端显示时才被拉取**,插件自身不会读取它们。需要彻底离线时,删掉该区块即可。

**模型 / API / 服务依赖**

- 需要宿主的**文生图(text-to-image)能力**。本插件不捆绑模型、不内置 API Key、不索要任何凭据。
- 若宿主没有文生图工具,技能只能走到「组装提示词」这一步,无法出图。

**文件写入**

- 生图产物写入宿主默认输出目录(用户可指定)。
- 用户**采纳**某张图后,技能会把该图复制一份到 `assets/cases/images/`,并按模板在 `assets/cases/` 追加一条案例记录 —— 这是本技能「越用越准」的机制。

**命令执行 / Hook / MCP Server**

- **均为无**。本插件不含任何可执行脚本、Hook 或 MCP Server 配置。

**其他副作用**

- 会消耗宿主文生图能力的额度 / 积分(每张约 5–10 积分);技能在调用前会明确告知用户。

## 第三方素材与许可证

| 项 | 说明 |
|---|---|
| 插件许可证 | **MIT** |
| 随包的图片 | 全部为**本项目自己生成的 AI 图片**,不含第三方版权素材 |
| `assets/styles/*/ref.jpg` | 风格锚定图(作为 `image1` 传入以提升贴合度)。内容是本项目自产并被采纳的成图,即该风格的标杆样例 |
| `chunkcolor` 的原始参考图 | 是一张**第三方展览海报**,版权不属于本项目,**未随包发布**;案例记录中仅保留文件名以说明配方来源 |
| 第三方代码 / 二进制 | 无。不含预编译二进制、不含捆绑字体或素材包 |

## 目录结构

```text
muse-illustration/
├── .zcode-plugin/plugin.json # 插件清单
├── .claude-plugin/plugin.json # 同一份清单(Claude Code 兼容)
├── skills/
│ └── muse-illustration/
│ ├── SKILL.md # 技能定义与工作流
│ ├── references/ # 组装规则、风格/案例模板
│ └── assets/
│ ├── styles/ # 风格库(meta.yaml + 正/负向提示词 + 参考图)
│ ├── lexicon/ # 意象 → 视觉元素 词典
│ └── cases/ # 已采纳案例(经验沉淀)
└── README.md / README_CN.md
```

## 上游仓库

<https://github.com/Stayfoool/muse-illustration> —— 同时也以标准 Agent Skill(`SKILL.md`)形式发布,可被 Claude Code、Codex、Cursor 等读取 SKILL.md 的工具直接安装使用。

## 许可证

MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
name: muse-illustration
description: Turn poems, imagery, or a one-line spark of inspiration into illustrations or posters, using a growing built-in style library. 把诗词、词句、意象或一句话灵感,转化为插画或海报。当用户提供一首诗词 / 词句 / 意象词 / 一句灵感,并要求画成画、出图、生成插画、做海报、配图,或要求用某个已收录风格出图时使用。内置可成长的风格库(风格配方 = 正向提示词 + 负向约束 + 参考图 + 参数),并支持选择风格、出图张数与成品形态。
license: MIT
compatibility: Works with any agent that reads the open Agent Skill format (SKILL.md) — Claude Code, Codex, Cursor, Gemini CLI, Copilot, WorkBuddy and more. Image generation requires a text-to-image tool; style reference images are bundled.
metadata:
author: Stayfoool
version: "1.1.2" # x-release-please-version
tags: agent-skill, illustration, chinese-poetry, text-to-image, poster, art
agent_created: true
---

# Muse Illustration(诗词 / 意象 / 灵感 → 插画 / 海报)

把一段文学性输入(诗词、意象、一句灵感)转成一张或多张插画 / 海报。

## 效果示例

![四张成品:江南春·水印木刻 / 忆江南·水印木刻 / 江南春·risograph / 江南春·色块彩墨](https://raw.githubusercontent.com/Stayfoool/muse-illustration/main/showcase/hero.jpg)

| 杜牧《江南春》· 水印木刻 | 白居易《忆江南》· 水印木刻 |
|---|---|
| ![江南春·水印木刻](https://raw.githubusercontent.com/Stayfoool/muse-illustration/main/showcase/01-jiangnanchun-muke.jpg) | ![忆江南·水印木刻](https://raw.githubusercontent.com/Stayfoool/muse-illustration/main/showcase/02-yijiangnan-muke.jpg) |

| 杜牧《江南春》· risograph 版画 | 杜牧《江南春》· 色块彩墨 |
|---|---|
| ![江南春·risograph](https://raw.githubusercontent.com/Stayfoool/muse-illustration/main/showcase/03-jiangnanchun-riso.jpg) | ![江南春·色块彩墨](https://raw.githubusercontent.com/Stayfoool/muse-illustration/main/showcase/04-jiangnanchun-chunkcolor.jpg) |

## 何时使用

- 用户给出诗词 / 词句 / 意象词 / 单句灵感,并要求「画成画 / 出图 / 生成插画 / 做海报 / 配图」
- 用户要求用某个已收录风格出图

## 核心原则

1. **存配方,不存图。** 可复用的资产是「风格配方」(正向提示词 + 负向约束 + 参考图 + 参数);成图只是配方跑出来的效果样张。
2. **部件级指令 > 抽象形容词。** 用「屋顶收成深色轮廓 / 墙用纸色留白 / 水只几笔横线」这类部件级描述,而不是「简洁、高级」。前者才稳定复现风格。
3. **负向约束与正向同等重要。** 必须显式写出要避免的东西。
4. **采纳制。** 只有用户明确认可的成图才回写案例库;新风格经用户确认后才入库。

## 工作流

1. **解析意象** —— 详见 `references/assembly-rules.md` 第 1 节。
- 判定输入类型:诗词 / 意象 / 单句灵感
- 抽取六类意象:主体、景物、动作、色彩词、情绪基调、时空
- 输入为「单句灵感」而信息不足时,先给出意象清单请用户确认(允许一键跳过)

2. **选择风格**
- 用户已指定 → 直接用
- 未指定 → 按题材 / 情绪从 `assets/styles/` 推荐 1-2 条并说明理由,让用户选
- 读取该风格的 `meta.yaml` + `prompt.positive.txt` + `prompt.negative.txt` + `ref.jpg`

3. **确认出图参数**(用户可选;未指定则用风格默认值)
- **张数**:1 张(省额度)/ 2 张 / 4 张(多变体择优,成本 ×N)
- **成品形态**:纯插画(默认竖版立轴 2:3)/ 小红书 3:4 / 方图 1:1 / 横版 3:2 / 带标题字海报
- 比例与尺寸映射见 `references/assembly-rules.md` 第 3 节
- 注意:生图模型渲染中文字不稳,**海报标题字需另走本地排版**(见 `references/assembly-rules.md` 第 4 节)

4. **组装提示词** —— 详见 `references/assembly-rules.md` 第 2 节。
- 用「风格正向模板」套入「意象清单」,再附上风格负向约束
- 有参考图时作为 `image1` 传入做风格锚定,并强调「只借风格与笔触,不要照抄构图」

5. **生图**:调用 ImageGen。
- **调用前必须告知用户:本次将消耗约 5-10 积分 / 张**
- 参数:`size` 按成品形态,`quality=high`,`output_dir` 默认 `<当前项目>/generated-images`
- 多变体:同一提示词重复调用,或对措辞做小幅变化

6. **交付与归档**
- 用 present_files 展示成图
- 询问是否采纳;**用户采纳后**:① 把成图拷一份到 `assets/cases/images/YYYY-MM-DD-<slug>.jpg` 做成自包含副本;② 按 `references/style-spec-template.md` 的案例格式追加一条到 `assets/cases/`

## 资源

- `references/assembly-rules.md` —— 解析 / 组装 / 尺寸 / 叠字 的详细规则
- `references/style-spec-template.md` —— 新增风格条目与案例记录的模板
- `assets/styles/<风格名>/` —— 风格库(`meta.yaml` / `prompt.positive.txt` / `prompt.negative.txt` / `ref.jpg`)
- `assets/lexicon/imagery.yaml` —— 意象 → 视觉元素 词典
- `assets/cases/` —— 已采纳案例(经验沉淀)

## 新增风格

在 `assets/styles/` 下按 `references/style-spec-template.md` 建目录。风格入库需用户确认。
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 案例:江南春· chunkcolor 色块彩墨

- **日期**:2026-10-14
- **风格**:chunkcolor(色块彩墨)
- **原始输入**:杜牧《江南春》—— 千里莺啼绿映红,水村山郭酒旗风。南朝四百八十寺,多少楼台烟雨中。
- **意象清单**:
- 主体:春江水面(=那块色)
- 景物:水村吊脚楼、山郭矮城墙、酒旗、南朝楼台寺塔、芦苇垂柳
- 色彩:青瓷绿 `#8BA79B` 单色相 + 一点朱红 `#B5443A` 酒旗(留红开关 ON)
- 情绪:清雅、克制、烟雨迷蒙
- 时空:春日江南、雨后
- **最终提示词**:见 `assets/styles/chunkcolor/prompt.positive.txt`,占位符填入
`{SUBJECT}`=水村山郭 + 楼台寺塔 + 烟雨 | `{MASS_IS}`=a spring river | `{MASS_COLOR}`=celadon green #8BA79B
- **负向**:见 `assets/styles/chunkcolor/prompt.negative.txt`(留红版末尾追加段)
- **参数**:size=1024x1536 quality=high 张数=2(A/B 对照)
- **参考图**:`36f5c999-dd57-4616-9187-f6691805bf01.webp`(image1,`input_fidelity=medium`)。**第三方展览海报,版权不属于本项目,未随包发布**;若需复现,请自备一张同风格参考图,或直接用本风格随包的 `ref.jpg`(=本项目自产成图)。
- **成图**:`assets/cases/images/2026-10-14-jiangnanchun-chunkcolor.jpg`(技能内自包含副本,=A 锚定版)
|原始输出文件名:`Reference_image_instruction__t_2026-10-14T05-50-36.png`(A 锚定版)
|对照版(未采纳)文件名:`Modern_Oriental_ink_and_waterc_2026-10-14T05-50-35.png`(纯文本版)
- **是否采纳**:是
- **用户评价 / 可提炼的规则**:

> 用户确认三点:①色块现在读得出是江水,效果好多了 ②可行 ③**参考图锚定版(A)更接近**,纯文本版偏弱。

沉淀出的四条规则:

1. **色块必须「赋形」**——它就是主体本身(=江/田/山),不是抽象泼洒。参考图里寒江=江水、麦野=麦田、松间=山体且看得出崎岖。
2. **色块形体必须端正安定**——「下三分之二的沉静色面、上沿齐平」或「一道端正竖色柱」。写成 `wide meandering river` 会被画成装饰性 S 形曲线并被否掉。**「有机」是边缘质感,不是形状。**
3. **必须在提示词里点名那块色写的是什么**(`{MASS_IS}`),不点名模型必然退回随机泼洒。
4. **参考图锚定为必选项,不是加分项**——同一套文字,传参考图版明显更接近。这是本次最有价值的一条:此前为了「检验纯文本提示词独立性」而故意不传参考图,是错误取舍。

另:留红默认关闭,题材有色差点题(「绿映红」)时才破例,且必须是「一点」而非第二个色块。
Loading