# ComfyUI Job Pipeline: Keep Node IDs Out of Your App

> Puts ComfyUI behind one boundary in your app: the frontend sends a JobSpec in product words, a template maps it onto the workflow, and one executor talks HTTP. Includes a template checker, a leak finder for your source and 51 tests against a mock server.

ComfyUI Job Pipeline: Keep Node IDs Out of Your App is a free AI agent skill on Agensi by Joyren Terken, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Joyren Terken](https://www.agensi.io/creators/joyren-terken)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.0
- Last updated: 2026-11-18
- Security: scan passed (2026-11-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/comfyui-job-pipeline-keep-node-ids-out-of-your-app
- Tags: api, image, web-design, comfyui, architecture, python, workflows, refactoring

## About this skill

**What it does**

Re-export a ComfyUI workflow and node `6` can become node `12`. An app that wrote its prompt into `graph["6"]` now writes it nowhere, and nothing says so. This skill keeps ComfyUI behind one boundary with five pieces: a JobSpec in product words (`prompt`, `shape`), a WorkflowTemplate that is the only file naming nodes, a pure mapper, an executor that is the only code talking HTTP, and the OutputAsset and GenerationJob the app stores.

A template names every node twice, by id and by class. `check` compares it with the workflow and refuses a moved node, a swapped class or an input wired to another node before anything is sent. `find_leaks.py` lists ComfyUI knowledge outside the boundary in your source: node-id indexing, `class_type`, endpoints, port 8188 and common node class names. The skill also gives five steps for auditing and moving an existing integration.

**When to use it**

- Your app calls ComfyUI's HTTP API (`/prompt`, `/history`, `/view`, `/upload/image`).
- A component edits workflow JSON by node id.
- A re-exported workflow broke generation.
- You are adding a second workflow or provider, or auditing an integration.

**What's inside**

- `scripts/comfy_pipeline.py`: template, mapper, executor and job, with `check`, `map` and `run` commands. Standard library only.
- `scripts/find_leaks.py`: the leak finder, with `--allow` for the boundary's own files.
- `examples/`: a text-to-image workflow in API format, its template, a JobSpec, and a generate button before and after, with a route handler.
- `tests/`: 51 tests against a mock ComfyUI server.

**Requirements**

Python 3.8 or newer. A running ComfyUI server for `run`. The workflow exported in API format.

The client follows ComfyUI's `server.py` and `execution.py` as read on the master branch, and has been tested against the mock server only. It has not run against a live ComfyUI yet. It polls `/history` (no WebSocket, no progress) and saves image outputs only.

## Requires

- Python 3.8+
- ComfyUI server (for run)
- Git

## Known limitations

Uses HTTP polling instead of WebSockets. No real-time progress bars. Supports image outputs only; other types are listed as not saved. Requires ComfyUI API JSON format.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the ComfyUI Job Pipeline: Keep Node IDs Out of Your App skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Has it been run against a real ComfyUI?

Not yet. The 51 tests run against a mock server built from ComfyUI's server.py and execution.py. The README gives the one command for a first live run.

### Does it show progress or previews?

No. The executor polls /history and does not use the WebSocket. It saves image outputs and lists any other output in not_saved.

### My app is not written in Python. Is it still useful?

Yes. The skill treats the shapes as what matters, so the script works as a reference for any language. check and find_leaks.py still run on your templates and your source.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
