agentleFS
badgidsbadgids/comfyui-development-skills/skills/comfyui-api-and-sdk/SKILL.md

comfyui-api-and-sdk

Skill4 starsChanged 44 days agoMITView on GitHub

Use for ComfyUI HTTP APIs, WebSockets, job submission, object/node discovery, uploads/downloads, Python/TypeScript/Swift SDKs, comfy-cli, comfy-api-proxy, comfy-mcp, Cloud versus self-hosted integration, and external applications that drive ComfyUI.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Do not merge route/payload assumptions across these surfaces.

    line 20
  2. Very specific:

    Use the matching official SDK/tool repository, Comfy-Org/docs, and the target/current core server source.

    line 24
  3. Distinctive:

    Prefer the official SDK for that language when it supports the required operation.

    line 29
  4. Distinctive:

    If direct HTTP/WebSocket access is required, inspect current official server routes/messages for the target.

    line 31
  5. Distinctive:

    Treat node discovery as target-specific data.

    line 33
  6. Distinctive:

    Avoid embedding secrets in workflow JSON, logs, or source.

    line 34
  7. Distinctive:

    Add a small integration test against a controlled target when practical.

    line 35
  8. Distinctive:

    If supporting both Cloud and self-hosted, keep differences explicit behind an adapter rather than pretending the endpoints are identical.

    line 39
  9. Distinctive:

    Treat MCP as an integration layer, not as specification authority for ComfyUI internals.

    line 43
  10. Distinctive:

    Before calling an integration complete:

    line 47
  11. Distinctive:

    verify current routes or SDK signatures from the matching official source.

    line 50
  12. Distinctive:

    test timeout and error handling, not only the successful response.

    line 51
  13. Distinctive:

    keep credentials out of source, workflow files, and logs.

    line 52
  14. Distinctive:

    run a controlled integration test when practical.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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 API and SDK

First classify the target

Identify whether the client talks to:

  • self-hosted ComfyUI server;
  • Comfy Cloud;
  • comfy-api-proxy;
  • an SDK abstraction;
  • MCP;
  • CLI.

Do not merge route/payload assumptions across these surfaces.

Sources

Use the matching official SDK/tool repository, Comfy-Org/docs, and the target/current core server source.

Procedure

  1. Determine target service and version.
  2. Prefer the official SDK for that language when it supports the required operation.
  3. Inspect current SDK signatures and examples instead of recalling them.
  4. If direct HTTP/WebSocket access is required, inspect current official server routes/messages for the target.
  5. Implement timeouts, connection failures, execution errors, and output retrieval explicitly.
  6. Treat node discovery as target-specific data.
  7. Avoid embedding secrets in workflow JSON, logs, or source.
  8. Add a small integration test against a controlled target when practical.

Compatibility

If supporting both Cloud and self-hosted, keep differences explicit behind an adapter rather than pretending the endpoints are identical.

MCP

Treat MCP as an integration layer, not as specification authority for ComfyUI internals. Verify underlying behavior against the target/core when needed.

Acceptance gate

Before calling an integration complete:

  • identify the exact service surface: self-hosted, Cloud, proxy, SDK, MCP, or CLI;
  • verify current routes or SDK signatures from the matching official source;
  • test timeout and error handling, not only the successful response;
  • keep credentials out of source, workflow files, and logs;
  • run a controlled integration test when practical;
  • report untested network/service paths explicitly.

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.