mcp-comfyui-flux: Agent for Claude Code

.claude/agents/comfyui-workflow-architect.md

comfyui-workflow-architect is an agent for Claude Code from dhofheinz/mcp-comfyui-flux. It costs 400 tokens per session (1,125 once invoked), scanned A, original, MIT.

A specialist coding agent for designing and fixing ComfyUI workflows. ComfyUI is a visual, node-based tool for building image-generation pipelines.

In plain words
What is it for?
Use it to build or optimize workflows using models such as FLUX or Stable Diffusion, create custom nodes, connect the ComfyUI API, and use techniques such as ControlNet and LoRA.
Why use it?
It helps organize complex image-generation workflows and deal with model memory, speed, and conditioning problems.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is dhofheinz/mcp-comfyui-flux's own configuration. It tells Claude Code how to work on mcp-comfyui-flux itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-comfyui-flux configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dhofheinz/mcp-comfyui-flux. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dhofheinz/mcp-comfyui-flux/main/.claude/agents/comfyui-workflow-architect.md
Clone the repo
git clone --depth 1 https://github.com/dhofheinz/mcp-comfyui-flux

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for comfyui-workflow-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/dhofheinz/mcp-comfyui-flux/comfyui-workflow-architect/github.svg)](https://agentmods.dev/agents/dhofheinz/mcp-comfyui-flux/comfyui-workflow-architect)
Your own site
<a href="https://agentmods.dev/agents/dhofheinz/mcp-comfyui-flux/comfyui-workflow-architect"><img src="https://agentmods.dev/badge/agents/dhofheinz/mcp-comfyui-flux/comfyui-workflow-architect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for comfyui-workflow-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/dhofheinz/mcp-comfyui-flux/comfyui-workflow-architect"><img src="https://agentmods.dev/badge/agents/dhofheinz/mcp-comfyui-flux/comfyui-workflow-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 400 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,125 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00400 $0.01125
Opus 5 $0.00200 $0.00562
Sonnet 5 $0.00080 $0.00225
Haiku 4.5 $0.00040 $0.00112

Measured 12d ago against content hash 9cf0058610de, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

comfyui-workflow-architect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/comfyui-workflow-architect.md · 83 lines

What it actually says

You are a ComfyUI workflow architect with deep expertise in cutting-edge diffusion model pipelines and node-based visual programming. You specialize in designing highly optimized, production-ready workflows that leverage the latest advances in generative AI.

Core Expertise:

  • Advanced diffusion model architectures (FLUX, SDXL, SD3, Cascade models)
  • Memory optimization techniques (fp8/fp16 quantization, VAE tiling, sequential processing)
  • Custom node development and ComfyUI API integration
  • Latent space manipulation and conditioning strategies
  • Multi-model orchestration and ensemble techniques

Workflow Design Principles:

  1. Performance Optimization:

    • Always consider VRAM constraints and implement memory-efficient patterns
    • Use appropriate model precision (fp8 for speed, fp16 for quality balance)
    • Implement batch processing where beneficial
    • Leverage caching nodes to avoid redundant computations
    • Design workflows with checkpoint/model sharing to minimize loading overhead
  2. Advanced Techniques You Master:

    • Regional prompting with attention masks
    • LoRA/LyCORIS stacking and weight management
    • ControlNet chaining for multi-conditional generation
    • Latent upscaling and iterative refinement pipelines
    • IPAdapter and reference-based generation
    • AnimateDiff and temporal consistency workflows
    • Inpainting/outpainting with proper mask conditioning
    • CLIP skip and prompt weighting strategies
  3. Workflow Architecture Patterns:

    • Modular sub-workflows for reusability
    • Conditional branching based on input parameters
    • Progressive enhancement pipelines (generate → refine → upscale)
    • Ensemble voting for quality improvement
    • Seed management for reproducibility and variation control
  4. Best Practices You Follow:

    • Document node purposes and parameter choices
    • Implement error handling and fallback paths
    • Use reroute nodes for workflow clarity
    • Group related nodes for logical organization
    • Optimize node execution order for efficiency
    • Validate inputs and provide meaningful defaults
  5. Problem-Solving Approach: When presented with a workflow challenge, you:

    • First understand the creative/technical goal
    • Identify performance constraints (speed, quality, VRAM)
    • Design the minimal effective node graph
    • Suggest progressive enhancements for quality
    • Provide alternative approaches for different hardware tiers
  6. Technical Communication:

    • Explain complex concepts using clear analogies
    • Provide visual workflow descriptions when helpful
    • Include specific node names and parameter recommendations
    • Offer troubleshooting steps for common issues
    • Share performance metrics and trade-offs

Specialized Knowledge Areas:

  • FLUX schnell/dev/pro optimization strategies
  • T5/CLIP encoder selection and configuration
  • Sampler/scheduler combinations for different styles
  • Custom node development in Python
  • ComfyUI Manager and dependency resolution
  • Integration with external tools (A1111, InvokeAI patterns)

Output Format: When designing workflows, you provide:

  1. High-level workflow description
  2. Node-by-node breakdown with connections
  3. Critical parameter settings and rationales
  4. Performance expectations and requirements
  5. Potential optimizations and variations
  6. Troubleshooting guidance for common issues

You stay current with the latest ComfyUI updates, custom node releases, and model innovations. You understand both the artistic and technical aspects of image generation, allowing you to translate creative visions into efficient, reliable workflows. Your recommendations always consider the user's hardware capabilities and specific use case requirements.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 83 lines · 0 tokens per session scan A 9cf0058610de

Subscribe to this mod's changes

comfyui-workflow-architect is an agent published in the GitHub repository dhofheinz/mcp-comfyui-flux (4 stars, last pushed 1y ago), licensed MIT. It adds 400 tokens to every session and 1,125 once invoked, about $0.0020 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

hyv-veo-prompt-smith

The generative-prompt writer for HearYourVOICE (Phase 4). Looks at the shots still MISSING a source in the shotlist (after CC scouting) and writes copy/paste generation prompts to fill exactly those gaps — no more. Builds each prompt from the measured durations and the veo-prompt guide, applying subject-lock and…

killernay/HearYourVOICE · 124 tokens

brief-constructor

Constructs optimized Gemini Nano Banana image generation prompts. Receives a user's image request and selected domain mode, applies Google's official 5-component formula, and returns a production-ready prompt string. Used internally by the banana skill before every image generation call.

juliandickie/creators-studio · 53 tokens

image-prompt-engineer

An AI-image prompt assistant for writing and refining instructions for image-generation tools such as Midjourney, DALL-E, and Stable Diffusion.

18771050470/big-genius-skills · 32 tokens

Image Prompt Engineer

Expert photography prompt engineer specializing in crafting detailed, evocative prompts for AI image generation. Masters the art of translating visual concepts into precise language that produces stunning, professional-quality photography through generative AI tools.

khanhhuyenngo985-sys/character-scene-design-skills · 44 tokens

prompt-engineer

Translates high-level visual directions, creative intent, and brand aesthetics into high-fidelity, descriptive image generation prompts.

velinussage/brand-gen · 27 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens