Comfyui
@magistr/comfyuiv2026.06.15.1
Security Notice
This extension includes AI agent skills that can modify AI assistant behavior. Review the skill files before installing.
01README
Drive a ComfyUI server over its HTTP API from swamp. Built for the local Ideogram 4.0 text-to-image workflow, whose prompt is a STRUCTURED JSON CAPTION (scene summary + per-object descriptions with bounding boxes [y1,x1,y2,x2] normalized 0-1000).
One model:
instance— connect to a ComfyUI server (default http://127.0.0.1:8188), snapshot it (lookup/sync), turn a plain idea into a validated bboxed caption with Claude (generate_caption), assemble one from explicit boxes (build_caption), andgenerate: patch the caption/seed/resolution into an API-format workflow graph, POST /prompt, poll /history, fetch the image.
generate_caption calls the Anthropic Messages API (same request contract as
@keeb/anthropic) with the Ideogram-4 magic prompt, and accepts either an
Anthropic API key or a Claude Code OAuth token.
02Models
@magistr/comfyui/instancev2026.06.15.1extensions/models/comfyui.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| baseUrl | string | |
| clientId? | string | |
| workflowPath? | string | |
| outputDir | string | |
| pollIntervalMs | number | |
| timeoutMs | number | |
| anthropicApiKey? | string | |
| captionModel | string | |
| captionMaxTokens | number |
fn lookup()
Snapshot the ComfyUI server (system_stats) as a `server` resource.
fn sync()
Refresh the ComfyUI server snapshot (identical to lookup).
fn build_caption(summary: string, style?: record, background?: string, objects?: array)
Build and serialize an Ideogram caption, stored as a `caption` resource.
| Argument | Type | Description |
|---|---|---|
| summary | string | |
| style? | record | |
| background? | string | |
| objects? | array |
fn generate_caption(idea: string, aspectRatio: string)
Turn a natural-language idea into a validated Ideogram-4 JSON caption via Claude
| Argument | Type | Description |
|---|---|---|
| idea | string | |
| aspectRatio | string |
fn generate(caption?: string, captionNodeId?: string, seed?: number, seedNodeId?: string, resolution?: string, resolutionNodeId?: string, workflow?: record)
Patch a workflow, queue it, fetch images, and record a `generation` resource.
| Argument | Type | Description |
|---|---|---|
| caption? | string | |
| captionNodeId? | string | |
| seed? | number | |
| seedNodeId? | string | |
| resolution? | string | |
| resolutionNodeId? | string | |
| workflow? | record |
03Skills
comfyui2 files
04Stats
A
100 / 100
Downloads
0
Archive size
48.9 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
Repository
https://github.com/umag/swamp-workspace05Platforms
06Labels