prompt-engineering

prompt-engineering is a skill for Claude Code, Codex from sandyup/comfyui-mcp. It costs 28 tokens per session (2,952 once invoked), scanned A, a copy of prompt-engineering, MIT.

A guide to writing text prompts for ComfyUI, where a CLIP text encoder turns words into instructions for an image-generation model.

In plain words
What is it for?
Use it to control which subjects, styles, and details an image model follows, including increasing or reducing emphasis on specific words.
Why use it?
It explains prompt length limits and weighting syntax so important words are not silently cut off or given the wrong emphasis.

Skill for Claude CodeCodex

Part of the comfy plugin — 32 skills, 11 commands, 4 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sandyup/comfyui-mcp/prompt-engineering
Any agent
npx skills add sandyup/comfyui-mcp --skill prompt-engineering
Clone the repo
git clone --depth 1 https://github.com/sandyup/comfyui-mcp

Made for: Claude Code, Codex.

Or install comfy, the plugin that ships this one along with the rest of its 32 skills, 11 commands, 4 agents, 2 hooks.

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 prompt-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/sandyup/comfyui-mcp/prompt-engineering.svg)](https://agentmods.dev/skills/sandyup/comfyui-mcp/prompt-engineering)
Your own site
<a href="https://agentmods.dev/skills/sandyup/comfyui-mcp/prompt-engineering"><img src="https://agentmods.dev/badge/skills/sandyup/comfyui-mcp/prompt-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,952 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% copy Near-identical to another mod 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 $0.00028 $0.02952
Opus 5 $0.00014 $0.01476
Sonnet 5 $0.00006 $0.00590
Haiku 4.5 $0.00003 $0.00295

Measured 4d ago against content hash ad90d86aedc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompt-engineering 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 4d 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.

Origin

This is a copy

94% identical to prompt-engineering — 39 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugin/skills/prompt-engineering/SKILL.md · 305 lines

How it starts

The opening of the file, as written. The whole thing — 305 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  • Valid range: 0.0 to 2.0 (going beyond 1.5 often causes artifacts)
  • Default weight: 1.0 for unmodified tokens
  • Nesting stacks multiplicatively: ((word)) = 1.1 * 1.1 = (word:1.21)
  • Phrases: (red sports car:1.3) applies weight to the entire phrase
  • Mixing: (detailed face:1.4), (blurry background:0.6) — combine in one prompt

Examples

a (beautiful:1.3) woman with (flowing red hair:1.2), wearing a blue dress, (sharp focus:1.1)
(masterpiece:1.4), (best quality:1.3), a knight in (ornate armor:1.2), standing on a cliff, (dramatic lighting:1.1), cinematic

BREAK Token

The BREAK keyword forces CLIP to end the current 77-token chunk and start processing subsequent text in a new chunk. This is critical for long prompts.

When to Use BREAK

  • Prompt exceeds ~60 words (approaching the 77-token limit)
  • You want to separate conceptually distinct parts of the prompt
  • Certain details are being ignored (they may be past the 77-token cutoff)

Read the full file on GitHub · 305 lines

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. 4d ago First seen · 305 lines · 28 tokens per session scan A ad90d86aedc4

Subscribe to this mod's changes

prompt-engineering is a skill published in the GitHub repository sandyup/comfyui-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 2,952 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to prompt-engineering, differing in 39 lines, and is treated as a copy.

Related

Other skills, from other repositories

add-prompt-enhancement-guide

Author a prompt-enhancement system prompt for a new ecosystem and register/update it on the orchestrator's prompt-analysis service. Use when onboarding a new ecosystem (e.g. happyhorse, a new Flux variant, a new Wan video version) and the user provides the ecosystem key plus a reference link, model card, or…

civitai/civitai · 95 tokens

ideogram4

Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers…

digitalsamba/claude-code-video-toolkit · 99 tokens

seedance-antislop

This skill should be used when a Seedance 2.0 prompt contains generic AI filler, hollow superlatives, vague cinematic language, bloated adjectives, weak verbs, or needs sharper production-specific wording.

Emily2040/seedance-2.0 · 48 tokens

seedance-examples-ja

This skill should be used when the user asks for Japanese Seedance 2.0 examples, Japanese prompt patterns, example rewrites, or safe versions of working Japanese video-generation prompts.

Emily2040/seedance-2.0 · 43 tokens

seedance-filter

This skill should be used when a Seedance 2.0 prompt is blocked, rejected, silently degraded, or likely to trigger a content filter; or when the user asks for a safer rewrite without losing the creative intent.

Emily2040/seedance-2.0 · 49 tokens

seedance-prompt-short

This skill should be used when the user asks for a compact Seedance 2.0 prompt, short Chinese prompt, prompt compression, 30-100 word output, or removal of unnecessary prompt language.

Emily2040/seedance-2.0 · 47 tokens