Comfyui Local
Generate images using a local ComfyUI instance with hardcoded server address and allowlisted workflows. Secure by design — no arbitrary file reads, no arbitr...
Hypnotronic3
@hypnotronic3
What This Skill Does
Generates images by sending prompts to a local ComfyUI server via HTTP API. Uses a hardcoded server address from environment variables and only runs allowlisted workflow files from the skill's workflows directory.
Replaces insecure ComfyUI integrations by eliminating arbitrary file reads, arbitrary server connections, and shell injection vulnerabilities.
When to Use It
- Generate an image from a text prompt using a local ComfyUI instance
- Create images with a specific allowlisted workflow like z-image-turbo
- Set custom image dimensions for generation
- Add a negative prompt to refine image output
- Batch generate images from a list of prompts
Install
$ openclaw skills install @hypnotronic3/comfyui-localComfyUI Local — Secure Image Generation
Generate images using your local ComfyUI instance. Designed with security as a priority:
- Server address is configured, not passed as argument — no connecting to arbitrary servers
- Workflows are allowlisted — only files in the
workflows/directory can be used - No shell injection surface — prompts are passed as JSON, never interpolated into shell commands
- Path traversal blocked —
../and absolute paths are rejected
Setup
- Server address: Set the
COMFYUI_SERVER_ADDRESSenvironment variable (e.g.,http://192.168.1.10:8188orhttp://127.0.0.1:8188). - ComfyUI API mode: Ensure "Enable Dev mode" is turned on in your ComfyUI settings.
Usage
Generate an image with a prompt
python3 {skillDir}/scripts/comfy_gen.py --prompt "a serene mountain lake at sunset"
Generate with a specific allowlisted workflow
python3 {skillDir}/scripts/comfy_gen.py --prompt "a cyberpunk cityscape" --workflow z-image-turbo
Generate with custom dimensions
python3 {skillDir}/scripts/comfy_gen.py --prompt "a cat in a spacesuit" --width 768 --height 512
Generate with negative prompt
python3 {skillDir}/scripts/comfy_gen.py --prompt "a portrait photo" --negative "blurry, distorted, low quality"
Available Workflows
Place API-format workflow JSON files in the workflows/ directory. They are automatically available by filename (without .json extension).
The included workflows:
| Workflow | Description |
|---|---|
z-image-turbo | Fast generation, 10 steps, Euler sampler |
z-image-biglove | Higher quality, more steps |
Security Design
This skill fixes the three vulnerabilities found in other ComfyUI skills:
1. No arbitrary file reads
The original skill accepted --workflow /any/path/on/disk.json, allowing an agent to read any JSON file on the system. This version only allows workflows from the workflows/ directory within the skill folder. Paths with .., /, or \ are rejected.
2. No arbitrary server connections
The original skill accepted the server address as a command-line argument, allowing connections to any server. This version reads COMFYUI_SERVER_ADDRESS from the environment only. No command-line override.
3. No shell injection
The original skill constructed shell commands with user-provided arguments. This version uses argparse and passes all data as structured JSON over HTTP — no shell interpolation.
How It Works
- Reads
COMFYUI_SERVER_ADDRESSfrom environment (required) - Validates the workflow name against allowlisted files in
workflows/ - Loads the workflow, injects the prompt and seed
- Sends the workflow to ComfyUI via HTTP API
- Polls for completion, downloads the result image
- Saves to
{skillDir}/output/and prints aMEDIA:path
Top skills in this category
Nano Banana Pro
@steipeteGenerate/edit images with Nano Banana Pro (Gemini 3 Pro Image). Use for image create/modify requests incl. edits. Supports text-to-image + image-to-image; 1K/2K/4K; use --input-image.
AdMapix
@fly0pantsAdMapix raw data layer for ad creatives, apps, rankings, downloads/revenue, and market metadata. Returns structured JSON from the AdMapix API; the calling ag...
YouTube Watcher
@michaelgatharaFetch and read transcripts from YouTube videos. Use when you need to summarize a video, answer questions about its content, or extract information from it.
SuperDesign
@mpociotExpert frontend design guidelines for creating beautiful, modern UIs. Use when building landing pages, dashboards, or any user interface.
Video Frames
@steipeteExtract frames or short clips from videos using ffmpeg.