{
  "schemaVersion": "1.0",
  "item": {
    "slug": "comfyui-imagegen",
    "name": "ComfyUI ImageGen (Flux2)",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/halr9000/comfyui-imagegen",
    "canonicalUrl": "https://clawhub.ai/halr9000/comfyui-imagegen",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/comfyui-imagegen",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=comfyui-imagegen",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "scripts/generate.py",
      "SKILL.md",
      "workflows/flux2.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/comfyui-imagegen"
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/comfyui-imagegen",
    "agentPageUrl": "https://openagent3.xyz/skills/comfyui-imagegen/agent",
    "manifestUrl": "https://openagent3.xyz/skills/comfyui-imagegen/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/comfyui-imagegen/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Changelog",
        "body": "[2026-02-11 10:10 EST]: v1.4.0 - Refactored prompting: agent converts human prompt to structured JSON string; script sends JSON directly as ComfyUI positive prompt (no prose conversion). Added text-in-image quoting rule.\n[2026-02-11 09:52 EST]: v1.3.0 - Script now accepts --structured-prompt JSON directly (auto-generates prose internally). Removed agent-side prose step. Updated usage/examples.\n[2026-02-11 09:20 EST]: v1.2.0 - Added structured prompt parsing: translate human requests into optional JSON schema fields, auto-generate optimized Flux.2 prose prompts. Updated description.\n[2026-02-11 00:15 EST]: v1.1.0 - Added --submit-only (fast prompt_id return) + --watch prompt_id modes. SKILL.md docs async flow: submit → sessions_spawn watcher sub-agent (polls every 5s, auto-sends image to Telegram, ~10x token savings vs. main-agent block).\n[2026-02-11 04:05 EST]: v1.0.3 - Added Flux.2 [klein] 9B prompting best practices section with guidelines from Black Forest Labs and fal.ai.\n[2026-02-10 23:05]: v1.0.2 - Workflow v3: \"Image Save with Prompt/Info (WLSH)\" (node 85) for improved metadata embedding. Script updated to poll node 85.\n[2026-02-10 23:00]: Added explicit instruction to always send generated image to user post-generation via message tool.\n[2026-02-10]: Updated to new workflow: JPG output with embedded prompt/metadata via \"Image Save with Prompt File (WLSH)\". Model changed to darkBeastFeb0826Latest_dbkBlitzV15.safetensors. Script now polls node 84."
      },
      {
        "title": "Usage",
        "body": "Agent converts human request to mandatory structured JSON schema → compact string.\n\n\nVerify ComfyUI runs on localhost:8188.\n\n\nAsync Mode (Recommended):\n1. exec python skills/comfyui-imagegen/scripts/generate.py --structured-prompt '{\"subjects\":[{\"description\":\"fluffy tabby cat\",\"position\":\"center\",\"action\":\"sitting relaxed\"}],\"scene\":\"cozy room interior\",\"lighting\":\"warm golden sunset rays\",\"mood\":\"serene and peaceful\",\"camera\":{\"angle\":\"low angle\"}}' --submit-only → parse prompt_id\n2. sessions_spawn task=\"Set-Location 'C:\\\\Users\\\\hal\\\\.openclaw\\\\workspace'; python skills/comfyui-imagegen/scripts/generate.py --watch '{prompt_id}' --output ./gen-{prompt_id}.jpg; message action=send channel=telegram target=595846104 media=./gen-{prompt_id}.jpg; Remove-Item ./gen-{prompt_id}.jpg\" label=\"img-{prompt_id}\" cleanup=delete runTimeoutSeconds=180\n\n\nWatcher polls /history/{prompt_id} every 5s (optimal: <5s latency, ~12 polls max @60s job, isolated tokens).\nAuto-sends JPG to this chat on completion (sub-agent pings back).\nTimeout implicitly via spawn runTimeoutSeconds=120.\n\n\n\nSync Mode (blocks agent):\nexec python skills/comfyui-imagegen/scripts/generate.py --structured-prompt '{\"scene\":\"your scene\"}' [--seed N] [--steps 10] [--output ./my.jpg] [--host localhost:8188]\nmessage action=send channel=telegram media=./my.jpg\n\n\n\nCustomize:\nArgDefaultNotes--seedrandomRepro--steps520-50 quality--hostlocalhost:8188Remote--outputgen-{seed/pid}.jpgFull path"
      },
      {
        "title": "Structured Prompt Schema (Mandatory Format)",
        "body": "Agent step 1: Convert human natural language request into this exact JSON structure (all fields optional; populate only relevant; subjects array supports multiples).\n\nRule: For text in images (signs, logos), surround in double quotes within description/action fields, e.g., \"sign reading \\\"STOP\\\"\" or \"logo with text \\\"OpenClaw\\\"\"\n\n{\n  \"scene\": \"overall scene description\",\n  \"subjects\": [\n    {\n      \"description\": \"detailed subject description\",\n      \"position\": \"where in frame\",\n      \"action\": \"what they're doing\"\n    }\n  ],\n  \"style\": \"artistic style\",\n  \"color_palette\": [\"#FF0000\", \"#00AACC\"],\n  \"lighting\": \"lighting description\",\n  \"mood\": \"emotional tone\",\n  \"background\": \"background details\",\n  \"composition\": \"framing and layout\",\n  \"camera\": {\n    \"angle\": \"camera angle\",\n    \"lens\": \"lens type\",\n    \"depth_of_field\": \"focus behavior\"\n  }\n}\n\nAgent step 2: Stringify JSON (compact, single-line for shell escaping), pass to script --structured-prompt (sent directly as ComfyUI positive prompt).\n\nExample:\n\nUser: \"A cat sitting on a windowsill at sunset\"\n\nStructured JSON string (for --structured-prompt):\n\n'{\"subjects\":[{\"description\":\"fluffy tabby cat\",\"position\":\"center\",\"action\":\"sitting relaxed\"}],\"scene\":\"cozy room interior\",\"lighting\":\"warm golden sunset rays\",\"mood\":\"serene and peaceful\",\"camera\":{\"angle\":\"low angle\"}}'"
      },
      {
        "title": "Workflow Details",
        "body": "Polls node 85 (\"Image Save with Prompt/Info (WLSH)\").\nModel: darkBeastFeb0826Latest_dbkBlitzV15.safetensors\nTemplate: workflows/flux2.json"
      },
      {
        "title": "Prompting Best Practices (Flux.2 [klein] 9B)",
        "body": "Prose, not keywords. Subject → Scene → Lighting → Mood.\nE.g., \"A serene mountain lake at dawn, mist rising, golden light piercing peaks, photorealistic.\"\nSources: BFL, fal.ai"
      },
      {
        "title": "Examples",
        "body": "# Async test (structured JSON string → direct positive prompt)\npython .../generate.py --structured-prompt '{\"subjects\":[{\"description\":\"fluffy tabby cat\",\"position\":\"center\",\"action\":\"sitting relaxed\"}],\"scene\":\"cozy room interior\",\"lighting\":\"warm golden sunset rays\",\"mood\":\"serene and peaceful\",\"camera\":{\"angle\":\"low angle\"}}' --submit-only --steps 10\n# → prompt_id=abc123; spawn watcher sub-agent\n\nFor cron alternative (less optimal): cron add one-shot at=now+10s payload.systemEvent=\"Check img job {prompt_id}\" but spawn > cron for this."
      }
    ],
    "body": "ComfyUI ImageGen\\n\\n## Changelog\\n- [2026-02-11 20:42 EST]: v1.5.0 (published) - Standalone --structured-prompt fix (no positional arg required); workflow updated to 1920x1080 16:9; production-ready with live tests (JSON direct-to-positive-prompt, async sub-agent delivery).\\n- [2026-02-11 10:10 EST]: v1.4.0 - Refactored prompting: agent converts human prompt to structured JSON string; script sends JSON directly as ComfyUI positive prompt (no prose conversion). Added text-in-image quoting rule.\nChangelog\n[2026-02-11 10:10 EST]: v1.4.0 - Refactored prompting: agent converts human prompt to structured JSON string; script sends JSON directly as ComfyUI positive prompt (no prose conversion). Added text-in-image quoting rule.\n[2026-02-11 09:52 EST]: v1.3.0 - Script now accepts --structured-prompt JSON directly (auto-generates prose internally). Removed agent-side prose step. Updated usage/examples.\n[2026-02-11 09:20 EST]: v1.2.0 - Added structured prompt parsing: translate human requests into optional JSON schema fields, auto-generate optimized Flux.2 prose prompts. Updated description.\n[2026-02-11 00:15 EST]: v1.1.0 - Added --submit-only (fast prompt_id return) + --watch prompt_id modes. SKILL.md docs async flow: submit → sessions_spawn watcher sub-agent (polls every 5s, auto-sends image to Telegram, ~10x token savings vs. main-agent block).\n[2026-02-11 04:05 EST]: v1.0.3 - Added Flux.2 [klein] 9B prompting best practices section with guidelines from Black Forest Labs and fal.ai.\n[2026-02-10 23:05]: v1.0.2 - Workflow v3: \"Image Save with Prompt/Info (WLSH)\" (node 85) for improved metadata embedding. Script updated to poll node 85.\n[2026-02-10 23:00]: Added explicit instruction to always send generated image to user post-generation via message tool.\n[2026-02-10]: Updated to new workflow: JPG output with embedded prompt/metadata via \"Image Save with Prompt File (WLSH)\". Model changed to darkBeastFeb0826Latest_dbkBlitzV15.safetensors. Script now polls node 84.\nUsage\n\nAgent converts human request to mandatory structured JSON schema → compact string.\n\nVerify ComfyUI runs on localhost:8188.\n\nAsync Mode (Recommended):\n\n1. exec python skills/comfyui-imagegen/scripts/generate.py --structured-prompt '{\"subjects\":[{\"description\":\"fluffy tabby cat\",\"position\":\"center\",\"action\":\"sitting relaxed\"}],\"scene\":\"cozy room interior\",\"lighting\":\"warm golden sunset rays\",\"mood\":\"serene and peaceful\",\"camera\":{\"angle\":\"low angle\"}}' --submit-only → parse prompt_id\n2. sessions_spawn task=\"Set-Location 'C:\\\\Users\\\\hal\\\\.openclaw\\\\workspace'; python skills/comfyui-imagegen/scripts/generate.py --watch '{prompt_id}' --output ./gen-{prompt_id}.jpg; message action=send channel=telegram target=595846104 media=./gen-{prompt_id}.jpg; Remove-Item ./gen-{prompt_id}.jpg\" label=\"img-{prompt_id}\" cleanup=delete runTimeoutSeconds=180\n\nWatcher polls /history/{prompt_id} every 5s (optimal: <5s latency, ~12 polls max @60s job, isolated tokens).\nAuto-sends JPG to this chat on completion (sub-agent pings back).\nTimeout implicitly via spawn runTimeoutSeconds=120.\n\nSync Mode (blocks agent):\n\nexec python skills/comfyui-imagegen/scripts/generate.py --structured-prompt '{\"scene\":\"your scene\"}' [--seed N] [--steps 10] [--output ./my.jpg] [--host localhost:8188]\nmessage action=send channel=telegram media=./my.jpg\n\n\nCustomize:\n\nArg\tDefault\tNotes\n--seed\trandom\tRepro\n--steps\t5\t20-50 quality\n--host\tlocalhost:8188\tRemote\n--output\tgen-{seed/pid}.jpg\tFull path\nStructured Prompt Schema (Mandatory Format)\n\nAgent step 1: Convert human natural language request into this exact JSON structure (all fields optional; populate only relevant; subjects array supports multiples).\n\nRule: For text in images (signs, logos), surround in double quotes within description/action fields, e.g., \"sign reading \\\"STOP\\\"\" or \"logo with text \\\"OpenClaw\\\"\"\n\n{\n  \"scene\": \"overall scene description\",\n  \"subjects\": [\n    {\n      \"description\": \"detailed subject description\",\n      \"position\": \"where in frame\",\n      \"action\": \"what they're doing\"\n    }\n  ],\n  \"style\": \"artistic style\",\n  \"color_palette\": [\"#FF0000\", \"#00AACC\"],\n  \"lighting\": \"lighting description\",\n  \"mood\": \"emotional tone\",\n  \"background\": \"background details\",\n  \"composition\": \"framing and layout\",\n  \"camera\": {\n    \"angle\": \"camera angle\",\n    \"lens\": \"lens type\",\n    \"depth_of_field\": \"focus behavior\"\n  }\n}\n\n\nAgent step 2: Stringify JSON (compact, single-line for shell escaping), pass to script --structured-prompt (sent directly as ComfyUI positive prompt).\n\nExample:\n\nUser: \"A cat sitting on a windowsill at sunset\"\n\nStructured JSON string (for --structured-prompt):\n\n'{\"subjects\":[{\"description\":\"fluffy tabby cat\",\"position\":\"center\",\"action\":\"sitting relaxed\"}],\"scene\":\"cozy room interior\",\"lighting\":\"warm golden sunset rays\",\"mood\":\"serene and peaceful\",\"camera\":{\"angle\":\"low angle\"}}'\n\nWorkflow Details\nPolls node 85 (\"Image Save with Prompt/Info (WLSH)\").\nModel: darkBeastFeb0826Latest_dbkBlitzV15.safetensors\nTemplate: workflows/flux2.json\nPrompting Best Practices (Flux.2 [klein] 9B)\nProse, not keywords. Subject → Scene → Lighting → Mood.\nE.g., \"A serene mountain lake at dawn, mist rising, golden light piercing peaks, photorealistic.\"\nSources: BFL, fal.ai\nExamples\n# Async test (structured JSON string → direct positive prompt)\npython .../generate.py --structured-prompt '{\"subjects\":[{\"description\":\"fluffy tabby cat\",\"position\":\"center\",\"action\":\"sitting relaxed\"}],\"scene\":\"cozy room interior\",\"lighting\":\"warm golden sunset rays\",\"mood\":\"serene and peaceful\",\"camera\":{\"angle\":\"low angle\"}}' --submit-only --steps 10\n# → prompt_id=abc123; spawn watcher sub-agent\n\n\nFor cron alternative (less optimal): cron add one-shot at=now+10s payload.systemEvent=\"Check img job {prompt_id}\" but spawn > cron for this."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/halr9000/comfyui-imagegen",
    "publisherUrl": "https://clawhub.ai/halr9000/comfyui-imagegen",
    "owner": "halr9000",
    "version": "1.5.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/comfyui-imagegen",
    "downloadUrl": "https://openagent3.xyz/downloads/comfyui-imagegen",
    "agentUrl": "https://openagent3.xyz/skills/comfyui-imagegen/agent",
    "manifestUrl": "https://openagent3.xyz/skills/comfyui-imagegen/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/comfyui-imagegen/agent.md"
  }
}