[PR #43] fix(commands): save build hand-offs with overwrite: false and open the canvas by workflow_id #41

Open
opened 2026-10-26 22:34:20 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-skills/pull/43
Author: @mattmillerai
Created: 10/23/2026
Status: 🔄 Open

Base: main ← Head: mattmiller/be-22705-handoff-align


📝 Commits (1)

  • ad7b7cd fix(commands): save build hand-offs safely and route by workflow id

📊 Changes

14 files changed (+26 additions, -23 deletions)

View changed files

📝 README.md (+1 -1)
📝 claude-code/commands/generate-3d.md (+2 -2)
📝 claude-code/commands/generate-audio.md (+2 -2)
📝 claude-code/commands/generate-image.md (+2 -2)
📝 claude-code/commands/generate-video.md (+1 -1)
📝 claude-code/commands/remove-background.md (+1 -1)
📝 claude-code/commands/upscale-image.md (+1 -1)
📝 openclaw/comfy/SKILL.md (+6 -3)
📝 skills/comfy-generate-3d.md (+2 -2)
📝 skills/comfy-generate-audio.md (+2 -2)
📝 skills/comfy-generate-image.md (+2 -2)
📝 skills/comfy-generate-video.md (+2 -2)
📝 skills/comfy-remove-background.md (+1 -1)
📝 skills/comfy-upscale-image.md (+1 -1)

📄 Description

ELI5

When an agent builds a workflow for a user and saves it, it could quietly overwrite a workflow the user already had with the same name, or hand back a link that publishes the workflow publicly. This change has the agent save under a new name instead and open the private canvas link. It also makes the agent check "does the user want a workflow?" before it spends credits on a shortcut that only returns a picture.

What

Aligns the BUILD/CREATE hand-off in every mirror (claude-code/commands/*, legacy skills/*, openclaw/comfy/SKILL.md) with the hosted MCP server's own hand-off guidance:

  1. Hand-off step (image, audio, 3d, video, remove-background, upscale-image; commands + skills): save_workflow with overwrite: false (the server defaults to true), picking a new name on collision; get_workflow_canvas_url with the workflow_id from the save result, falling back to list_saved_workflows. Never the filename, because saved_workflow_filename mode publishes a public ?share= snapshot. After a run_template run, get_template and save that body, and tell the user which input_overrides were used. The "auto-generated layout" and subgraph sentences after it are unchanged.
  2. Video partner-only exception (skills/comfy-generate-video.md): the build branch now continues to Step 1, wiring the partner node (or the family's api_* template) into the built workflow, so the _meta.title rule and the hand-off step apply.
  3. Step 0 order (image, audio, 3d; commands + skills): the "partner_generate returns only the output…" sentence moves word-for-word from the end of the Step 0 paragraph to right after the search_nodes lookup, before "try partner_generate first". The check now comes before the call that spends credits. The text is byte-identical, so any exact-match key on that sentence still matches.
  4. openclaw mirror: the same rules, condensed into the existing prose.
  5. README authoring rule (line 65, found by the doc-drift sweep): the "build steps must leave a saved workflow link" rule now names overwrite: false and the workflow_id lookup, so a new command written from the rule doesn't bring the old behaviour back.

Judgment calls

  • claude-code/commands/generate-video.md video bullet left unchanged. Item 2 assumed the command bullet matched the legacy skill's. It doesn't: the command bullet already reads "skip partner_generate and continue to Step 1, wiring the matching partner node into the workflow you build", which is the target behaviour, and it never mentions api_* templates. Rewording it would also change a sentence that exactly matches the one in the image/audio/3d commands. So the only video change in the commands copy is the hand-off step.
  • The 3d Step 0 sentence is inserted after "(optionally add a q for the provider name)." That is the end of the search_nodes lookup sentence in that file, since 3d words its lookup differently from image/audio.

Testing

  • grep -rn 'overwrite: false' skills claude-code/commands openclaw → 13 hits (6 + 6 + 1), as the ticket expects.
  • grep -rn 'with the returned workflow id' skills claude-code/commands → 0 hits.
  • The hand-off line is byte-identical between each skills/comfy-<x>.md and claude-code/commands/<x>.md pair (diffed all 6 pairs).
  • The moved Step 0 sentence appears exactly once in each of the 6 image/audio/3d files.
  • claude plugin validate ./claude-code → ✔ Validation passed. The repo has no other test or lint CI (the only workflow is the post-merge review-compliance check).
  • Doc-drift sweep: 20 references checked, 1 updated (README.md:65; the other 19 are command-table, naming or generic mentions that this change doesn't affect).

Provenance

  • Authored by: agent-work loop
  • Verified:
    • Acceptance greps: 13 overwrite: false hits, 0 stale returned workflow id hits
    • Mirror alignment: all 6 skills/commands hand-off pairs byte-identical
    • Plugin validator: passed
    • Not run: any live agent session against the hosted MCP (prompt-only change)
  • Deviations:
    • Item 2 not applied to the claude-code/commands/generate-video.md bullet, which already has the target behaviour (see Judgment calls)
    • README authoring rule updated as well (not named in the plan; doc-drift fix)

Residual

  • Server-side copy not refreshed. The hosted MCP server's bundled copy of these skills, and its exact-sentence lint keys, are a separate follow-up and were deliberately not touched here. The Step 0 sentence was moved, not reworded, so no re-key should be needed for it. The hand-off sentence is new text and will need its server-side copy refreshed.
  • Overlap with open PRs #40 and #19. #40 adds a numbered step before "If any step fails" in all six skills and commands, so whichever lands second renumbers. #19 rewords the Step 0 partner paragraph in image/audio/video, and this PR reorders a sentence inside that paragraph, so whichever lands second rebases. Neither was rebased onto here.
  • Not exercised live. The claims about server behaviour (overwrite defaulting to true, workflow_id being best-effort in the save result, filename mode publishing a public share snapshot) come from the upstream investigation. I did not re-verify them against a running server, since that would have meant making real saves and shares.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-skills/pull/43 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 10/23/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `mattmiller/be-22705-handoff-align` --- ### 📝 Commits (1) - [`ad7b7cd`](https://github.com/Comfy-Org/comfy-skills/commit/ad7b7cdb9102d3505fbf16e6340613df95ebf1d5) fix(commands): save build hand-offs safely and route by workflow id ### 📊 Changes **14 files changed** (+26 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `claude-code/commands/generate-3d.md` (+2 -2) 📝 `claude-code/commands/generate-audio.md` (+2 -2) 📝 `claude-code/commands/generate-image.md` (+2 -2) 📝 `claude-code/commands/generate-video.md` (+1 -1) 📝 `claude-code/commands/remove-background.md` (+1 -1) 📝 `claude-code/commands/upscale-image.md` (+1 -1) 📝 `openclaw/comfy/SKILL.md` (+6 -3) 📝 `skills/comfy-generate-3d.md` (+2 -2) 📝 `skills/comfy-generate-audio.md` (+2 -2) 📝 `skills/comfy-generate-image.md` (+2 -2) 📝 `skills/comfy-generate-video.md` (+2 -2) 📝 `skills/comfy-remove-background.md` (+1 -1) 📝 `skills/comfy-upscale-image.md` (+1 -1) </details> ### 📄 Description ## ELI5 When an agent builds a workflow for a user and saves it, it could quietly overwrite a workflow the user already had with the same name, or hand back a link that publishes the workflow publicly. This change has the agent save under a new name instead and open the private canvas link. It also makes the agent check "does the user want a workflow?" before it spends credits on a shortcut that only returns a picture. ## What Aligns the BUILD/CREATE hand-off in every mirror (`claude-code/commands/*`, legacy `skills/*`, `openclaw/comfy/SKILL.md`) with the hosted MCP server's own hand-off guidance: 1. **Hand-off step** (image, audio, 3d, video, remove-background, upscale-image; commands + skills): `save_workflow` with `overwrite: false` (the server defaults to `true`), picking a new name on collision; `get_workflow_canvas_url` with the `workflow_id` from the save result, falling back to `list_saved_workflows`. Never the filename, because `saved_workflow_filename` mode publishes a public `?share=` snapshot. After a `run_template` run, `get_template` and save that body, and tell the user which `input_overrides` were used. The "auto-generated layout" and subgraph sentences after it are unchanged. 2. **Video partner-only exception** (`skills/comfy-generate-video.md`): the build branch now continues to Step 1, wiring the partner node (or the family's `api_*` template) into the built workflow, so the `_meta.title` rule and the hand-off step apply. 3. **Step 0 order** (image, audio, 3d; commands + skills): the "`partner_generate` returns only the output…" sentence moves word-for-word from the end of the Step 0 paragraph to right after the `search_nodes` lookup, before "try `partner_generate` first". The check now comes before the call that spends credits. The text is byte-identical, so any exact-match key on that sentence still matches. 4. **openclaw mirror**: the same rules, condensed into the existing prose. 5. **README authoring rule** (line 65, found by the doc-drift sweep): the "build steps must leave a saved workflow link" rule now names `overwrite: false` and the `workflow_id` lookup, so a new command written from the rule doesn't bring the old behaviour back. ## Judgment calls - **`claude-code/commands/generate-video.md` video bullet left unchanged.** Item 2 assumed the command bullet matched the legacy skill's. It doesn't: the command bullet already reads "skip `partner_generate` and continue to Step 1, wiring the matching partner node into the workflow you build", which is the target behaviour, and it never mentions `api_*` templates. Rewording it would also change a sentence that exactly matches the one in the image/audio/3d commands. So the only video change in the commands copy is the hand-off step. - The 3d Step 0 sentence is inserted after "(optionally add a `q` for the provider name)." That is the end of the `search_nodes` lookup sentence in that file, since 3d words its lookup differently from image/audio. ## Testing - `grep -rn 'overwrite: false' skills claude-code/commands openclaw` → **13** hits (6 + 6 + 1), as the ticket expects. - `grep -rn 'with the returned workflow id' skills claude-code/commands` → **0** hits. - The hand-off line is byte-identical between each `skills/comfy-<x>.md` and `claude-code/commands/<x>.md` pair (diffed all 6 pairs). - The moved Step 0 sentence appears exactly once in each of the 6 image/audio/3d files. - `claude plugin validate ./claude-code` → ✔ Validation passed. The repo has no other test or lint CI (the only workflow is the post-merge review-compliance check). - Doc-drift sweep: 20 references checked, 1 updated (README.md:65; the other 19 are command-table, naming or generic mentions that this change doesn't affect). ## Provenance - **Authored by:** agent-work loop - **Verified:** - Acceptance greps: 13 `overwrite: false` hits, 0 stale `returned workflow id` hits - Mirror alignment: all 6 skills/commands hand-off pairs byte-identical - Plugin validator: passed - Not run: any live agent session against the hosted MCP (prompt-only change) - **Deviations:** - Item 2 not applied to the `claude-code/commands/generate-video.md` bullet, which already has the target behaviour (see Judgment calls) - README authoring rule updated as well (not named in the plan; doc-drift fix) ## Residual - **Server-side copy not refreshed.** The hosted MCP server's bundled copy of these skills, and its exact-sentence lint keys, are a separate follow-up and were deliberately not touched here. The Step 0 sentence was moved, not reworded, so no re-key should be needed for it. The hand-off sentence is new text and will need its server-side copy refreshed. - **Overlap with open PRs #40 and #19.** #40 adds a numbered step before "If any step fails" in all six skills and commands, so whichever lands second renumbers. #19 rewords the Step 0 partner paragraph in image/audio/video, and this PR reorders a sentence inside that paragraph, so whichever lands second rebases. Neither was rebased onto here. - **Not exercised live.** The claims about server behaviour (`overwrite` defaulting to true, `workflow_id` being best-effort in the save result, filename mode publishing a public share snapshot) come from the upstream investigation. I did not re-verify them against a running server, since that would have meant making real saves and shares. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-skills#41
No description provided.