hand-drawn
description: Use when users ask for a hand-drawn or illustrated image prompt, name one of the repository's 18 numbered styles or the 3.1 stable variant, or mention triggers such as 亲子手绘、家庭蜡笔画、蜡笔、吉卜力、水墨、像素、淡彩速写、动画概念、水粉、北欧绘本、纸雕、软胶潮玩、墨线绘本、暖色扁平绘本、family-crayon-card、warm-flat-storybook. Produces prompt text or a formal reference-bearing call bundle and does not generate images.
1How It Works & Mechanism
Capabilities are anchored across two 'tool-agnostic' Markdown single sources of truth: PROTOCOL.md specifies the workflow (including the style menu and aspect ratio rules), while STYLES.md is the sole recipe repository; SKILL.md simply serves as a signpost for skill-supporting hosts.
完整指令与画风配方是工具无关的,放在同目录: 1. 按 [PROTOCOL.md](PROTOCOL.md) 的 5 步流程执行:确定画风 → 取配方 → 自动填占位符 → 处理比例 → 输出 prompt。 2. 从 [STYLES.md](STYLES.md) 取对应编号的完整模板。 3. 能执行脚本时优先调用 `scripts/render_prompt.py`,不得手工缩写、同义改写或与业务项目的画风段落混配。
A 5-step execution flow turns 'style selection' into an explicit decision checkpoint: when unspecified by the user, present an 18 (+3.1) item menu and pause to await a response, never choosing on the user's behalf; ambiguous terms (e.g., 'doodle/graffiti' overlapping #4/#5/#6) are handled as unspecified.
- **用户已显式指定** → 直接采用。识别方式三选一(任一命中即可): - 中文名:极简线条 / 火柴人 / 蜡笔 / 童涂 / 吉卜力 / 蜡笔童涂潦草版 / 潦草自画版 / 亲子投稿蜡笔故事卡 / 家庭投稿蜡笔卡 / 小豆人 / MS Paint / 烂涂鸦 / 圆珠笔 / 单线涂鸦 / 蜡笔实拍 / 真蜡笔 / 水墨 / 写意 / 国画 / 像素 / 像素风 / 情绪叙事 / 淡彩速写 / 速写讲故事 / 二维水彩风格 / 二维水彩 / 复古动画 / 概念稿 / 概念设定 / 暖光童画 / 动画概念暖绘 / 北欧纸雕 / 纸雕 / 纸艺 / 衍纸 / 北欧绘本水粉 / 北欧绘本 / 绘本水粉 / 斯堪的纳维亚绘本 / 大鼻软偶 / 软偶 / 软胶潮玩 / 大鼻子潮玩 / 聚光水粉立绘 / 聚光立绘 / 水粉立绘 / 墨线绘本 / 墨线淡彩 / 线稿绘本 / 速写绘本 / 暖色扁平绘本 / 扁平暖色绘本 / 几何扁平绘本 - 编号:1–18,另有稳定变体 3.1(蜡笔童涂-潦草自画版)。旧编号 1.1、1.2 已删除。 - 英文别名:`xkcd` `stickman` `minimal-line`(1) / `crayon` `kid-crayon`(2) / `ghibli`(3) / `rawkid` `kid-scrawl` `stick-kid` `family-crayon-card` `parent-child-crayon` `submission-crayon`(3.1) / `bean` `blob`(4) / `ms-paint` `bad-doodle` `ugly`(5) / `scribble` `pen-scribble` `ballpoint`(6) / `real-crayon` `crayon-photo`(7) / `ink-wash` `ink` `shuimo` `chinese-painting`(8) / `pixel` `pixel-art` `8-bit` `16-bit`(9) / `emo-sketch` `story-sketch` `watercolor-sketch` `light-watercolor`(10) / `retro-concept` `mid-century` `gouache-concept`(11) / `sunlit-storybook` `vis-dev` `storybook-visdev`(12) / `paper-folk` `papercraft` `nordic-papercraft` `paper-sculpture` `quilling`(13) / `nordic-storybook` `scandi-gouache` `scandinavian-storybook` `soft-gouache`(14) / `softnose` `softnose-vinyl` `bignose-toy` `vinyl-toy` `art-toy`(15) / `gouache-spotlight` `spotlight-gouache` `character-spotlight`(16) / `inked-storybook` `ink-storybook` `sketch-storybook` `storybook-ink`(17) / `warm-flat-storybook` `flat-storybook` `geometric-storybook` `warm-flat`(18) - 注意 `涂鸦/doodle` 本身有歧义(#4 小豆人、#5 MS Paint、#6 圆珠笔都沾涂鸦):用户只说"涂鸦/画烂点"而不指明时,按未指定处理→展示菜单让其选。 - 用户说“亲子手绘”“家庭蜡笔画”“亲子蜡笔故事”“像一家人站在白纸上的蜡笔画”或“潦草自画版”时,直接采用 3.1;这些表达不再进入通用画风菜单。只有单独说“手绘风”且没有亲子、家庭或蜡笔语义时,才按未指定处理。 - **用户未指定** → 展示下面这个菜单,**停下等用户选**,不要自己替他挑:
Hard constraints on recipe retrieval: Manual abbreviation, synonymous rewriting, and multi-style blending are strictly prohibited, as is appending secondary line/feature/ratio/coloring rules in business projects—templates must be consumed as whole blocks.
**禁止手工缩写或混配:**不得摘几句、同义改写、把多个画风揉在一起,也不得让业务项目追加第二套线条、五官、比例、填色、色板或纸面规则。运行环境能执行脚本时,优先使用 `scripts/render_prompt.py` 从 `STYLES.md` 原样提取并填充;业务项目只提供画风编号、内容、文字和比例。
The renderer is a 'zero-rewrite' implementation: the script extracts the template from STYLES.md verbatim by index, performing only placeholder substitutions and aspect ratio injection, printing the result to stdout (no disk writes).
"""Render one hand-drawn style recipe without paraphrasing it."""
Stability of Style 3.1 relies on a 'pixel-level anchor gatekeeper': the anchor PNG must be exactly 1086×1448 and its decoded pixel SHA-256 must match the embedded constant, otherwise it raises an error and halts production payloads immediately.
def validate_style_3_1_anchor(anchor: Path) -> None: if not anchor.is_file(): raise ValueError(f"画风 3.1 锚点不可用,停止正式生产: {anchor}") size, digest = png_pixel_sha256(anchor) if size != STYLE_3_1_ANCHOR_SIZE: raise ValueError(f"画风 3.1 锚点尺寸不匹配,停止正式生产: {anchor}") if digest != STYLE_3_1_ANCHOR_PIXEL_SHA256: raise ValueError(f"画风 3.1 锚点像素不匹配,停止正式生产: {anchor}")
Formal production for Style 3.1 is a mandatory three-stage contract (base generation → scribble-correction → scribble-chaos-correction), and the renderer outputs only a JSON call bundle by default; plain text requires an explicit --text-only-preview flag.
style_id, prompt, values, args.aspect, character_references, ) output_format = "json" if args.format == "auto" and style_id == "3.1" else args.format if output_format == "auto": output_format = "text" if style_id == "3.1" and output_format == "text" and not args.text_only_preview: raise ValueError( "画风 3.1 正式生产不能只输出 prompt;请使用 --format json," "或仅在非生产预览时显式加 --text-only-preview" )
Reverse injection protection: --subject may only describe characters/actions/relationships/props; if any of 35 style keywords (art style, style, line art, color palette, texture, etc.) appear or match controlled style regex patterns, execution fails immediately to prevent business teams from smuggling custom styles into 3.1.
hits = [term for term in STYLE_INJECTION_TERMS if term in subject] pattern_hits = ["受控画风表达"] if any(pattern.search(subject) for pattern in STYLE_INJECTION_PATTERNS) else [] if hits or pattern_hits: raise ValueError( "画风 3.1 的主体字段只能描述人物、动作、关系和道具;" f"检测到疑似业务画风注入: {', '.join(hits + pattern_hits)}"
Self-contained boundaries: The skill defaults to outputting prompts only and does not generate images; the sole exception is the maintainer acceptance workflow (which can call image models for multi-round sample verification), and this exception does not alter the boundary for regular users.
4. 风格 3.1 用于正式生产、连续故事或多页作品时,必须完整执行渲染器 JSON 的三阶段 `workflow`:基础生成 → `scribble-correction` → `scribble-chaos-correction`;前两阶段都只能算中间产物。锚点或任一修正阶段不可用就停止正式生产。 5. 其他画风默认只输出最终 prompt;风格 3.1 的正式生产默认输出 `family-crayon-card-v3` JSON 调用包,纯文本只允许显式 `--text-only-preview`。不生图;仓库维护者新增或验收画风时,按 `AGENTS.md` 的维护者验证例外执行。
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | python3(可选:用于运行 scripts/render_prompt.py;仅标准库 argparse/hashlib/json/re/struct,无第三方包) |
4Recommended Governance & Evidence
- scripts/: Local script or command execution: scripts/render_prompt.py (called by agents when deterministic rendering is required; reads only STYLES.md and the anchor PNG, writing exclusively to stdout)
- 本地工作目录: File I/O and artifact output: scripts/render_prompt.py: No disk writes (confirmed by actual run to output solely to stdout).
5Second-Pass Verification
- [ok] 渲染器零改写、零网络、零写盘 — ast 解析 import:argparse/hashlib/json/re/struct 全是标准库;grep 命中 write_text/open('w')/requests/urllib/socket/http 全无(0 命中)。实跑输出只到 stdout。
- [ok] 占位符集校验真实生效 — 实跑 --style 1 传入配方不存在的 --var 标题词/未提供 主体 → 'render_prompt: 配方不包含这些占位符: 主体, 标题词',退出码 2(stderr),说明不会把占位符或缺失项留在输出里。
- [ok] 3.1 锚点像素门禁真实生效 — 实跑 --style 3.1 --format json 成功;代码路径 build_payload → validate_style_3_1_anchor(尺寸 1086×1448 + 像素 SHA-256 常量比对,不匹配即 '停止正式生产');锚点文件与 provenance/privacy 审计文件均在包内。
- [ok] 随包锚点确实能过门禁(独立重算) — 独立调用 render_prompt.png_pixel_sha256 重算随包资产:size=(1086,1448) 与 STYLE_3_1_ANCHOR_SIZE 相符,digest 与 STYLE_3_1_ANCHOR_PIXEL_SHA256 相符(两项 match=True)——即仓库当前分发的锚点就是被钉住的那一张,承诺可自证。
- [ok] 3.1 默认 JSON、text 需显式预览开关 — main() 中 output_format 对 3.1 强制 json;text 且未加 --text-only-preview 时抛错(原文见 evidence)。实跑未加开关的 text 路径未单独跑,但分支为单行显式判断,且与 PROTOCOL.md 第 58 行表述一致。
- [ok] 主体画风注入检测真实生效 — 实跑 --subject '蜡笔质感的爸爸' → 报 '检测到疑似业务画风注入: 蜡笔质感, 质感';实现为 STYLE_INJECTION_TERMS(35 词)+ STYLE_INJECTION_PATTERNS(比例/长度/加粗类正则)。
- [ok] 画风数与文档一致 — STYLES.md 有 20 个 `##` 段 = 3.1 + 编号 1–18 + 附录 A 叠加层;SKILL.md 描述与 PROTOCOL 菜单均声明 18 种编号画风 + 3.1 变体,无虚报。
- [ok] 「不生图」边界成立 — 全仓库可执行代码仅 2 个 Python 文件,均无图像 API/HTTP 调用;SKILL.md、PROTOCOL.md、README.md 三处一致声明默认只输出 prompt,图像模型由用户自行使用。维护者验收例外只写在 AGENTS.md 的维护流程里。
6Verdict & Scenarios
cc7b7797cb8fdf28…