Connecting an app to ComfyUI is easy to get almost right: a job lost after a timeout, a duplicate run, or one user seeing another's image. This skill guides your coding agent through connecting a form to your known ComfyUI API workflow through server code, from prerequisites to a checked result.
Visitors supply only a bounded prompt, with an optional bounded seed or size; the server keeps the graph, model and output location. Each job's prompt ID is tracked per user, and the app shows queued, running, complete and failed states. A running job is collected again by its saved ID, and an ambiguous submission is never retried automatically. An image is returned only after checking the job belongs to the requesting user.
Before a real job runs, your agent tests an invalid prompt, an unreachable server, a failed node, a duplicate submit and a timeout using fake server responses. ComfyUI stays behind the app rather than becoming an unauthenticated public service.
You need a working API workflow, a local ComfyUI server and a web app with server-side code. Provider accounts, model weights, GPU compute and hosting are not included.