From d04fa8ecaf347db7ad3163d71fbdb69b6d4c1231 Mon Sep 17 00:00:00 2001 From: "Daxiong (Lin)" Date: Sun, 15 Nov 2026 14:52:26 +0800 Subject: [PATCH] docs: add a coding agent section to the SDKs page --- development/api-development/sdks.mdx | 24 ++++++++++++++++++++++ es/development/api-development/sdks.mdx | 27 ++++++++++++++++++++++++- ja/development/api-development/sdks.mdx | 27 ++++++++++++++++++++++++- ko/development/api-development/sdks.mdx | 27 ++++++++++++++++++++++++- zh/development/api-development/sdks.mdx | 27 ++++++++++++++++++++++++- 5 files changed, 128 insertions(+), 4 deletions(-) diff --git a/development/api-development/sdks.mdx b/development/api-development/sdks.mdx index b7ad7f273c..4b4b809deb 100644 --- a/development/api-development/sdks.mdx +++ b/development/api-development/sdks.mdx @@ -47,6 +47,30 @@ Python 3.10 or newer. Node 22 or newer. +## Coding agents + +If a coding agent builds your Comfy Router integration, give it the `comfy-sdk` skill. + +The skill covers what agents usually get wrong: + +- Which client to use +- Keeping the API key on the server +- Discovering a model before calling it +- `run` versus `submit` +- Timeouts +- Branching on error buckets + +It does not cover ComfyUI workflows. For the workflow client on this page, point the agent at this guide and the [Comfy API v2 reference](/api-reference/v2/overview). + +To install it in Claude Code, run: + +``` +/plugin marketplace add Comfy-Org/comfy-skills +/plugin install comfy-sdk@comfy-skills +``` + +For any other agent, copy the [`SKILL.md`](https://github.com/Comfy-Org/comfy-skills/blob/main/claude-code-sdk/skills/comfy-sdk/SKILL.md) file into `AGENTS.md` or your Cursor rules. + ## Quickstart Upload an input image, run a workflow, and write the results to disk. diff --git a/es/development/api-development/sdks.mdx b/es/development/api-development/sdks.mdx index ef0f85399d..752ff2eede 100644 --- a/es/development/api-development/sdks.mdx +++ b/es/development/api-development/sdks.mdx @@ -3,11 +3,12 @@ title: "SDK de Comfy: clientes de Python y TypeScript para ComfyUI" description: "Ejecuta flujos de trabajo de ComfyUI desde Python o TypeScript en Comfy Cloud, tu propio despliegue: recursos, tareas, eventos en vivo y reintentos idempotentes." sidebarTitle: "SDK" icon: "code" -translationSourceHash: fd912955 +translationSourceHash: da14b84c translationFrom: development/api-development/sdks.mdx translationBlockHashes: "_intro": c92c7b51 "Install": da9a0a57 + "Coding agents": eed20c28 "Quickstart": 02297586 "Choosing a base URL": 0e77e81c "Retrying a submit: the idempotency key": 7c83d78f @@ -61,6 +62,30 @@ Python 3.10 o posterior. Node 22 o posterior. +## Agentes de programación + +Si un agente de programación va a escribir tu integración con Comfy Router, dale la habilidad `comfy-sdk`. + +La habilidad cubre lo que los agentes suelen hacer mal: + +- Qué cliente usar +- Mantener la clave de API en el servidor +- Comprobar el modelo antes de llamarlo +- Elegir entre `run` y `submit` +- Los tiempos de espera +- Tratar cada tipo de error por separado + +No cubre la ejecución de flujos de trabajo de ComfyUI. Para el cliente de flujos de trabajo de esta página, indica al agente que consulte esta guía y la [referencia de Comfy API v2](/es/api-reference/v2/overview). + +En Claude Code, ejecuta: + +``` +/plugin marketplace add Comfy-Org/comfy-skills +/plugin install comfy-sdk@comfy-skills +``` + +Para cualquier otro agente, copia el archivo [`SKILL.md`](https://github.com/Comfy-Org/comfy-skills/blob/main/claude-code-sdk/skills/comfy-sdk/SKILL.md) en `AGENTS.md` o en tus reglas de Cursor. + ## Inicio rápido Sube una imagen de entrada, ejecuta un flujo de trabajo y escribe los resultados en disco. diff --git a/ja/development/api-development/sdks.mdx b/ja/development/api-development/sdks.mdx index 9dc6994459..297382ffdd 100644 --- a/ja/development/api-development/sdks.mdx +++ b/ja/development/api-development/sdks.mdx @@ -3,11 +3,12 @@ title: "Comfy SDK:ComfyUI 向け Python・TypeScript クライアント" description: "Comfy Cloud、デプロイ環境、または自前の ComfyUI に対して Python または TypeScript から ComfyUI ワークフローを実行し、アセット、ジョブ、ライブイベント、冪等なリトライを扱います。" sidebarTitle: "SDK" icon: "code" -translationSourceHash: fd912955 +translationSourceHash: da14b84c translationFrom: development/api-development/sdks.mdx translationBlockHashes: "_intro": c92c7b51 "Install": da9a0a57 + "Coding agents": eed20c28 "Quickstart": 02297586 "Choosing a base URL": 0e77e81c "Retrying a submit: the idempotency key": 7c83d78f @@ -64,6 +65,30 @@ Python 3.10 以降。Node 22 以降。 +## コーディングエージェント + +コーディングエージェントに Comfy Router 連携を書かせる場合は、`comfy-sdk` スキルを渡してください。 + +このスキルが扱うのは、エージェントが間違えやすい次の点です。 + +- どのクライアントを使うか +- API キーをサーバー側に置くこと +- 呼び出す前にモデルを確認すること +- `run` と `submit` の使い分け +- タイムアウト +- エラーの種別ごとの分岐 + +ComfyUI ワークフローの実行は対象外です。このページのワークフロークライアントを使う場合は、このガイドと [Comfy API v2 リファレンス](/ja/api-reference/v2/overview) の両方をエージェントに参照させてください。 + +Claude Code では次を実行します。 + +``` +/plugin marketplace add Comfy-Org/comfy-skills +/plugin install comfy-sdk@comfy-skills +``` + +その他のエージェントでは、[`SKILL.md`](https://github.com/Comfy-Org/comfy-skills/blob/main/claude-code-sdk/skills/comfy-sdk/SKILL.md) ファイルを `AGENTS.md` や Cursor のルールにコピーしてください。 + ## クイックスタート 入力画像をアップロードし、ワークフローを実行して、結果をディスクに書き込みます。 diff --git a/ko/development/api-development/sdks.mdx b/ko/development/api-development/sdks.mdx index cf612468d2..f6434a4575 100644 --- a/ko/development/api-development/sdks.mdx +++ b/ko/development/api-development/sdks.mdx @@ -3,11 +3,12 @@ title: "Comfy SDK: ComfyUI용 Python 및 TypeScript 클라이언트" description: "Python 또는 TypeScript로 Comfy Cloud, 자체 배포 또는 자체 ComfyUI를 대상으로 ComfyUI 워크플로를 실행하고, 에셋, 작업, 라이브 이벤트, 멱등 재시도를 다룹니다." sidebarTitle: "SDK" icon: "code" -translationSourceHash: fd912955 +translationSourceHash: da14b84c translationFrom: development/api-development/sdks.mdx translationBlockHashes: "_intro": c92c7b51 "Install": da9a0a57 + "Coding agents": eed20c28 "Quickstart": 02297586 "Choosing a base URL": 0e77e81c "Retrying a submit: the idempotency key": 7c83d78f @@ -64,6 +65,30 @@ Python 3.10 이상. Node 22 이상. +## 코딩 에이전트 + +코딩 에이전트가 Comfy Router 통합 코드를 작성한다면 `comfy-sdk` 스킬을 넘겨주세요. + +이 스킬이 다루는 것은 에이전트가 자주 틀리는 부분입니다. + +- 어떤 클라이언트를 쓸지 +- API 키를 서버에 두기 +- 호출 전에 모델 확인하기 +- `run`과 `submit` 중 선택 +- 타임아웃 +- 오류 유형별 분기 + +ComfyUI 워크플로 실행은 다루지 않습니다. 이 페이지의 워크플로 클라이언트를 쓸 때는 이 가이드와 [Comfy API v2 레퍼런스](/ko/api-reference/v2/overview)를 모두 에이전트에게 참고하도록 하세요. + +Claude Code에서는 다음을 실행합니다. + +``` +/plugin marketplace add Comfy-Org/comfy-skills +/plugin install comfy-sdk@comfy-skills +``` + +다른 에이전트의 경우 [`SKILL.md`](https://github.com/Comfy-Org/comfy-skills/blob/main/claude-code-sdk/skills/comfy-sdk/SKILL.md) 파일을 `AGENTS.md`나 Cursor 규칙에 복사하세요. + ## 빠른 시작 입력 이미지를 업로드하고 워크플로를 실행한 다음 결과를 디스크에 기록합니다. diff --git a/zh/development/api-development/sdks.mdx b/zh/development/api-development/sdks.mdx index ee5410768b..d749949394 100644 --- a/zh/development/api-development/sdks.mdx +++ b/zh/development/api-development/sdks.mdx @@ -3,11 +3,12 @@ title: "Comfy SDK:ComfyUI 的 Python 与 TypeScript 客户端" description: "用 Python 或 TypeScript 对 Comfy Cloud、自建部署或自有 ComfyUI 运行 ComfyUI 工作流,并处理资产、任务、实时事件和幂等重试。" sidebarTitle: "SDK" icon: "code" -translationSourceHash: fd912955 +translationSourceHash: da14b84c translationFrom: development/api-development/sdks.mdx translationBlockHashes: "_intro": c92c7b51 "Install": da9a0a57 + "Coding agents": eed20c28 "Quickstart": 02297586 "Choosing a base URL": 0e77e81c "Retrying a submit: the idempotency key": 7c83d78f @@ -64,6 +65,30 @@ Python 3.10 或更高版本。Node 22 或更高版本。 +## 编程智能体 + +用编程智能体写 Comfy Router 集成时,给它 `comfy-sdk` 技能。 + +技能讲的是代理常错的几件事: + +- 选哪个客户端 +- 密钥放服务端 +- 调用前先查模型 +- `run` 还是 `submit` +- 超时 +- 错误按类别处理 + +ComfyUI 工作流不在它的范围内。写本页这类工作流客户端时,把本页和 [Comfy API v2 参考](/zh/api-reference/v2/overview) 都给代理看。 + +Claude Code 里跑: + +``` +/plugin marketplace add Comfy-Org/comfy-skills +/plugin install comfy-sdk@comfy-skills +``` + +其它代理,把 [`SKILL.md`](https://github.com/Comfy-Org/comfy-skills/blob/main/claude-code-sdk/skills/comfy-sdk/SKILL.md) 这一个文件拷进 `AGENTS.md` 或 Cursor 规则。 + ## 快速入门 上传输入图像,运行工作流,并将结果写入磁盘。