Comfyui prompt engineering
Skill yigityildiz0/universal-ai-skill-library/skills/common/comfyui-prompt-engineering
531 searchable AI Agent Skills for Claude Code, OpenAI Codex, and OpenCode — EN/TR catalog, platform and risk notes, direct ZIPs, and curated bundles.
npx -y skills add yigityildiz0/universal-ai-skill-library --skill comfyui-prompt-engineeringAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
3 things to look at
- 18 days oldThe repository was created 18 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Diagnose and improve ComfyUI text conditioning with architecture-aware prompts, encoder and node compatibility checks, controlled experiments, and.
SKILL.md
7.3 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it
ComfyUI Prompt Engineering
Prompt behavior belongs to the loaded workflow, text encoder, checkpoint architecture, and node implementation. Never apply one universal token limit, weight syntax, negative-prompt recipe, or keyword style to every ComfyUI model.
Start With the Workflow, Not a Prompt Myth
Inspect the workflow JSON or live graph and record:
- checkpoint/model architecture and exact loader nodes;
- positive and negative conditioning paths;
- text encoders loaded and how many are active;
- built-in versus custom prompt/conditioning nodes and their versions;
- LoRAs, textual inversions, style models, ControlNet/adapters, and guidance nodes;
- sampler, scheduler, steps, CFG/guidance, denoise, resolution, seed;
- relevant console warnings and model/node compatibility errors.
If the architecture cannot be identified, say so and use a minimal empirical test. Do not guess from the filename alone.
Architecture-Aware Routing
| Family or workflow | Prompt implication to verify |
|---|---|
| SD 1.x/2.x-style CLIP | concise tag/phrase prompts and CLIP weighting often work well |
| SDXL | dual-CLIP conditioning and pooled output matter; use SDXL-compatible embeddings/LoRAs |
| FLUX-style native workflows | commonly combine CLIP-L and T5; natural descriptions may matter more than legacy quality-tag piles |
| SD3-style workflows | may use multiple text encoders; follow the official template and loader contract |
| model-specific/custom nodes | syntax, token handling, negative conditioning, and weights may differ |
These are routing hints, not universal laws. Prefer the model card, official ComfyUI example/template, and the actual node source for the installed version.
Supported Built-In Syntax
For the built-in CLIPTextEncode path, current official ComfyUI documentation describes:
(phrase:1.2)to increase weight;(phrase:0.8)to decrease weight;(phrase)as the default emphasis step;\(and\)for literal parentheses;embedding:file_namefor textual inversions;- dynamic prompt and comment syntax supported by the current built-in node/UI.
Before using any syntax, verify that the active node is the built-in encoder. Custom nodes may parse prompts differently.
Do not state that all prompts are truncated after 77 tokens. A CLIP encoder has a limited native context window, but ComfyUI and custom nodes can tokenize, chunk, pad, combine, or route long input differently. Inspect the active tokenizer/node implementation or test with controlled prompts. Likewise, do not claim BREAK has identical behavior across all nodes and architectures.
Weighting Rules
- Start at
1.0and change one concept at a time. - Use small changes first; large weights can distort composition or create artifacts.
- Weight phrases, not long paragraphs.
- If weighting appears ineffective, confirm node syntax and encoder compatibility before increasing it.
- Nested-parenthesis math and accepted ranges are implementation details; do not present them as universal unless verified from the active parser.
- Record the exact prompt and workflow seed for every comparison.
Embeddings and LoRAs
- Verify architecture compatibility before loading. An SD 1.5 embedding is not automatically valid for SDXL or another encoder family.
- Confirm the file resolved and check console output for missing/unloaded keys.
- Use the trigger words and recommended strengths from the artifact's trusted documentation, then test locally.
- Separate model strength from text-encoder strength when the loader exposes both.
- Add one adapter at a time during diagnosis; stacked adapters can mask prompt effects.
- Treat downloaded model files as untrusted. Preserve hashes and source provenance; do not run bundled executables/scripts blindly.
Prompt Construction
Build from intent to detail:
- subject and action;
- composition and camera/viewpoint;
- environment and relationships;
- lighting, material, and color;
- style/medium when desired;
- model-specific quality or trigger tokens only when evidence supports them.
Put important concepts clearly and early, but do not assume simple word order alone determines attention. Avoid contradictory adjectives, duplicated quality tags, incompatible styles, and excessive micro-detail.
Negative conditioning
Use negatives only when the workflow/model supports them meaningfully. Start empty or minimal, observe a repeatable failure, then add the smallest exclusion that improves it. Huge generic negative lists can remove desired features or interact unpredictably with CFG/guidance.
Some architectures or distilled workflows use different guidance/negative-conditioning designs. Follow the official template rather than forcing an SD 1.5 pattern.
Controlled Improvement Loop
Freeze every non-prompt variable:
- seed;
- checkpoint and encoders;
- LoRA/embedding versions and strengths;
- sampler, scheduler, steps, guidance/CFG, denoise;
- resolution and latent/image inputs.
Then run:
- baseline — shortest prompt that states the goal;
- single-factor variant — add or alter one prompt concept;
- repeat — use several fixed seeds if the result may be seed-specific;
- compare — composition, subject accuracy, artifacts, style, and unwanted changes;
- keep/revert — retain only measured improvements;
- save — workflow JSON, prompts, seeds, output paths, and notes.
Do not compare two prompts while also changing checkpoint, sampler, resolution, and LoRA stack.
Symptom Triage
| Symptom | Check before rewriting the whole prompt |
|---|---|
| details ignored | encoder/node path, tokenizer behavior, prompt conflicts, concept load |
| image does not match prompt | wrong text encoder/checkpoint pairing, bypassed conditioning, adapter dominance |
| weights do nothing | custom-node syntax, parser version, phrase boundaries |
| style overwhelms subject | style/LoRA strength, repeated trigger terms, CFG/guidance |
| distorted output | excessive weights, incompatible embeddings/LoRAs, resolution, sampler/guidance |
| negative prompt harms image | architecture support, overly broad negatives, high CFG |
| different behavior after update | node/ComfyUI/model version drift; diff workflow and logs |
Evidence Sources
Use this order:
- actual workflow JSON and console output;
- installed node source/version;
- official ComfyUI workflow template and built-in-node documentation;
- model card and trusted artifact documentation;
- controlled local A/B results.
Community prompt recipes are hypotheses, not facts.
Completion Report
Report the architecture, encoder/node path, prompt changes, frozen parameters, seeds, outputs compared, result, and remaining uncertainty. If a live render was not run, state that the recommendation is unverified.
Quality Gate
- Architecture and encoder path were identified or uncertainty was stated.
- Syntax was verified for the active node.
- No universal 77-token,
BREAK, negative-prompt, or weight claim was made. - Embeddings/LoRAs were checked for compatibility and provenance.
- A/B tests changed one factor at a time and preserved seeds.
- Workflow and output evidence were saved for reproduction.
Gives 0 of the 12 instructions most prompt engineering skills give in ~1.5k tokens
Counted across 563 of the 626 authors here whose files we hold, read 2026-08-06
- ask at most three clarifying questionsin 22 of 563, across 15 files
- respond in the user input languagein 14 of 563, across 9 files
- preserve the original intentin 13 of 563, across 11 files
- Establish baseline metrics and collect representative examplesin 12 of 563, across 2 files
- Identify failure modes and prioritize high-impact fixesin 12 of 563, across 2 files
- Apply prompt and workflow improvements with measurable goalsin 12 of 563, across 2 files
- Roll back quickly if quality or safety metrics regressin 12 of 563, across 2 files
- validate changes with tests and roll out in controlled stagesin 12 of 563, across 2 files
- generate quantitative baseline performance reportsin 12 of 563, across 2 files
- create representative test scenariosin 12 of 563, across 2 files
- treat prompts as codein 12 of 563, across 5 files
- test prompts on diverse inputsin 12 of 563, across 8 files
Said here and by no other author read
- inspect the workflow json before applying prompts
- verify active node syntax before usage
- start weighting at 1.0 and change one concept at a time
- verify architecture compatibility before loading embeddings or loras
- add one adapter at a time during diagnosis
- freeze every non-prompt variable before testing
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.