[PR #40] feat(skills): add a refine step to the generate skills and slash commands #39

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

📋 Pull Request Information

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

Base: main ← Head: matt/be-18944-refine-step


📝 Commits (2)

  • 5344caf feat(skills): add a refine step to the generate skills and slash commands
  • 38ff442 Merge remote-tracking branch 'origin/main' into matt/be-18944-refine-step

📊 Changes

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

View changed files

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

📄 Description

ELI5

When someone generates a picture and then says "same thing, but at night, seed 7", the agent used to rebuild the whole workflow from scratch or paste the graph back in by hand. Now every generate skill has a last step that says: rerun the earlier job and change only the inputs the user asked about.

What changed

  • skills/comfy-generate-{image,video,3d}.md get a new step 11, and skills/comfy-generate-audio.md gets step 10. Each one goes right after the save-and-link step that main added as the previous final step. The step says: for an adjustment rather than a new subject, call submit_workflow with from_prompt_id (the run being adjusted) plus input_overrides holding only the changed inputs. If the node id isn't known, read it from get_job_status with include_workflow: true first, then go back to the polling step. If the user wants the output itself edited, use use_previous_output / partner_generate medias[] instead.
  • skills/comfy-upscale-image.md and skills/comfy-remove-background.md get the shorter step 11: for a different strength or model, rerun with from_prompt_id + input_overrides, and don't re-upload the source.
  • Each claude-code/commands/*.md twin gets the same step, byte-identical to its skills/ counterpart.
  • comfy-help (both copies) gets one new capability line: "Refine a previous result without rebuilding it (rerun with changed inputs)."

Judgment calls

  • include_workflow: true, not "knobs". On the MCP server's main, get_job_status.include_workflow is a z.boolean(). The "knobs" value is still in an open server PR. A skill that tells the agent to pass "knobs" today would fail schema validation, so the step only names true.
  • The "edit the image" example says "keep this exact picture, just make it night-time", not just "make it night-time". The proposed wording used "make it night-time" as the example of an image edit. But the acceptance scenario ("same but at night, seed 7") expects a rerun with changed inputs. With the bare phrase, the two would point the agent in opposite directions for the same request. The example now names the edit-the-pixels case explicitly.
  • Step numbers and the poll step depend on the skill. Audio has one step fewer, so its refine step is 10 and continues from step 6. Every other skill uses step 11 and continues from step 7.
  • The media word changes per skill (IMAGE / VIDEO / 3D MODEL / AUDIO, each with a fitting example). The mechanism text is otherwise identical.
  • Two sentences the proposed text didn't have: (1) a new reference image still goes through upload_file, and its returned filename is what gets overridden; (2) a result that came from Step 0's partner_generate has no submitted workflow to rerun, so the agent calls partner_generate again with the changed fields. Without (2), the step would send the agent to from_prompt_id on a run where it doesn't apply.

Residual

  • The ticket's manual acceptance run was not done. The run is: plugin installed, /comfy-cloud:generate-image a lighthouse, then "same but at night, seed 7", and check for exactly one submit_workflow with from_prompt_id plus a 1–2 key input_overrides, and no get_template call. It spends Comfy Cloud credits and needs an interactive session with the plugin, so it is unexercised. Someone with the plugin installed should run it.
  • include_workflow: "knobs" is not referenced. It isn't on the MCP server's main yet. Once the server PR adding it merges, the step can be updated to prefer "knobs", which returns a smaller payload than the full graph.
  • openclaw/comfy/SKILL.md was not touched. It is a third skill surface that already mentions input_overrides for run_template. The ticket didn't name it, and it doesn't follow the step-numbered format.
  • Older skills/ ↔ claude-code/commands/ drift is not reconciled. Before this PR, the twins already differed: partner/ vs api node/ category prefixes in the Step 0 text of image/audio/3d/video, plus video's MiniMax notes. This PR only keeps the new step identical and leaves that drift alone.
  • The repo has no automated lint or parity check. There is no package.json and no test workflow; the only CI is the unreviewed-merge detector. So "CI stays green" here means only the scripted parity and whitespace checks listed below.

Provenance

  • Authored by: agent-work loop
  • Verified:
    • Parity: the refine step is byte-identical between skills/comfy-X.md and claude-code/commands/X.md for all 6 step pairs, and the help line matches in both copies
    • Merged with current main: the diff against main is still the same 26 added lines in 14 files, with no conflict markers left
    • Step numbers: each refine step comes right after main's save-and-link step, and its "continue from" step is still that skill's poll step
    • Server contract read on the MCP server's main: submit_workflow accepts from_prompt_id + input_overrides, and get_job_status.include_workflow is boolean-only
    • Doc-drift sweep: 17 identifiers checked, 0 references found
    • Not run: the live plugin acceptance scenario (see Residual)
  • Deviations:
    • include_workflow: "knobs" dropped (not on the server's main)
    • Refine step renumbered to 11 (audio: 10) so it sits after main's new save-and-link step
    • The image-edit example was reworded so it no longer contradicts the acceptance scenario

🔄 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/40 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 10/5/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `matt/be-18944-refine-step` --- ### 📝 Commits (2) - [`5344caf`](https://github.com/Comfy-Org/comfy-skills/commit/5344cafd22b0eddc2f3c51557e51a26266ca31b8) feat(skills): add a refine step to the generate skills and slash commands - [`38ff442`](https://github.com/Comfy-Org/comfy-skills/commit/38ff442a593d68d64cae04a509c5d16eb42dabba) Merge remote-tracking branch 'origin/main' into matt/be-18944-refine-step ### 📊 Changes **14 files changed** (+26 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `claude-code/commands/generate-3d.md` (+2 -0) 📝 `claude-code/commands/generate-audio.md` (+2 -0) 📝 `claude-code/commands/generate-image.md` (+2 -0) 📝 `claude-code/commands/generate-video.md` (+2 -0) 📝 `claude-code/commands/help.md` (+1 -0) 📝 `claude-code/commands/remove-background.md` (+2 -0) 📝 `claude-code/commands/upscale-image.md` (+2 -0) 📝 `skills/comfy-generate-3d.md` (+2 -0) 📝 `skills/comfy-generate-audio.md` (+2 -0) 📝 `skills/comfy-generate-image.md` (+2 -0) 📝 `skills/comfy-generate-video.md` (+2 -0) 📝 `skills/comfy-help.md` (+1 -0) 📝 `skills/comfy-remove-background.md` (+2 -0) 📝 `skills/comfy-upscale-image.md` (+2 -0) </details> ### 📄 Description ## ELI5 When someone generates a picture and then says "same thing, but at night, seed 7", the agent used to rebuild the whole workflow from scratch or paste the graph back in by hand. Now every generate skill has a last step that says: rerun the earlier job and change only the inputs the user asked about. ## What changed - `skills/comfy-generate-{image,video,3d}.md` get a new step 11, and `skills/comfy-generate-audio.md` gets step 10. Each one goes right after the save-and-link step that main added as the previous final step. The step says: for an adjustment rather than a new subject, call `submit_workflow` with `from_prompt_id` (the run being adjusted) plus `input_overrides` holding only the changed inputs. If the node id isn't known, read it from `get_job_status` with `include_workflow: true` first, then go back to the polling step. If the user wants the output itself edited, use `use_previous_output` / `partner_generate medias[]` instead. - `skills/comfy-upscale-image.md` and `skills/comfy-remove-background.md` get the shorter step 11: for a different strength or model, rerun with `from_prompt_id` + `input_overrides`, and don't re-upload the source. - Each `claude-code/commands/*.md` twin gets the same step, byte-identical to its `skills/` counterpart. - `comfy-help` (both copies) gets one new capability line: "Refine a previous result without rebuilding it (rerun with changed inputs)." ## Judgment calls - **`include_workflow: true`, not `"knobs"`.** On the MCP server's `main`, `get_job_status.include_workflow` is a `z.boolean()`. The `"knobs"` value is still in an open server PR. A skill that tells the agent to pass `"knobs"` today would fail schema validation, so the step only names `true`. - **The "edit the image" example says "keep this exact picture, just make it night-time", not just "make it night-time".** The proposed wording used "make it night-time" as the example of an *image edit*. But the acceptance scenario ("same but at night, seed 7") expects a *rerun* with changed inputs. With the bare phrase, the two would point the agent in opposite directions for the same request. The example now names the edit-the-pixels case explicitly. - **Step numbers and the poll step depend on the skill.** Audio has one step fewer, so its refine step is 10 and continues from step 6. Every other skill uses step 11 and continues from step 7. - **The media word changes per skill** (IMAGE / VIDEO / 3D MODEL / AUDIO, each with a fitting example). The mechanism text is otherwise identical. - **Two sentences the proposed text didn't have:** (1) a new reference image still goes through `upload_file`, and its returned filename is what gets overridden; (2) a result that came from Step 0's `partner_generate` has no submitted workflow to rerun, so the agent calls `partner_generate` again with the changed fields. Without (2), the step would send the agent to `from_prompt_id` on a run where it doesn't apply. ## Residual - **The ticket's manual acceptance run was not done.** The run is: plugin installed, `/comfy-cloud:generate-image a lighthouse`, then "same but at night, seed 7", and check for exactly one `submit_workflow` with `from_prompt_id` plus a 1–2 key `input_overrides`, and no `get_template` call. It spends Comfy Cloud credits and needs an interactive session with the plugin, so it is unexercised. Someone with the plugin installed should run it. - **`include_workflow: "knobs"` is not referenced.** It isn't on the MCP server's `main` yet. Once the server PR adding it merges, the step can be updated to prefer `"knobs"`, which returns a smaller payload than the full graph. - **`openclaw/comfy/SKILL.md` was not touched.** It is a third skill surface that already mentions `input_overrides` for `run_template`. The ticket didn't name it, and it doesn't follow the step-numbered format. - **Older `skills/` ↔ `claude-code/commands/` drift is not reconciled.** Before this PR, the twins already differed: `partner/` vs `api node/` category prefixes in the Step 0 text of image/audio/3d/video, plus video's MiniMax notes. This PR only keeps the *new* step identical and leaves that drift alone. - **The repo has no automated lint or parity check.** There is no `package.json` and no test workflow; the only CI is the unreviewed-merge detector. So "CI stays green" here means only the scripted parity and whitespace checks listed below. ## Provenance - **Authored by:** agent-work loop - **Verified:** - Parity: the refine step is byte-identical between `skills/comfy-X.md` and `claude-code/commands/X.md` for all 6 step pairs, and the help line matches in both copies - Merged with current `main`: the diff against `main` is still the same 26 added lines in 14 files, with no conflict markers left - Step numbers: each refine step comes right after main's save-and-link step, and its "continue from" step is still that skill's poll step - Server contract read on the MCP server's `main`: `submit_workflow` accepts `from_prompt_id` + `input_overrides`, and `get_job_status.include_workflow` is boolean-only - Doc-drift sweep: 17 identifiers checked, 0 references found - Not run: the live plugin acceptance scenario (see Residual) - **Deviations:** - `include_workflow: "knobs"` dropped (not on the server's main) - Refine step renumbered to 11 (audio: 10) so it sits after main's new save-and-link step - The image-edit example was reworded so it no longer contradicts the acceptance scenario --- <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#39
No description provided.