全部技能 / 设计 / handdraw-style-prompter
设计 · yang0/handraw-style

handdraw-style-prompter

description: Turn a 001–261 hand-drawn style number and image theme into bilingual prompts, or generate an image with a model-capability-aware decision about whether the matching numbered image is needed as a style reference.

风险提醒:蓝色 · 知晓即可AI 侦查报告
作者 yang0GitHub yang0/handraw-style ↗Stars 1855许可 仓库内未发现 LICENSE 文件(git ls-files 未列 LICENSE/COPYING),GitHub API license 字段为 null —— 未声明许可,若需商用请先联系作者确认commit 70bf51d6b4
agent 宿主通常会约束 skill 执行权限;风险提醒为 AI 侦查观点,不构成质量或安全保证。第三方 skill 仅作拆解与展示,安装使用风险自负,版权归原作者。

1实现原理 · 为什么它能做到

能力的内核是「把风格编号化」:261 条风格记录(编号 + 原参考名 + 生图名 + 核心视觉特征)从根目录 styles_200_reorganized.md 解析生成 references/styles.json,再由 build_library.py 生成离线可搜索的画廊 HTML。

handdraw-style-prompter/SKILL.md
Users can browse `gallery/index.html` for the numbered contact sheets. The authoritative style content is `../styles_200_reorganized.md`; `references/styles.json` is a generated index and must be refreshed with `python scripts/build_library.py` after the Markdown changes.
注:这里在做什么:让用户只需记住一个编号(README 原文:'这个风格库把“凭感觉选图”变成“记住一个编号”。')。build_library.py 用 `^\|\s*(\d{3})\s*·\s*([^|]+)\|\s*([^|]+)\|\s*(.*)\|\s*$` 解析 Markdown 表格行,并同步生成 gallery/index.html。本机核对:styles.json 恰 261 条,编号连续 001–261。

输出契约极简且严格:固定四段输出(选中风格 / 中文 prompt / 英文 prompt / 一句说明),并要求 prompt 正文以 `风格名称:#{编号} · {generation_name}。` 与 `Style name: #{number} · {generation_name}.` 开头。

handdraw-style-prompter/SKILL.md
For a valid request, return these four parts: 1. Selected style: number and generated style name. Do not output a core-visual-traits field by default for ordinary prompt-only requests. 2. Chinese prompt: begin the copyable prompt itself with `风格名称:#{编号} · {generation_name}。`; describe only the user's theme and constraints explicitly provided by the user, and always include the indexed author/style name as a short `参考作者/风格名称` label. Do not append core traits, the fixed style anchor, extra style adjectives, generic composition advice, quality claims, or negative prompts. 3. English prompt: begin the copyable prompt itself with `Style name: #{number} · {generation_name}.`; describe only the same theme and user-provided constraints, and always include the indexed author/style name as `Reference author/style name`. Do not append visual-trait prose, generic composition advice, quality claims, negative prompts, or the fixed style anchor. 4. A brief note: the prompt can be pasted into any image AI; generation is controlled by that AI.
注:这里在做什么:把「风格名 + 编号」当作可复现的锚点写进 prompt 头部,同时禁止追加核心特征、固定风格锚点、额外风格形容词、通用构图建议、质量声明与负向词——输出纪律本身就是本技能与「随手让模型写提示词」的主要差别。

默认不生图;只有用户明确要求生成/渲染/预览时才进入生图模式,且先用「完整发送文本」(索引作者名 + 生图风格名)去解析当前图像模型的能力,而不是依据作者名气或在世状态。

handdraw-style-prompter/SKILL.md
When the user explicitly requests image generation, first resolve the current image model (or model family) against `references/model_capabilities.json` or the equivalent runtime capability metadata. The decision uses the complete text that will be sent to the model: the indexed author name plus the generated style name. It is not based on the author's fame or life status.
注:决策三级:name_activation=strong → 只发作者名+风格名+主题;否则 traits_activation=strong 且有核心特征 → 加上仅正向的具体视觉特征;两者都不成立 → 传对应编号的参考图。未知模型一律按 unknown 走传图的安全回退。

能力清单是数据而非硬编码:references/model_capabilities.json 用 schema_version/description/default/models 结构描述「某模型能否仅凭名称激活某编号」,默认值强制 unknown + 必须传图。

handdraw-style-prompter/references/model_capabilities.json
"description": "Model-specific ability to activate a numbered style from its name. Unknown models must use the image fallback.", "default": { "name_activation": "unknown", "use_reference_image": true, "note": "No verified model capability is available. Pass the numbered image."
注:本机核对:default.name_activation='unknown'、use_reference_image=true;当前只有 gpt-image-2 一轮清单(123 个编号条目:78 个 name_activation=strong,45 个 none),其余编号自动落回 traits/reference-image 分支——数据缺项不产生错误结论,只降级为更保守的传图路径。

决策逻辑由脚本落地并可复现:resolve_reference.resolve() 校验编号范围与取值域(ALLOWED = strong/weak/none/unknown),输出 activation_source(name+style / name+style+traits / reference-image)与过滤后的 prompt_traits。

handdraw-style-prompter/scripts/resolve_reference.py
return ";".join(kept) def get_reference_path(number: str) -> str: reference_grid = grid_path(number) return str(reference_grid if reference_grid.exists() else single_path(number)) def resolve(model: str, style: str, policy: dict | None = None) -> dict:
注:这里在做什么:把「要不要传参考图」变成可打印 JSON 的确定性判断,避免模型每次自由发挥。注意 positive_traits() 会剔除含『避免/不要/不准』的分句(SKILL.md 第 29 行的同义要求)。当前该脚本因缺少仓库根 scripts/ 模块而无法运行,见 verification.second_pass 的 discrepancy 项。

传参考图时必须注入「参考图隔离块」:中英双语写明只提取线条/笔触/媒介/材质/色彩倾向等风格特征,不得复制主体、人物、服装、道具、动作、场景、构图、文字或故事,主题才是内容唯一来源。

handdraw-style-prompter/SKILL.md
- When an image is passed, inject the following reference-isolation block into the actual image-generation prompt. It is required for every reference-image generation and is not added to ordinary prompt-only output: Chinese: `所附图片仅用于参考画风。只提取参考图的风格特征,例如线条、笔触、媒介、材质、色彩倾向和整体视觉语言;不要使用、复制或延续参考图中的任何主体、人物、动物、服装、道具、动作、姿态、场景、背景、构图、布局、文字或故事。最终画面内容完全以用户提供的主题为准。` English: `Use the attached image only as a style reference. Extract only its stylistic qualities, such as linework, brushwork, medium, material texture, color tendencies, and overall visual language. Do not use, copy, or carry over any subject, person, animal, clothing, prop, action, pose, setting, background, composition, layout, text, or story from the reference image. The user's written theme is the sole source for the image content.` - The user's theme is the sole source for subjects and narrative; the reference image must never override or add content to the theme.
注:这是针对「图生图会把参考图内容一起锁死」这一实际失败模式的对策;SKILL.md 第 24/26 行给出可直接粘贴的中英文块,并要求只在真正传图时注入,普通 prompt-only 输出不得带上。

会话初始化靠宿主 MCP:在 Codex 任务/线程首次调用时打开本地画廊(file:///E:/handraw-style/handdraw-style-prompter/gallery/index.html)作为视觉索引,失败则给本地链接回退,且不重复打开、不写状态文件。

handdraw-style-prompter/SKILL.md
1. If this task has not already displayed the gallery, call `mcp__codex_app__open_in_codex` with `target: { type: "browser", url: "file:///E:/handraw-style/handdraw-style-prompter/gallery/index.html" }` so the rendered gallery opens in the in-app browser. 2. Continue with the user's request after the browser call; opening the gallery must not block prompt generation or an explicitly requested image-generation follow-up. 3. Do not repeat the browser call on later turns in the same task/thread. Use the conversation context (not a persistent state file) to determine whether initialization already happened. 4. If the browser call is unavailable or fails, provide this fallback link: [打开手绘风格编号画廊](file:///E:/handraw-style/handdraw-style-prompter/gallery/index.html), then continue normally.
注:这里在做什么:把「翻编号画廊」前置到会话开始,降低用户描述风格的成本。第 39 行明确 state 用会话上下文而非持久文件('Use the conversation context (not a persistent state file) to determine whether initialization already happened'),避免污染磁盘。

资源定位规则内建:同编号的四宫格参考图优先于单图,路径按每 200 编号分桶(如 201-400),缺图时报告限制并退回纯文本 prompt,绝不臆造或替代参考图。

handdraw-style-prompter/SKILL.md
- If the numbered image is missing or cannot be passed, report that limitation and provide the normal text prompts; never invent or substitute a reference image.
注:本机核对:images/individual/001-200 有 200 张单图、201-400 有 61 张(201–261),另有 45 个 *_grid.jpg(编号 217–261);SKILL.md 里的 Windows 绝对路径(E:\handraw-style\…)与仓库内实际相对路径不同,属作者本机布局写死。

2核心能力

01001–261 编号 → 双语提示词(中文以「风格名称:#编号 · 生图名。」开头,英文以「Style name: …」开头,均带参考作者/风格名标签)
02离线编号画廊:单文件 HTML,可按编号/风格名/原参考名筛选,图片指向仓库内拼图
03模型能力感知的参考图策略(name+style → name+style+traits → reference-image 三级 + unknown 回退传图)
04参考图隔离文本(中英双语)强制注入,防止参考图内容锁死主题
05确定性 CLI 草稿:prompt_style.py 按编号+主题直接打印四段式双语 prompt(本机实跑可用的唯一 CLI)
06索引重建与不变量校验脚本:build_library.py(写 styles.json + gallery)与 validate_library.py(编号连续、018 映射、deceased 必须有来源、能力取值域、unknown 模型必须传图)
07首次调用打开本地画廊的会话初始化(宿主 MCP 浏览器),失败有本地链接回退
08负向特征过滤:用 traits 时只保留正向可见特征,剔除含 避免/不要/不准 的分句

3外部依赖

类型依赖
api宿主 MCP 工具 mcp__codex_app__open_in_codex(在 Codex 应用内浏览器打开本地 file:// 画廊;skill 自身不含网络调用)
api外部图像生成工具(由宿主/用户提供;传参考图时使用其 referenced_image_paths 参数)——skill 只产出提示词与路径建议,不调用任何图像 API
clipython3(运行 build_library.py / prompt_style.py;split_contact_sheets.py 另需 Pillow/PIL)
packagePillow(PIL)——仅 split_contact_sheets.py 用于切分拼图为编号单图;非运行提示词所需

4风险提醒 风险提醒:蓝色 · 知晓即可

风险提醒:蓝色 · 知晓即可
  • 文档命令与仓库结构脱节(已实证) — resolve_reference.py / split_contact_sheets.py / validate_library.py 依赖 <repo>/scripts/{style_asset_paths,contact_sheet_registry}.py,这两个模块不在仓库中,SKILL.md「Utilities」的命令当前不可运行;自动化校验与「确定性决策检查」实际不可用,需人工按 SKILL.md 文字规则执行。
  • Windows 绝对路径写死 — SKILL.md 中参考图根与画廊链接均写死 E:\handraw-style\…(file:///E:/…),非 Windows 或非该目录布局的环境需改写;缺失路径时 SKILL.md 只要求「报告限制」,不保证自动定位仓库内资产。
  • 主题文本无清洗,直接入 prompt — 与同批 hand-drawn 的 35 词注入过滤不同,本 skill 对用户主题不做任何过滤/转义;若主题含指令式文本,会被原样送入下游图像模型。
  • 无 LICENSE,商用授权不明 — 仓库未提供许可文件、GitHub API license=null;图像资产约 99MB 且包含以真实创作者(含在世与已故)为索引的风格条目,商用/再分发前需自行确认授权与合规。
  • 宿主强绑定 Codex — 会话初始化直接调用 mcp__codex_app__open_in_codex,agents/openai.yaml 又开启 allow_implicit_invocation(模型可自动触发);在非 Codex 宿主中该初始化步骤会失败(有本地链接回退,但「自动开画廊」的体验缺失)。
  • 资产体积影响安装 — images/ 约 99MB,README 因此要求安装仓库根 `.`;若只装子目录,画廊与参考图会全部失效。
风险提醒:蓝色,知晓即可。本体是 Markdown 指令 + 本地 Python 工具:无网络调用、无凭证读取,写盘限于仓库自身的生成物(styles.json、gallery/index.html、切分出的单图);唯一外部交互是宿主 MCP 在应用内浏览器打开本地 file:// 画廊与把路径交给外部图像工具。列入蓝色(仅本地工具/本地读写)而非绿色,因为它确实带可执行脚本与本地写入。

5第二遍独立确认

  • [ok] style 索引与编号连续性 — styles.json 261 条,首条 001 Gemma Correll / Playful Deadpan Doodle,末条 261 OscarAI;validate_library.py 亦硬断言 [number] == 连续 001–261 且 018 必须映射 'Minimal Deadpan Dialogue Cartoon'。
  • [ok] 画廊离线自足 — gallery/index.html 中 http(s):// 字面量 0 命中,img/button data-src 全部为 ../../images/<sheet>.png 相对路径,无 CDN/字体/统计外链。
  • [discrepancy] SKILL.md 的 Utilities 命令可运行性 — `python scripts/resolve_reference.py --model <model> --style <number>` 实跑报 ModuleNotFoundError: No module named 'style_asset_paths'(脚本把仓库根 <repo>/scripts 插入 sys.path,但该目录与模块不存在,git ls-tree 全仓库无该文件)。同一缺失还被 split_contact_sheets.py 与 validate_library.py 引用(后者另需 contact_sheet_registry)。故 SKILL.md「Utilities」5 条命令中,仅 build_library.py 与 prompt_style.py 当前可运行;这是仓库在 pin commit 上的真实缺陷,非本报告的定位问题。
  • [ok] 模型能力清单的覆盖面 — model_capabilities.json 仅 gpt-image-2 一轮清单、123 条编号条目(strong 78 / none 45);未列编号走 resolve() 的 entry 继承 default(unknown + 传图),即保守回退。SKILL.md 第 12-19 行的三级决策与代码分支逐条对应(name+style / name+style+traits / reference-image)。
  • [ok] 「与作者名气无关」的声明与代码一致 — 决策只读 name_activation/traits_activation 两个字段,代码中不存在任何依赖 attribution.json(名气/在世状态)的分支;attribution 仅被 validate_library.py 用于「deceased 必须带 source」的完整性断言。
  • [discrepancy] 图片资产覆盖与文档一致性 — 实跑 find 统计:images/ 下 19 张分组拼图 + 单图 200 张(001–200 桶)+ 61 张(201–400 桶 = 201–261)+ 45 张 *_grid.jpg(编号 217–261),合计 325 个受控图片文件=git ls-files 中 images/ 的条目数。但 MANIFEST.md 的「已收录图片」只登记 16 张拼图(止于 G_201-216.png),且仍写「images/individual/201-400/201.png–217.png:201–217 的编号单图」「风格编号覆盖:001–217」「当前无缺失编号段」,README/SKILL.md 已按 001–261 描述。判定:MANIFEST.md 为滞后文档,能力面以 261 为准。
  • [discrepancy] 路径可移植性 — SKILL.md 第 21 行把参考图根写死为 `E:\handraw-style\images\individual\{bucket}\{number}.png`,第 37/40 行画廊链接为 `file:///E:/handraw-style/...`;这两处只在作者本机成立(本仓库实际位置为 <repo>/images/individual/...)。跨平台使用需按仓库根改写这三处。
  • [ok] 无网络外发与凭证读取 — 对 5 个脚本与 SKILL.md/agents/openai.yaml 扫描 http/fetch/requests/urllib/socket/api_key/token/secret:脚本侧 0 命中;SKILL.md 唯一外部动作为宿主 MCP 打开 file:// 本地文件与把路径交给图像工具。resolve_reference 的能力数据来自本地 JSON,不需要联网查询模型能力。

6结论

  • 用户界面极简:一个编号承载整套风格定义(原参考名 + 生图名 + 核心特征),配套离线画廊可按编号/风格名筛选,选风格不需要审美词汇。
  • 提示词输出纪律严格,主动抗「提示词膨胀」:禁止追加风格形容、构图建议、质量声明与负向词,只描述主题本身。
  • 把「要不要传参考图」变成数据驱动的确定性判断,未知模型一律保守传图,不会凭感觉赌模型能力。
  • 传图时强制参考图隔离文本,明确主题是内容唯一来源,正面回应图生图的「内容锁定」失败模式。
  • 数据资产完整且可重建:261 条编辑好的风格特征 + 261 张编号单图 + 45 张四宫格参考图,随仓库分发,并配有重建/校验脚本(校验规则含编号连续、deceased 必须有来源、能力取值域)。
  • 适合:适合以编号方式管理画风、希望输出稳定双语提示词的创作者(公众号/小红书/短视频/品牌内容);适合已使用 Codex 且能调 mcp__codex_app__open_in_codex 的用户(可获得首屏画廊初始化);适合想研究「风格库数据化 + 模型能力清单驱动参考图策略」这套做法的 skill 作者。
    不适合:不适合需要开箱即用自动化校验的流水线(Utilities 中 3 条命令当前因缺模块不可运行,需先补齐仓库根 scripts/ 模块);不适合非 Windows 且不愿改路径写死的用户;不适合要求明确开源许可的商用场景(无 LICENSE);不适合想直接出图的用户(默认只出 prompt,生图要靠外部工具);不适合非 Codex 宿主下期待自动画廊初始化的用户。
    安装 agent 直装可复制
    ① 本站镜像 更新 2026-09-15
    方式 A · 人下载镜像包下载 handdraw-style-prompter.tar.gz
    sha256: b025e1b5b2a3616d…
    方式 B · JSON 格式安装指南,复制给 agent
    安装指南
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② 上游 GitHub · 原始来源
    能访问 GitHub?直接去上游安装(实时版,可能已更新)GitHub 原始 ↗
    本页镜像锁定 commit 70bf51d6b4;上游为实时仓库。
    来源信息 GitHub 原始
    作者 / 仓库yang0 / yang0/handraw-style
    Stars1855
    最近推送2026-09-15
    本 skill commit70bf51d6b4
    许可仓库内未发现 LICENSE 文件(git ls-files 未列 LICENSE/COPYING),GitHub API license 字段为 null —— 未声明许可,若需商用请先联系作者确认
    本站信息
    收录日期2026-09-06
    分类设计
    侦查报告AI 侦查 · 2 遍 · 2026-09-06
    本站镜像与 GitHub 原始是不同来源:本站锁定 commit 快照经 /r2 分发;GitHub 为实时上游,内容可能已更新。
    同分类邻近