Nodes/mircudx custom nodes/CC Prompt Builder
ComfyUI Node

CC Prompt Builder

A system prompt factory for people who hate re-typing the same rules

By mircudx·Created 6 months ago·Updated 6 months ago· 0
CC Prompt Builder
    • system_prompt
    • user_prompt
    • debug_blocks
    user_promptDescribe your idea here.
    styleugc_style
    functional_modekling_multisegment
    include_safetytrue
    include_output_rulestrue
    json_only_responsetrue
    project_goal
    brand_voice
    hard_constraints
    custom_system_block

    CC Prompt Builder is where the pack's consistency comes from. It's a system-prompt factory: you flip a few toggles and it assembles a long, opinionated system prompt that makes the LLM behave like a video planner instead of a chat model. It calls nothing, costs nothing, and runs in a millisecond - but every downstream node in the pipeline is only as good as the prompt this one builds.

    How it works

    It stacks blocks of instructions into one system prompt, joined with separators. The always-on core is a base block casting the model as a "senior creative producer and prompt engineer." On top of that it adds, in order:

    • a style block - none, ugc_style (default: handheld, social-first, 3–7 micro-scenes, phone-like lenses), cinematic, or product_demo;
    • a mode block - general, scene_director, ad_creator, avatar_lipsync, or kling_multisegment, each describing what the output should contain;
    • if mode is kling_multisegment, a set of Kling 3.0 directing rules (think in shots, label identities, camera is mandatory, describe motion not the image, use negatives for artifacts);
    • optional project_goal, brand_voice, and hard_constraints blocks, if you filled them;
    • a safety block (no copyrighted characters, no harmful instructions), gated by include_safety;
    • an output-rules block, gated by include_output_rules.

    The one toggle to understand before any other is json_only_response. With include_output_rules on, this flag appends two hard lines: final answer must be strict JSON with no surrounding commentary and keep output schema stable so downstream nodes can parse it. That's what keeps the plan parser from drowning in model preamble. Turn it off and you'll get markdown headers and polite chat noise - which is exactly the "dirty output" failure mode the KB's LLM-in-ComfyUI essay warns about.

    Inputs and outputs

    The inputs that matter: functional_mode (the big lever - set it to kling_multisegment for this pack's purpose), user_prompt (your actual idea, passed through), and the toggles. The optional project_goal, brand_voice, hard_constraints, and custom_system_block are free-text blocks that only appear in the prompt when you fill them - leave them blank and they're simply omitted.

    • system_prompt → wire into CC OpenAI Responses' system_prompt input.
    • user_prompt → the cleaned-up version of your idea, wired into the same node's user_prompt.
    • debug_blocks → JSON showing which blocks got included and the character counts. Useful the first time you want to know whether that hard constraint actually made it in.

    Why you'd bother

    The unglamorous answer: consistency. When you're iterating on a Kling pipeline, you don't want to hand-edit a 2,000-character system prompt in a text widget every time you change the style or decide audio is off. This node makes those switches single clicks, and it keeps the rules written once, in one place. It's the least exciting node in the pack and one of the most useful - the kind you set once and forget, right up until you wire in a fresh idea and the output comes out exactly on-brief.

    Installing it

    This node ships in the Auto-Card-Generator pack by mircudx - a small MIT-licensed bundle of script-to-Kling pipeline nodes with zero pip dependencies and no model downloads. Two ways in: ComfyUI Manager → Install Custom Nodes → search "Auto-Card-Generator", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mircudx/Auto-Card-Generator
    

    Restart ComfyUI and it shows up under "Card Creator/LLM". If you import one of the bundled workflows and get missing-node errors, use the *_local_safe_compat.json variant - it's trimmed for bare local installs. The reference workflows also expect a separate Kling custom-node pack (KlingStartEndFrameNode) to be installed; this pack provides the planning logic around it, not the Kling API calls themselves.

    CategoryCard Creator/LLM

    Inputs (10)

    NameTypeDefaultDescription
    user_promptSTRINGDescribe your idea here.
    styleCOMBOugc_style4 options: none, ugc_style, cinematic, product_demo
    functional_modeCOMBOkling_multisegment5 options: general, scene_director, ad_creator, avatar_lipsync, kling_multisegment
    include_safetyBOOLEANtrue
    include_output_rulesBOOLEANtrue
    json_only_responseBOOLEANtrue
    project_goaloptSTRING
    brand_voiceoptSTRING
    hard_constraintsoptSTRING
    custom_system_blockoptSTRING

    Outputs (3)

    NameTypeDescription
    system_promptSTRING
    user_promptSTRING
    debug_blocksSTRING