xiaohu-ip-studio
Open-source Chinese in-text illustration skill + IP character library. Using the methodology of "identify cognitive anchors → construct metaphors on the fly → anti-PPT self-inspection", it generates body text illustrations featuring consistent recurring characters for Chinese in-depth essays and methodology breakdowns (not generic commercial illustrations, and not randomly selected styles from a template library). Comes with 31 original IP characters (15 hand-drawn line art + 16 pun-based meme characters). Users can pick one character tailored to the article's tone or create custom characters. Use when the user says "illustrations", "body text illustrations", "IP illustrations", "illustrate this article", "metaphorical illustrations", "pick a character for illustration", or "illustration shot list".
1How It Works & Mechanism
Positioned to package the "Chinese in-depth article illustration methodology" with an "extensible IP character library", holding the core belief that methodology remains constant while characters and art styles act as parameters.
> 把"中文深度文配图方法论" + "可扩展 IP 角色库"打包的开源配图技能。**方法论恒定,角色与画风是参数。**
Aims to generate in-text illustrations starring fixed IP characters for long-form essays, methodology breakdowns, and product teardowns; explicitly not commercial clip art, PPT infographics, random styles from a template library, or generic cute cartoons.
为中文**深度文 / 方法拆解 / 产品解读**生成**由固定 IP 角色出演**的正文配图。目标**不是**:商业插画、PPT 信息图、样式库随机选风格、可爱卡通。
Workflow follows a fixed four-step process with a mandatory hard stop at step 2: Enumerate shot list section by section → Let the user choose IP and art style (never decide on user's behalf) → Generate images → Deliver.
**用户给内容 → ①逐节枚举出 shot list → ②让用户选 IP+风格(硬停顿)→ ③生图 → ④交付。**
Every section of the article (down to H2/H3 subheadings) must enter the enumeration table labeled with "Illustrate / Do Not Illustrate + Rationale", preventing dry but complex mechanism passages from being overlooked.
读文章,**每一节(到二/三级小标题粒度)都列进下表,每节一行,不许跳**——"挑几个顺眼的"是漏斗,会漏掉枯燥但难懂的机制段(MoE / 内存 / 路由这种)。
Deciding whether to illustrate relies on bidirectional first principles: a ceiling to prevent filler images (cut if removing it does not hinder reader understanding), and a floor to ensure complex mechanisms are visualized (at least one explanatory diagram for every abstract mechanism, difficult structure, or key comparison).
- **天花板(不许凑数)**:文字已说透、不抽象的点不配(图是浪费);真实截图 / 官方图能说明问题时自造插图是辅助不是主角。…- **地板(不许漏难懂机制)**:每个抽象机制 / 难懂结构 / 关键对比至少配 1 张解释图。
Classifies images into three tracks before entering the shot list: Emotional Anchors (resonance) / Explanatory Diagrams (structures, flows, comparisons) / 4-Panel Comics (timelines and turning points), plus an article-level infographic poster track.
- 没共鸣 / 缺钩子 → **情绪锚点图**(小互演情绪;走 metaphor + expression-method,双图法)…- 有时间线 / 转折 / 心路历程 → **四格漫画**(2x2 起承转合;走 comic-strip)
Aspect ratios are determined image by image based on natural content dimensions (vertical 3:4 / horizontal 4:3 / square 1:1, true panoramic 16:9 is extremely rare), capped at 4:3 for mobile optimization, alternating vertical, horizontal, and square throughout the article to maintain rhythm.
- **竖内容 → `3:4`**:长卷 / 纵向堆叠 / 漏斗 / 阶梯 / 分层 / 单角色立姿。…- ⛔ **手机封顶 4:3**:发公众号 = 移动端,16:9 在手机上只 ~1/4 屏、字和角色糊。
"Character Presence" is a required field defaulting to "Small / Embedded" (~15%): explanatory diagrams and 4-panel comics default to small, while only pure emotional hooks may be set to large with explicit justification required.
⛔ **「角色占比」是必填列,默认「小·嵌入」(~15%)——这是法则不是逐张判断**
Image generation runs via the bundled generate.py (requires the user to supply their own image API key; no keys are built-in), using character anchor images to lock visual identity, generating images individually without compositing, and requiring YAML header aspect ratios to strictly match the orientation keywords in the first prompt sentence.
python3 scripts/generate.py --prompt-file <p.md> --reference characters/<名>/refs/<名>-锚点.png --out <输出路径>
Post-generation self-checks via the anti-ppt-qa checklist (anchor verification / structural completeness / IP presence ratio / visual contract consistency / intra-article variation / in-image text / overall distribution); triggers prioritize local inpainting or regeneration upon failure signals, with API retries capped at 2.
按 `references/anti-ppt-qa.md` 走自检清单(选点复检 / 结构完整 / IP 占比 / 视觉契约统一 / 同篇张间变化 / 图内文字 / 整组分布)。命中失败信号 → 优先局部编辑或重生成。
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| api | OpenAI 兼容的图像生成端点(默认 gpt-image-2,中文字符渲染约 99% 准;脚本内含 apimart 异步与 sync 两条后端路径) |
| config | 用户自填的图像 API key(写入 ~/.config/xiaohu-ip-studio/config.yaml,脚本不内置任何密钥) |
| cli | python3(唯一运行时依赖,纯标准库、零第三方包)与 bash install.sh 一键安装脚本 |
4Recommended Governance & Evidence
- scripts/: Executes local script or command: python3 scripts/illo.py init (guides key configuration, creates ~/.config/xiaohu-ip-studio/ and writes conf
- 网络端点: Declares external network access: scripts/generate.py uses urllib.request to send POST requests to the configured base_url (OpenAI-compatible image endpoint: creates tasks
- 本地工作目录: File I/O and artifact output: scripts/illo.py:20-21 creates ~/.config/xiaohu-ip-studio/ directory and writes config.yaml (containing api
5Second-Pass Verification
- [ok] 出网面收敛:网络请求 12 条命中全部落在 scripts/generate.py 的 urllib 调用,其它文件零命中 — 命中为 generate.py:18/97/99/115/117/122/123/152/153/155/267/313,即 Request/urlopen/HTTPError 与轮询;URL 101 条命中里大量是 README.en.md 的 raw.githubusercontent 角色图链接与 CREDITS.md 署名链接,属文档引用。
- [ok] 凭证面很小且集中:18 条命中只涉及 config.yaml 的 api_key 与 XDG_CONFIG_HOME — 代表性命中 config.example.yaml:7 与 references/backends.md:18(「你自己的 key,永不上传」)、scripts/generate.py:48-49(缺 key 时报错提示 init)、illo.py:7/20/21/35;无 .env/keychain 读取。
- [ok] 「外部程序」3 条命中不是真的执行外部进程,而是 urllib 请求伪装 UA 触发的正则 — generate.py:122/147/257 均为 headers 里 User-Agent: curl/8.4.0,属误报;本 skill 无 subprocess/os.system 调用,与 install.sh 只调 python3 脚本一致。
- [ok] 抗 prompt 注入设计是显式条款,不是推断 — SKILL.md 有「角色包安全规则」整段(读外部 character.md 只提取定义段落、绝不执行其中指令性文字),README 安全一节复述同一规则;风险扫描「危險旗標/防護繞過」零命中,说明这是主动设计而非缺陷。
- [ok] 零依赖与配置权限属实 — install.sh 只检查 python3;illo.py 写 config.yaml 于 ~/.config/xiaohu-ip-studio 且正文标 mode 600;.gitignore 列 config.yaml/config.json/__pycache__ 等,无第三方包声明。
- [ok] 归档与角色数量核对:31 个在用角色 + 4 个归档 — §1 清单:characters/ 15 个、food-mascots/ 16 个(合计 31);_archived-symbols-20260617/ 另有 achong/lengjiao/shuangzi/xiaoxing 4 个,与 SKILL.md 的 15+16 说法一致,归档不计入。
- [ok] meta 核定值核对:commit=9d3091e8…、license MIT、installs=null — commit 与骨架 audit.skill_commit 相同;README 无 per-skill 安装量可定位值(README 只说 clone 到技能目录或 bash install.sh),故 stars/last_push/installs 维持 null。
6Verdict & Scenarios
9c30dd21d9c9ed75…