comfyui-gateway

comfyui-gateway is a skill for Claude Code, Codex from hainamchung/agent-assistant. It costs 41 tokens per session (4,179 once invoked), scanned A, original, MIT.

A REST API gateway that lets applications send jobs to ComfyUI image-generation servers. It manages workflows, queues, callbacks, caching, access control, request limits, and image delivery.

In plain words
What is it for?
Use it to expose ComfyUI workflows through an API, queue image jobs, receive webhook notifications, cache results, and return generated images by URL or as base64 data.
Why use it?
It gives applications a consistent and controlled way to use ComfyUI without each client handling queues, authentication, storage, and results separately.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions Codex; mentions Gemini CLI.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is npx tsx src/cli/index.ts add-workflow ./workflows/sdxl_realism_v1.json \.

Good fit Use it to expose ComfyUI workflows through an API, queue image jobs, receive webhook notifications, cache results, and return generated images by URL or as base64 data.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/hainamchung/agent-assistant
agentmods
npx agentmods add skills/hainamchung/agent-assistant/comfyui-gateway

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for comfyui-gateway

README.md
[![agentmods](https://agentmods.dev/badge/skills/hainamchung/agent-assistant/comfyui-gateway/github.svg)](https://agentmods.dev/skills/hainamchung/agent-assistant/comfyui-gateway)
Your own site
<a href="https://agentmods.dev/skills/hainamchung/agent-assistant/comfyui-gateway"><img src="https://agentmods.dev/badge/skills/hainamchung/agent-assistant/comfyui-gateway/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for comfyui-gateway

Your own site · 80×15
<a href="https://agentmods.dev/skills/hainamchung/agent-assistant/comfyui-gateway"><img src="https://agentmods.dev/badge/skills/hainamchung/agent-assistant/comfyui-gateway.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.04179
Opus 5 $0.00020 $0.02090
Sonnet 5 $0.00008 $0.00836
Haiku 4.5 $0.00004 $0.00418

Measured 7d ago against content hash db1864100ad2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

comfyui-gateway scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

│ (curl, n8n, │ │ │ │ Server │
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

skills/comfyui-gateway/SKILL.md · 424 lines

How it starts

The opening of the file, as written. The whole thing — 424 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ComfyUI Gateway

Overview

REST API gateway for ComfyUI servers. Workflow management, job queuing, webhooks, caching, auth, rate limiting, and image delivery (URL + base64).

When to Use This Skill

  • When the user mentions "comfyui" or related topics
  • When the user mentions "comfy ui" or related topics
  • When the user mentions "stable diffusion api gateway" or related topics
  • When the user mentions "gateway comfyui" or related topics
  • When the user mentions "api gateway imagens" or related topics
  • When the user mentions "queue imagens" or related topics

Do Not Use This Skill When

  • The task is unrelated to comfyui gateway
  • A simpler, more specific tool can handle the request
  • The user needs general-purpose assistance without domain expertise

How It Works

A production-grade REST API gateway that transforms any ComfyUI server into a universal, secure, and scalable service. Supports workflow templates with placeholders, job queuing with priorities, webhook callbacks, result caching, and multiple storage backends.

Architecture Overview

┌─────────────┐     ┌──────────────────────────────────┐     ┌──────────┐
│   Clients    │────▶│        ComfyUI Gateway           │────▶│ ComfyUI  │
│ (curl, n8n,  │     │                                  │     │ Server   │
│  Claude,     │     │  ┌─────────┐  ┌──────────────┐  │     │ (local/  │
│  Lovable,    │     │  │ Fastify │  │ BullMQ Queue │  │     │  remote) │
│  Supabase)   │     │  │ API     │──│ (or in-mem)  │  │     └──────────┘
│              │◀────│  └─────────┘  └──────────────┘  │
│              │     │  ┌─────────┐  ┌──────────────┐  │     ┌──────────┐
│              │     │  │ Auth +  │  │ Storage      │  │────▶│ S3/MinIO │
│              │     │  │ RateL.  │  │ (local/S3)   │  │     │(optional)│
│              │     │  └─────────┘  └──────────────┘  │     └──────────┘
└─────────────┘     └──────────────────────────────────┘

Components

Component Purpose File(s)
API Gateway REST endpoints, validation, CORS src/api/
Worker Processes jobs, talks to ComfyUI src/worker/
ComfyUI Client HTTP + WebSocket to ComfyUI src/comfyui/
Workflow Manager Template storage, placeholder rendering src/workflows/
Storage Provider Local disk + S3-compatible src/storage/
Cache Hash-based deduplication src/cache/
Notifier Webhook with HMAC signing src/notifications/
Auth API key + JWT + rate limiting src/auth/
DB SQLite (better-sqlite3) or Postgres src/db/
CLI Init, add-workflow, run, worker src/cli/

Read the full file on GitHub · 424 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 424 lines · 41 tokens per session scan A db1864100ad2

Subscribe to this mod's changes

comfyui-gateway is a skill published in the GitHub repository hainamchung/agent-assistant (54 stars, last pushed 3mo ago), licensed MIT. It adds 41 tokens to every session and 4,179 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.