ComfyUI prompt engineering knowledge covering CLIP text encoding syntax, weight modifiers, model-specific prompting strategies, and best practices.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# ComfyUI Prompt Engineering
## CLIP Text Encoding Fundamentals
ComfyUI uses CLIP (Contrastive Language-Image Pre-training) text encoders to convert text prompts into conditioning tensors. The `CLIPTextEncode` node takes a text string and a CLIP model, producing a `CONDITIONING` output for the KSampler.
### Token Limit
CLIP processes text in **77-token chunks**. Each word is typically 1-3 tokens. Prompts exceeding 77 tokens are silently truncated unless you use the BREAK token or a multi-clip encoding node.
## Weight Syntax
### Emphasis (Attention Weights)
Adjust how strongly the model attends to specific words or phrases:
| Syntax | Effect | Equivalent Weight |
|--------|--------|-------------------|
| `(word:1.3)` | Increase emphasis by 30% | Explicit weight 1.3 |
| `(word:0.7)` | Decrease emphasis by 30% | Explicit weight 0.7 |
| `(word)` | Slight increase | `(word:1.1)` |
| `((word))` | Moderate increase | `(word:1.21)` — 1.1^2 |
| `(((word)))` | Strong increase | `(word:1.331)` — 1.1^3 |
| `[word]` | Slight decrease | `(word:0.9091)` — 1/1.1 |
| `[[word]]` | Moderate decrease | `(word:0.8264)` — 1/1.1^2 |
### Weight Rules
…
The line at the top of this page pins the label git:20260825.973d578, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
A 17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
pass: Frontmatter block present
pass: Frontmatter declares a name
pass: Frontmatter declares a description
pass: Size between 200 bytes and 200 KB (11759 bytes)
pass: No zero-width or bidi control characters
pass: No instruction hidden inside an HTML comment
pass: No link to an exfiltration or paste host
pass: No credential-shaped string
pass: No instruction to send local credentials anywhere
pass: No text hidden with inline styles
pass: No prompt-injection phrasing
pass: No curl or wget piped into a shell
pass: No recursive delete of root, home or parent
pass: No instruction to read or print local credentials
pass: No base64 blob over 200 characters
pass: No link to a raw IP address
pass: No script tag
Source
GitHub
artokun/comfyui-mcp · 887 stars · license MIT · pushed 2026-11-02 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_nk2h26ypelqcum5k
GET https://markdownregistry.com/api/v1/resolve?ref=artokun/comfyui-mcp/prompt-engineering
GET https://markdownregistry.com/api/v1/blob/cc46604075a1638db8feb25ee3148c312e8acd39e3a03131547a6de5af8d9331
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
artokun/comfyui-mcp · plugin/skills/anima-lora-trainer/SKILL.md · Train a custom anime LoRA on the ANIMA base model with Citron's local Gradio trainer (kohya sd-scripts), <6GB VRAM…
artokun/comfyui-mcp · plugin/skills/civitai/SKILL.md · Discover Civitai models with the BUILT-IN download_model action:"search_civitai" and install/generate them locally…
artokun/comfyui-mcp · plugin/skills/color-correction/SKILL.md · Diagnose and fix video/image color OBJECTIVELY with the get_image (action:"analyze_color") tool (scopes/stats such as…
artokun/comfyui-mcp · plugin/skills/comfyui-launch-flags/SKILL.md · Pick the right ComfyUI startup flags for VRAM, attention, caching, and speed. The full decision matrix for OOM…
artokun/comfyui-mcp · plugin/skills/debug-render/SKILL.md · Debug a WRONG or imperfect render (not a hard error) by inspecting inputs and intermediate steps with run-to-node…
artokun/comfyui-mcp · plugin/skills/director/SKILL.md · Full production pipeline covering story to scenes, Z-Image start frames, Qwen Edit end frames, WAN FLF video clips…
ericrisco/rsc-harness · skills/prompt-engineering/SKILL.md · Use when one prompt must give the same right answer across reruns, models, and pasted-in hostile input: forcing a fixed…
giuseppe-trisciuoglio/developer-kit · plugins/developer-kit-ai/skills/prompt-engineering/SKILL.md · Provides workflows to write, debug, and optimize prompts for LLMs, including few-shot example selection…
codealive-ai/ai-driven-development · skills/prompt-engineering/SKILL.md · Universal prompt engineering techniques for any LLM. Use when crafting, optimizing, or reviewing prompts for AI models…
doodledood/manifest-dev · claude-plugins/manifest-dev-tools/skills/prompt-engineering/SKILL.md · Create, update, review, or discuss an LLM prompt — a system prompt, a skill, or an agent. Use when writing or improving…
nahid-sparktales/agent-dispatcher · skills/ai/prompt-engineering/SKILL.md · Write or revise a prompt so it holds up — output contract, instruction placement, examples that earn their place, an…
vodailocz/kilo-kit-mcp · skills/engineering/prompt-engineering/SKILL.md · Use when designing, optimizing, testing, or deploying robust prompt systems for AI agents. This skill provides…