Community图像github.com

refkit

Prepare a reference image for manual painting/drawing: notan, 5-value study, grayscale, grid, limited palette with paint mixing recipes, printable A4 sheets. Use when the user needs to draw or paint from a photo, asks for values, grid, or paint mixes, or types /refkit.

refkit 是什么?

refkit is a skill that transforms a user’s reference photo into practical, print-ready tools for hand drawing or painting. Unlike many image-skills, Claude does not generate the artwork—instead, it prepares structured outputs like notan (2‑value and 3‑value simplified shapes), 5‑value tonal studies, perceptual grayscale, proportional grids, and a limited palette with acrylic/oil/watercolour mixing recipes (using a Kubelka-Munk model). All results are written to a `refkit_out/` folder as both individual images and a consolidated A4 landscape PDF that can be pinned at the easel. The skill runs on any system with Python 3 and the required libraries (Pillow, NumPy, OpenCV, scikit-image, scikit-learn) and does not rely on an image generation model. It works in Cursor, Codex, and other AI‑assistants that can execute shell commands. The assistant should guide the user through canvas size, medium, and optional parameters (grid squares, palette size, paint medium), then run the script and present the sheet first, followed by individual images if requested.

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/thibaud360/refkit/tree/HEAD/skills/refkit

Installed? Explore more 图像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

refkit 是做什么的?

为手绘或手工绘画的人准备的参考图预处理工具。Claude 不替用户画图:它准备好了参考资料,让用户自己去画。运行 scripts/refkit.py(Python 3, Pillow, NumPy, OpenCV, scikit-image, scikit-learn)。无需图像模型。

它会生成什么(在 refkit_out/ 中)

文件内容
*_notan.png2 值和 3 值不丹(notan),每块色值占比
*_values5.png5 值研究,附带色值标尺图例
*_gray.png灰度图(感知明度,色阶拉伸)
*_grid.png带绘画网格的照片,列 A, B, C,行 1, 2, 3
*_palette.png3–10 种颜色(K‑means 聚类),每种颜色附有油漆配方
*_sheet.png、*_sheet.pdf所有内容整合到一张 A4 横向纸面上,方便打印并钉在画架上

步骤

  1. 找到用户的照片(用户自己的照片或画稿)。确保依赖包已安装:pip install pillow numpy opencv-python-headless scikit-image scikit-learn(如果 pip 要求,可以加 --break-system-packages)。
  2. 仅当尚未说明时,询问:画布尺寸(厘米)以及绘画媒介(油画、丙烯或水粉 = oil/gouache;水彩 = watercolor)。不要反复追问,默认值即可。
  3. 运行:python scripts/refkit.py PHOTO -o refkit_out [options]
  4. 在发送之前,至少先查看一览页和网格及调色板。如果某个配方看起来奇怪,说明这些配比只是估算。
  5. 先发送一览页(PNG 和 PDF),然后如果被问到,再发送单个图片。提供一个微调选项:增加或减少网格方格数、另选调色板大小、更换媒介。

选项,以及用户怎么说

  • --canvas 40x50(厘米,或 A4…A1)。照片会按该比例中心裁剪,用于所有输出。当用户说出画布或纸张尺寸时使用。
  • --grid N 长边上的方格数(默认 8)。“更多细节”意味着更大的 N。
  • --grid-cm 5 方格边长(厘米);需要搭配 --canvas。用于“每 5 厘米一个网格”。
  • --palette N 颜色数量,3 到 10(默认 6)。“有限调色板”指 4 到 6。
  • --paints oil|watercolor|gouache。水彩没有白色:提亮靠水,白色区域留白纸面。
  • --values 2,3,5 需要生成哪些研究图(默认全部)。
  • --width PX 工作尺寸(默认 1600),--dpi 一览页分辨率(默认 200),--strip 同时输出处理前后的对比条。

示例:python scripts/refkit.py photo.jpg --canvas 30x40 --grid-cm 5 --palette 7 --paints oil

如何介绍它

把它定位为帮助用户自己画画的工具:notan 展示了大的形状,色值研究指出了明暗分布,网格用于临摹底稿,配方则是一个起点。永远不要称之为 AI 艺术。配方来自十种常用管装颜料的 Kubelka‑Munk 模型(钛白、象牙黑、镉黄浅、黄赭、镉红、茜素深红、群青、酞菁蓝、生赭、生赭)。不同品牌有差异,所以提醒用户先在自己的废纸上试色。配比按体积计算。

如果脚本缺失

git clone --depth 1 https://github.com/thibaud360/refkit /tmp/refkit 然后使用 /tmp/refkit/skills/refkit/scripts/refkit.py。

相关技能