home / skills / openclaw / skills / comfyui-runner

comfyui-runner skill

/skills/xtopher86/comfyui-runner

This skill manages a local ComfyUI instance by starting, stopping, and reporting status to keep your AI workflow reliable.

npx playbooks add skill openclaw/skills --skill comfyui-runner

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
1.0 KB
---
name: comfyui-runner
description: Start/stop/status for a ComfyUI instance.
metadata: {"clawdbot":{"emoji":"🧩","requires":{"bins":["node","curl"]},"entry":"bin/cli.js"}}
---

# comfyui-runner

## Purpose
Start, stop, and check the status of a local ComfyUI instance.

## Configuration
- `COMFYUI_HOST`: Host/IP of the ComfyUI server (default `192.168.179.111`).
- `COMFYUI_PORT`: Port of the ComfyUI server (default `28188`).
- `COMFYUI_USER`: Optional username for basic auth.
- `COMFYUI_PASS`: Optional password for basic auth.

These can be set via environment variables or a `.env` file in the skill directory.

## Usage
```json
{
  "action": "run" | "stop" | "status"
}
```

- `run`: Starts the ComfyUI server if not already running.
- `stop`: Stops the ComfyUI server.
- `status`: Returns whether the server is reachable.

## Example
```json
{"action": "status"}
```

## Notes
This skill assumes the ComfyUI binary is available in the system PATH or in the same directory as the skill. It uses `curl` to ping the `/health` endpoint.

Overview

This skill manages a local ComfyUI instance by providing start, stop, and status controls. It targets simple automation and remote-check workflows for ComfyUI deployments and requires the ComfyUI binary to be accessible on the host. Configuration is driven by environment variables or a .env file for host, port, and optional basic auth.

How this skill works

The skill issues commands to launch or terminate the ComfyUI process and uses an HTTP health check to verify reachability. It expects COMFYUI_HOST and COMFYUI_PORT (with optional COMFYUI_USER and COMFYUI_PASS) to locate and authenticate to the server. The status action performs a curl-like request to the /health endpoint; run and stop invoke the local binary or system process to control the service.

When to use it

  • Automating startup of a local ComfyUI instance before job runs or tests.
  • Stopping the ComfyUI process as part of resource cleanup or shutdown scripts.
  • Monitoring or checking service availability from automation pipelines.
  • Embedding ComfyUI lifecycle control in CI/CD or scheduled tasks.
  • Running on a machine where the ComfyUI binary is on PATH or alongside the skill.

Best practices

  • Set COMFYUI_HOST and COMFYUI_PORT via environment variables or a .env file to avoid hardcoding.
  • Provide COMFYUI_USER and COMFYUI_PASS only if ComfyUI is configured with basic auth.
  • Ensure the ComfyUI binary is executable and accessible from the skill's runtime environment.
  • Run start/stop operations with appropriate permissions or service management where required.
  • Use the status action before attempting start/stop to avoid unnecessary restarts.

Example use cases

  • Start ComfyUI automatically when a workstation boots or when an AI job begins.
  • Stop ComfyUI at the end of the day to free GPU and memory resources.
  • Check service health from an orchestration script and alert if /health is unreachable.
  • Wrap ComfyUI lifecycle in a test harness that needs a clean instance per test run.
  • Integrate with home automation to expose ComfyUI availability to other systems.

FAQ

What configuration is required?

Set COMFYUI_HOST and COMFYUI_PORT; supply COMFYUI_USER and COMFYUI_PASS only if basic auth is enabled. These can be environment variables or in a .env file.

Where must the ComfyUI binary be located?

The ComfyUI binary should be on the system PATH or in the same directory as the skill so the runner can invoke it.