Nodes/comfyui-moonpack/Prompt Library
ComfyUI Node

Prompt Library

The prompt library that lives inside your workflow file

By moonwhaler·Created about a year ago·Updated 19 days ago· 16
Prompt Library
    • text
    text

    Every ComfyUI regular has the same messy desk: a text file or a notes app full of prompts they've tuned over months, copied and pasted into CLIP Text Encode nodes. It works until you forget which version of "the good anime one" was actually good. Prompt Library is the tidy version of that text file, and it's stubbornly unglamorous - which is exactly why it's useful.

    It's a multiline text box with a dropdown of saved prompts. Pick an entry from the dropdown and it loads into the box; edit the box and it auto-saves; the ➕/➖ buttons add or remove entries. The STRING output is always whatever is currently in the box, no hidden state, no mode switching.

    Why this specific design is nice

    The entries live on the node itself as widget state, not in some sidecar file or API. That means your prompt library travels with the workflow JSON - share the workflow, and the person you share it with gets your prompts too. No sync, no setup, nothing to forget to export. The backend is almost a one-liner (return text); all the real work is frontend widget state, and that's the whole point.

    The inputs

    • text - the current prompt, multiline. Tooltip says it plainly: this is exactly what gets output.
    • Output: text - a STRING, wired straight into whatever takes a prompt, or into a prompt-building node.

    There's nothing else, and there shouldn't be. It's a text box with a memory.

    Where you'd use it

    Keep a per-model set of base prompts in a workflow you reuse - one entry per style, per character, or per mood. Toggle between "clean product shot" and "dramatic cinematic" without hunting through notes. It also plays nicely with the prompt-fragment approach from the rest of this pack: output into Text Builder or Dynamic String Concat as the base, with blocks for the parts you vary.

    Installing it

    Prompt Library is part of MoonPack (comfyui-moonpack). Install via ComfyUI Manager (search MoonPack) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/moonwhaler/comfyui-moonpack.git
    

    Restart ComfyUI and you're done - no models, no extra dependencies.

    The one thing to know

    Because entries are stored on the node, they're tied to that specific workflow. Duplicate the node into a fresh canvas and you're starting from an empty library - your prompts don't follow you around globally. That's a feature for sharing, but treat your important prompt sets as living in the workflows that own them, and back up those workflows.

    CategoryMoonPack/string

    Inputs (1)

    NameTypeDefaultDescription
    textSTRINGThe prompt text. This is exactly what gets output.

    Outputs (1)

    NameTypeDescription
    textSTRING