agentleFS
aivraraivrar/portable-hermes-agent/skills/extensions/portable-comfyui/SKILL.md

portable-comfyui

Skill232 starsChanged 5 months agoMITView on GitHub

Generate and manage images with portable ComfyUI.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user wants to install or manage the portable ComfyUI extension, work with its models or nodes, or generate images …

    line 20
  2. Distinctive:

    If not running, start the management server:

    line 28
  3. Distinctive:

    If not installed yet:

    line 33
  4. Very specific:

    Use api/models/registry to browse all 101+ pre-defined models

    line 159
  5. Distinctive:

    All portable — nothing installed system-wide

    line 163

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ComfyUI Image Generator - Hermes Skill

You have access to a portable ComfyUI installation for AI image generation with Stable Diffusion and other models.

When to Use

Use this skill when the user wants to install or manage the portable ComfyUI extension, work with its models or nodes, or generate images through a local ComfyUI instance.

Server Info

  • Installer API: http://127.0.0.1:5000 (management)
  • ComfyUI Web UI: http://127.0.0.1:8188 (when instance is running)
  • Location: extensions/comfyui/

Quick Start

If not running, start the management server:

cd extensions/comfyui && launcher.bat

If not installed yet:

cd extensions/comfyui && install.bat

Architecture

ComfyUI has two layers:

  1. Installer/Manager API (port 5000) — manages instances, models, nodes
  2. ComfyUI instances (port 8188+) — the actual image generation servers

Management API Endpoints (use via terminal with python httpx)

System Status

import httpx
r = httpx.get("http://127.0.0.1:5000/api/status")   # Overall status
r = httpx.get("http://127.0.0.1:5000/api/gpus")      # GPU info
r = httpx.get("http://127.0.0.1:5000/api/settings")  # Current settings

Install ComfyUI

r = httpx.post("http://127.0.0.1:5000/api/install")        # Full install
r = httpx.post("http://127.0.0.1:5000/api/update")         # Update ComfyUI
r = httpx.post("http://127.0.0.1:5000/api/install/sage-attention")  # Install SageAttention

Instance Management (multi-GPU)

# List all instances
r = httpx.get("http://127.0.0.1:5000/api/instances")

# Create new instance
r = httpx.post("http://127.0.0.1:5000/api/instances", json={
    "gpu": 0,       # GPU index
    "port": 8189,   # Port for this instance
    "vram": "normal" # normal, low, cpu
})

# Start/Stop instances
httpx.post("http://127.0.0.1:5000/api/instances/{id}/start")
httpx.post("http://127.0.0.1:5000/api/instances/{id}/stop")
httpx.post("http://127.0.0.1:5000/api/instances/start-all")
httpx.post("http://127.0.0.1:5000/api/instances/stop-all")

Model Management

# Browse model registry (101+ pre-defined models)
r = httpx.get("http://127.0.0.1:5000/api/models/registry")
r = httpx.get("http://127.0.0.1:5000/api/models/categories")
r = httpx.get("http://127.0.0.1:5000/api/models/search?q=sdxl")

# See locally installed models
r = httpx.get("http://127.0.0.1:5000/api/models/local")

# Download a model
r = httpx.post("http://127.0.0.1:5000/api/models/download", json={
    "id": "sd15-base"  # Model ID from registry
})

Custom Nodes

# Browse node registry
r = httpx.get("http://127.0.0.1:5000/api/nodes/registry")

# See installed nodes
r = httpx.get("http://127.0.0.1:5000/api/nodes/installed")

# Install custom node
r = httpx.post("http://127.0.0.1:5000/api/nodes/install", json={
    "url": "https://github.com/author/custom-node.git"
})

# Update nodes
httpx.post("http://127.0.0.1:5000/api/nodes/update-all")

ComfyUI Target Directory

r = httpx.get("http://127.0.0.1:5000/api/comfyui/target")           # Current target
httpx.put("http://127.0.0.1:5000/api/comfyui/target", json={"path": "..."})  # Change target
httpx.post("http://127.0.0.1:5000/api/comfyui/target/reset")        # Reset to default

Jobs & Logs

r = httpx.get("http://127.0.0.1:5000/api/jobs")          # List background jobs
r = httpx.get("http://127.0.0.1:5000/api/jobs/{id}")      # Job status
r = httpx.get("http://127.0.0.1:5000/api/logs")           # Server logs

Cleanup

httpx.post("http://127.0.0.1:5000/api/purge")      # Remove ComfyUI (keep models)
httpx.post("http://127.0.0.1:5000/api/purge-all")   # Remove everything

Generating Images (via ComfyUI Instance API)

Once a ComfyUI instance is running (e.g., on port 8189):

# Queue a prompt/workflow
r = httpx.post("http://127.0.0.1:8189/prompt", json={
    "prompt": {workflow_json},
    "client_id": "hermes"
})

# Get generated images
r = httpx.get("http://127.0.0.1:8189/view", params={"filename": "output.png"})

Available Tools (use these instead of raw API calls)

ToolWhat it does
comfyui_statusCheck ComfyUI server status and system info
comfyui_instancesList all instances with status, GPU, port
comfyui_instance_startStart a ComfyUI instance
comfyui_instance_stopStop a running instance
comfyui_generateGenerate an image from text prompt
comfyui_modelsList locally installed models
comfyui_nodesList installed custom nodes

Tips

  • Install ComfyUI first via the installer API, then download models, then start an instance
  • Use api/models/registry to browse all 101+ pre-defined models
  • Each GPU can run its own instance on a separate port
  • The web UI at the instance port provides a visual workflow editor
  • Models are stored in extensions/comfyui/comfyui/models/
  • All portable — nothing installed system-wide

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.