Skip to content
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ history.

### Added

- The `comfy-run-on-cloud` agent skill, installed with the other bundled
skills and read with `comfy skills show comfy-run-on-cloud`. It takes one
workflow from a running local ComfyUI (read through the server's
`/api/userdata`, so no folder path is needed) to Comfy Cloud: it checks the
workflow with `comfy workflow check --where cloud --models-dir` (the
install's model folders, so a local model that differs from Cloud's copy
blocks), then runs it on Comfy Cloud as is, on an existing build in the workspace, with a lossless node swap
made on a copy, with a lossy swap the person agreed to, or on a custom build.
A model the check cannot prove the same runs on Cloud's copy and is named in
the report. Every local file upload is asked by name, models go through
`comfy model upload` after a dry run, a deployment run holds its automatic
uploads with `--no-upload` and then uploads only the approved files with
`--allow-upload`, and the agent runs
one real job before it saves with `comfy workflow save --where cloud` and
hands back the folder link (or says there is none for a record-only save).
`comfy_cli/skills/comfy-run-on-cloud/PROMPT-TEMPLATE.md` is the prompt local
ComfyUI's Copy prompt button gives the agent. `comfy-build` points a
single-workflow request at the new skill, `comfy-build-failures` says a
missing import needs a way to install it before another cut, and
`comfy-deploy` and `comfy-deploy-failures` read a deployment with
`deploy show` outside a Build folder, since `deploy status` needs one.
Builds on #1008.
- `comfy deploy run --allow-upload <hash>` (repeatable) uploads a local file
the deployment lacks only if its hash is listed; any other file fails with
`deploy_asset_missing` and is not sent. A file Cloud already holds is reused
Expand Down
1 change: 1 addition & 0 deletions comfy_cli/skills/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
("comfy-build", "comfy-build"),
("comfy-deploy", "comfy-deploy"),
("comfy-custom-nodes", "comfy-custom-nodes"),
("comfy-run-on-cloud", "comfy-run-on-cloud"),
)


Expand Down
12 changes: 12 additions & 0 deletions comfy_cli/skills/comfy-build-failures/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@ cause completely, in one cut. Do not split its edits across cuts, and do not gue
at a second cause in the same cut. Before each new cut, tell the user the cause,
the exact edit, and which build this is, and wait.

**A missing import needs an installation mechanism before another cut.** Read
the selected pack's verified source and declared requirements, or establish a
supported builder installation path. A `pipDependencies` constraint only pins a
package installed by another mechanism; adding `PyYAML==<version>` does not by
itself install a missing `yaml` import. First verify what will install the
package, then select a compatible constraint if needed. A changed local source
bundle also needs approval for its changed contents and bytes before upload.
When no verified installation mechanism exists, report that blocker and ask for
the missing source or supported installation choice. Do not propose or create a
fresh paid cut merely to try an otherwise unsupported pin, even if the previous
repair plan was approved.

**Read in this order.**

1. `comfy build release show` — **`failureReason` is per target, at
Expand Down
5 changes: 5 additions & 0 deletions comfy_cli/skills/comfy-build/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ the one the situation calls for rather than guessing at its contents:
All four converge on the same file, then the same `validate → push → release`
tail.

If the goal is one workflow running on Comfy Cloud ("Run on Cloud", or "put this
workflow on Cloud") rather than an environment, read
`comfy skills show comfy-run-on-cloud` first: Comfy Cloud itself or an existing
build may already run it, and a build it needs carries only what that workflow loads.

---

## Path A — from a ComfyUI install
Expand Down
6 changes: 3 additions & 3 deletions comfy_cli/skills/comfy-deploy-failures/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ argument you pass.
| `deploy_ambiguous_build` | Two or more Builds share the name before the slash | Name the Build by its id, as `<build id>/<name>` |
| `deploy_forbidden` | The workspace does not permit this | Confirm which workspace is signed in |
| `deploy_not_signed_in` | No usable Cloud session or workspace API key, or the key was refused | Replace the key the hint names; otherwise `comfy cloud login` |
| `deploy_server_error` | Control plane unavailable or 5xx | Re-read `status` before retrying, so a retry cannot double-create |
| `deploy_update_replaced` | A watched `up`, `promote` or `rollback` was replaced by a newer update; `details.replacing_release_id` names its release | Follow it with `comfy deploy status --deployment <id>`, or end it with `comfy deploy cancel --deployment <id>` |
| `deploy_server_error` | Control plane unavailable or 5xx | Re-read `comfy deploy show --deployment <id>` before retrying, so a retry cannot double-create |
| `deploy_update_replaced` | A watched `up`, `promote` or `rollback` was replaced by a newer update; `details.replacing_release_id` names its release | Read it with `comfy deploy show --deployment <id>`, or end it with `comfy deploy cancel --deployment <id>` |
| `deploy_updates_unavailable` | `promote`, `rollback`, `history`, `cancel` or `events --release` on a deployment with no `revision`, or `cancel` against a deploy service too old for it | `promote` or `rollback`: `up --create` on the release instead. `history`: read `events`. `cancel`: wait for the update to land or fail. `events`: drop `--release`; those events do not say which release made them |
| `deploy_watch_lost` | The watch's reads went unanswered for a minute, or a move by `up`, `promote` or `rollback` did not land within an hour (exit 75); the deployment may still be coming up | `comfy deploy status --deployment <id> --watch`, or after a move `comfy deploy show --deployment <id>` until it shows no `pendingUpdate`; do not redeploy |
| `deploy_watch_lost` | The watch's reads went unanswered for a minute, or a move by `up`, `promote` or `rollback` did not land within an hour (exit 75); the deployment may still be coming up | Read `comfy deploy show --deployment <id>` from any folder; watching requires `comfy deploy status <spec-PATH> --deployment <id> --watch` with this Build's verified spec. After a move, read until no `pendingUpdate`; do not redeploy |
| `watch_auth_lost` | A watch's read was refused with a 401 despite session recovery, and a refreshable sign-in remains stored (exit 75); the deployment may still be coming up | Reattach as for `deploy_watch_lost` before considering a new sign-in; do not redeploy |
| `deploy_delete_needs_confirm` | `delete` without `--yes` non-interactively | Confirm with the user, then pass `--yes` |

Expand Down
4 changes: 3 additions & 1 deletion comfy_cli/skills/comfy-deploy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ provisioning". Things to read correctly:
- No `progress` at all is an older service, or a status other than the two above.

Interrupting the wait leaves the deployment coming up on the service's side;
`comfy deploy status --deployment <id> --watch` attaches again. A deploy API that
read `comfy deploy show --deployment <id>` from any folder. To watch again,
use `comfy deploy status <spec-PATH> --deployment <id> --watch` with this Build's
verified spec. A deploy API that
stops answering (a 5xx or a dropped connection, as during its own rollout) is
retried for about a minute; if it is still down, the wait ends with
`deploy_watch_lost` and **exit 75**, not 1. That is not a failed deployment:
Expand Down
29 changes: 29 additions & 0 deletions comfy_cli/skills/comfy-run-on-cloud/PROMPT-TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# The Run on Cloud prompt

This is the text **Copy prompt** puts on the clipboard in local ComfyUI. The
person pastes it into Claude Code or Codex, and the agent loads the
`comfy-run-on-cloud` skill from it.

```text
Run my ComfyUI workflow on Comfy Cloud.
If comfy is missing: uv tool install comfy-cli
Read the skill first: comfy skills show comfy-run-on-cloud
Workflow: workflows/<name>.json
ComfyUI: http://127.0.0.1:8188
```

Fill it from the running app:

- `Workflow:` is the saved workflow's path under the user's data folder, as
the server's `/api/userdata` takes it (`workflows/<name>.json`, subfolders
included). Save the workflow before copying; an unsaved tab has no path.
- `ComfyUI:` is the address the page was loaded from.
- When the server runs with `--multi-user`, add one more line with the user
the page is signed in as, which the agent sends as the `comfy-user` header:

```text
ComfyUI user: <user>
```

The prompt names no build, GPU or upload. The skill asks for those in the chat,
only when the workflow needs them.
Loading
Loading