# Send ComfyUI Painter to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "comfyui-painter",
    "name": "ComfyUI Painter",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/zeron-G/comfyui-painter",
    "canonicalUrl": "https://clawhub.ai/zeron-G/comfyui-painter",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/comfyui-painter",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=comfyui-painter",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "DESIGN.md",
      "SKILL.md",
      "config.json",
      "scripts/auto_shutdown.py",
      "scripts/auto_tune.py",
      "scripts/civitai.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "comfyui-painter",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T01:11:46.142Z",
      "expiresAt": "2026-05-09T01:11:46.142Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=comfyui-painter",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=comfyui-painter",
        "contentDisposition": "attachment; filename=\"comfyui-painter-2.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "comfyui-painter"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/comfyui-painter"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/comfyui-painter",
    "downloadUrl": "https://openagent3.xyz/downloads/comfyui-painter",
    "agentUrl": "https://openagent3.xyz/skills/comfyui-painter/agent",
    "manifestUrl": "https://openagent3.xyz/skills/comfyui-painter/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/comfyui-painter/agent.md"
  }
}
```
## Documentation

### ComfyUI Painter v2.0

通过 ComfyUI API 在本地 RTX 5090 上生成图片，集成 CivitAI 模型管理。

### 工作流程

检查 ComfyUI 是否运行，未运行则自动启动
解析用户需求：提示词、模型、参数
自动调参：根据模型从 CivitAI 获取推荐参数（或使用 config 缓存）
调用 generate.py 生成图片
将图片发送到 Discord
心跳时调用 auto_shutdown.py 检查空闲关闭

### 脚本路径

所有脚本相对于此 skill 目录：

scripts/comfyui_manager.py — 启动/关闭/状态
scripts/generate.py — 生成图片（Python API 调用）
scripts/auto_shutdown.py — 空闲自动关闭检查
scripts/civitai.py — CivitAI 集成（搜索/详情/下载/更新检查/推荐参数）
scripts/auto_tune.py — 自动调参（从 CivitAI 样图元数据提取推荐设置）
config.json — 配置文件（模型别名、默认参数、路径、CivitAI 关联）

### 启动 ComfyUI

import scripts.comfyui_manager as mgr
mgr.start()  # 自动从 WSL 启动 Windows ComfyUI 进程

### 生成图片

from scripts.generate import generate
result = generate(
    positive="your prompt here",
    model="noobv6",        # 见下方模型别名
    batch_size=4,
    width=1024,
    height=1536,
    steps=20,
    cfg=5,
)
# result = {"ok": True, "images": ["/mnt/d/.../sdi_00201_.png", ...]}

### 带自动调参生成

from scripts.auto_tune import get_tuned_params
from scripts.generate import generate

params = get_tuned_params("janku")  # 从 CivitAI 获取推荐参数
result = generate(
    positive="your prompt",
    model="janku",
    steps=params["steps"],
    cfg=params["cfg"],
    width=params["width"],
    height=params["height"],
)

### CivitAI 搜索模型

python3 scripts/civitai.py search "anime checkpoint" --limit 5

### CivitAI 查看模型详情

python3 scripts/civitai.py info 140272

### CivitAI 获取推荐参数

python3 scripts/civitai.py params 140272

### CivitAI 检查本地模型更新

python3 scripts/civitai.py check-updates

⚠️ 需要计算 SHA256，每个文件约 30 秒

### CivitAI 下载模型

python3 scripts/civitai.py download "https://civitai.com/api/download/models/XXXXX" --filename model_name.safetensors

### 更新所有模型的推荐参数到 config

python3 scripts/auto_tune.py update-all

### 发送图片到 Discord

生成完成后，将图片 cp 到 workspace 临时目录，用 message tool 发送到 #🎨-画图 频道（channel:1476675131404193823）。

### 关闭 ComfyUI

import scripts.comfyui_manager as mgr
mgr.stop()

### 模型别名

别名CheckpointCivitAI ID版本风格hassakuhassakuXLIllustrious_v34140272v3.4Illustrious 动漫noobv6pornmasterPro_noobV61045588noob-V6NoobAI 动漫（默认）noobv4pornmasterPro_noobV41045588noob-V4NoobAI 动漫（旧版）sdxlv8pornmaster_proSDXLV882543Pro-SDXL-V8SDXL 写实jankuJANKUTrainedNoobaiRouwei_v691277670v6.9NoobAI+RouWei 混合nova3dnova3DCGXL_ilV80715287IL v8.03DCG/2.5DunholyunholyDesireMixSinister_v701307857v7.0暗黑美学fluxflux1-dev-bnb-nf4-v2638187BNB NF4 v2Flux 写实

### 自动调参（model_params）

每个模型在 config.json 中有 CivitAI 推荐的最佳参数。生成时：

用户指定的参数优先
未指定则使用 config.json → model_params[alias] 的推荐值
model_params 也没有则使用 defaults 全局默认

模型StepsCFG采样器hassaku207euler_ajanku207euler_anoobv6207euler_asdxlv8255dpmpp_2mnova3d207euler_aunholy207euler_aflux201euler

### CivitAI 配置

API Key 存于 ~/.openclaw/workspace/credentials/civitai.md，格式：

# CivitAI API Key
Token: your_api_key_here

### 提示词优化指南

用户给自然语言描述时，转换为专业 Stable Diffusion 提示词：

质量标签在前：masterpiece, best quality, absurdres, highres
用 BREAK 分隔不同语义段
动作/姿势用专业标签：mating press, pov, from below, spread legs
细节标签：detailed skin, sweat, wet skin, motion blur, dynamic angle
负面提示词加入：censored, mosaic censoring, bar censor

### 心跳集成

每次心跳时运行 auto_shutdown.py 检查空闲时间，超过 15 分钟无使用自动关闭 ComfyUI 释放显存。
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: zeron-G
- Version: 2.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-02T01:11:46.142Z
- Expires at: 2026-05-09T01:11:46.142Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/comfyui-painter)
- [Send to Agent page](https://openagent3.xyz/skills/comfyui-painter/agent)
- [JSON manifest](https://openagent3.xyz/skills/comfyui-painter/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/comfyui-painter/agent.md)
- [Download page](https://openagent3.xyz/downloads/comfyui-painter)