workflow-template-builder
/workflow-template-builder
Builds or modifies ComfyUI workflow JSON templates in MooshieUI's Rust backend (src-tauri/src/templates). Use for new generation modes, template nodes, LoRA chains, upscale append chains, or ComfyUI workflow wiring.
- Author
- Mooshieblob1 ↗
- Repository
- MooshieUI ↗
- Licence
- AGPL-3.0
- Last repository change
- 24.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.
AGPL-3.0, copyleft: przeróbki udostępniane innym muszą mieć tę samą licencję.
What it does and when to use it
Builds or modifies ComfyUI workflow JSON templates in MooshieUI's Rust backend (src-tauri/src/templates). Use for new generation modes, template nodes, LoRA chains, upscale append chains, or ComfyUI workflow wiring.
Original author description
Builds or modifies ComfyUI workflow JSON templates in MooshieUI's Rust backend (src-tauri/src/templates). Use for new generation modes, template nodes, LoRA chains, upscale append chains, or ComfyUI workflow wiring.
How it works
- Before coding
- Rules
- WorkflowResult
- Pipeline order (summary)
- finishworkflow chain (mod.rs)
- New template checklist
- Reference
SKILL.md preview
---
name: workflow-template-builder
description: >-
Builds or modifies ComfyUI workflow JSON templates in MooshieUI's Rust backend
(src-tauri/src/templates). Use for new generation modes, template nodes, LoRA chains,
upscale append chains, or ComfyUI workflow wiring.
---
# Workflow Template Builder (MooshieUI)
Specialist workflow for `src-tauri/src/templates/`. Each template builds `serde_json::Map<String, Value>` for the ComfyUI API.
## Before coding
1. Read `src-tauri/src/templates/mod.rs`
2. Read `txt2img.rs` (reference pattern)
3. If new params needed → **add-generation-param** skill first
4. If a custom ComfyUI node is needed → **add-comfyui-node** skill first
## Rules
1. Return **`WorkflowResult`** with all fields set
2. Node IDs: `next_id.to_string()` after each node (`"1"`, `"2"`, …)
3. Use `json!{}` for nodes
4. Connections: `[node_id, port]` arrays from `(String, u32)` tuples
5. Register: `pub mod x;` + `build_workflow()` match arm in `mod.rs`
6. `SaveImage` is appended in `mod.rs`, not per-template
## WorkflowResult
```rust
pub struct WorkflowResult {
pub workflow: serde_json::Map<String, Value>,
pub next_id: u32,
pub image_output: (String, u32),
pub model_source: (String, u32),
pub clip_source: (String, u32),
pub positive_source: (String, u32),
pub negative_source: (String, u32),
pub vae_source: (String, u32),
/// KSampler node ID — needed to rewire ± after ControlNet injection.
pub sampler_id: String,
}
```
## Pipeline order (summary)
| Mode | Flow |
|------|------|
| txt2img | Checkpoint → LoRAs → VAE? → CLIP×2 → EmptyLatent → KSampler → VAEDecode |
| img2img | … → LoadImage → VAEEncode → KSampler (denoise < 1) → VAEDecode |
| inpainting | … → LoadImage + Mask → VAEEncodeForInpaint → KSampler → VAEDecode |
| upscale append | IMAGE → upscale → VAEEncodeTiled → KSampler → VAEDecodeTiled |
## finish_workflow chain (mod.rs)
Post-process steps append to the template's final IMAGE in **this fixed order**:
```
template image → upscale? → facefix? → segment refinement? → MooshieSaveImage
```
Seed offsets per step: `seed+2` facefix, `seed+3+i` per `<segment>` tag. New chains pick an unused offset.
## New template checklist
```
- [ ] src-tauri/src/templates/new_mode.rs
- [ ] pub fn build(params: &GenerationParams, seed: i64) -> WorkflowResult
- [ ] mod.rs: pub mod + build_workflow match
- [ ] cargo check --manifest-path src-tauri/Cargo.toml
```
## Reference
ComfyUI node tables, connection syntax, append-chain pattern: [reference.md](reference.md)
Files in this package (2)
- SKILL.md 3 KB
- reference.md 2 KB
Versions
The database has no other skills named workflow-template-builder.
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 9c401f893023 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100add-generation-param
Adds a generation parameter across MooshieUI's Svelte store, TypeScript types, Rust GenerationParams, and workflow templates. Use for new UI settings, ComfyUI inputs, or /add-generation-param. - 100add-comfyui-node
Adds a custom ComfyUI Python node to MooshieUI — Python class in mooshie_nodes.py, Rust required-class registration, and optional workflow template chain hookup. Use for new image-processing nodes (detailers, detectors, compositors) or /add-comfyui-node. - 100rust-tauri-backend
Implement or modify VMark's Rust/Tauri v2 backend and its frontend bridge - Tauri commands, invoke/emit/listen IPC, menu items and accelerators, Tauri plugins and capabilities, windows, filesystem and platform behaviour in src-tauri. Use for any change under src-tauri/ or to a… - 100comfyui-workflow-analysis
Analyzes a downloaded ComfyUI workflow JSON to list required custom nodes and models, install locations and a setup checklist. Use when the user shares a workflow JSON or asks 'what nodes does this need' or 'help me set up this workflow'. - 95comfyui-job-pipeline
Put ComfyUI behind one boundary in an app, so the frontend sends product words (a JobSpec) and never a node id. Use when an app calls ComfyUI's HTTP API (POST /prompt, /history, /view, /upload/image), when a component edits a workflow JSON by node id, when a re-exported workflow… - 100comfyui
Use when working with ComfyUI workflows in Video Generation Automation, including comfyui_image/comfyui_video, custom workflow_json/workflow_path inputs, output_node selection, missing model setup, LoRAs, low-VRAM workflow choices, and community workflow imports.