KRuins - Prompt Building Companion
KRuins Prompt Building Companion
Most prompt work in ComfyUI happens in a text box you keep re-typing into, with a notes app open on the second monitor. KRuins Prompt Building Companion (PBC) tries to move that second monitor into the graph: a node-shaped panel of keyword buttons, wildcard files and saved presets that writes straight into whichever text node you point it at. It's a UI tool, not a model tool. Nothing about your sampler changes; you just stop retyping the same twelve camera tags.
What it actually is
PBC ships in the Rampart187/KRuins-PBC pack as a single node, KRuinsPBC, in the KRuins category, authored by KRuins (GitHub handle Rampart187). The pack is young enough that the Reddit corpus has never once mentioned it - so treat this as one person's workflow tool, not ecosystem furniture.
Worth saying plainly, because it confuses people: the graph-facing interface is one input, prompt, a multiline string. It has no outputs, and it's marked as an output node, so ComfyUI always executes it and it always does nothing. You cannot wire it into a CLIP Text Encode. What you interact with is a panel the pack's JavaScript mounts over the node - three tabs (Keywords, Wild Cards, Prompting) plus a footer of buttons. Those aren't sockets.
The mechanism: it types into another node for you
The trick is Target Selected. Select exactly one other node on the canvas - a Text Encoder is the intended case - and click it. The extension hunts that node's widgets for a string widget whose type or name looks textual, and from then on every keyword, wildcard or preset you click lands in that widget instead of PBC's own. It respects your caret, too - it remembers the last cursor position in the target's textarea, splices text in there, and adds a comma and space unless the neighbours are already whitespace or punctuation. Undo walks back through an in-memory history stack, Copy puts the current text on the clipboard, Clear Target releases the node.
So PBC is a composer, and the target node is where the prompt actually lives. Drive workflows from the API and you get nothing from it - the insertion is all frontend.
Where the content comes from, on disk:
- Keywords - a JSON list at
<wildcard root>/KR_keywords.json, pre-seeded with 25 photography terms (DSLR photo,shallow depth of field,85mm lens, …) that tell you the author's taste. Each tops out at 30 characters; longer text belongs in a preset. - Wild Cards -
.txtfiles under a configurable root, defaulting toComfyUI/wildcards, one value per line. Clicking a chip inserts the token__subfolder/filename__. - Prompting - named presets in
custom_nodes/KRuins-PBC/data/prompt_presets.json, 25-character button labels, no duplicates allowed. You can also point it at a local.txtand it names the preset after the file.
One genuinely nice thing the README doesn't mention: any .md file in a wildcard folder becomes a Folder Prompt Preset button (a leading PP_/PP - is stripped from the label) and clicking it pastes the whole file. Long markdown templates beat a 25-character preset name any day.
Installing it
No dependencies: dependencies=[], and pbc.py imports only the standard library plus ComfyUI's own folder_paths, aiohttp and server. No models, no pip install, Python 3.10+.
The pack is registered with the ComfyUI registry (PublisherId="rampart187"), so Manager → search KRuins PBC is the easy path. Otherwise:
cd ComfyUI/custom_nodes
git clone https://github.com/Rampart187/KRuins-PBC
Restart ComfyUI, hard-refresh the browser tab (the panel is JS, so a cached frontend shows nothing), then search KRuins - Prompt Building Companion in the node menu.
Where people get burned
The folder picker only works on Windows. That 📁 button shells out to a PowerShell folder dialog and returns Native folder selection requires Windows anywhere else. On Linux or macOS, type the path into the field beside it and hit Set; that route is platform-agnostic, and the root is saved to data/settings.json.
Tokens resolve somewhere else. PBC inserts __folder/name__ and calls it a day - the README is explicit that expansion needs a compatible resolver (the author's own KRuins Wildcard Batch, or Impact Pack's wildcard machinery). Related ecosystem warning: a value written into a widget at runtime doesn't always behave like one you typed, since prompt expansion happens at queue time. If a token inserts but never randomises, suspect the resolver, not PBC.
A git pull can eat your presets. data/prompt_presets.json is tracked in the repo (it ships as []) while the rest of data/ is gitignored. Copy it before reinstalling, exactly as the README says.
Rename previews; Delete just deletes. Folder rename shows you how many .txt wildcards and __old/name__ tokens it will touch, rewrites only that token form, and rolls back on failure. Deletion is recursive with no bin - and under OneDrive it can fail with a 403 the code blames on sync protection.
Undo isn't persistent. It's a stack in the browser tab. Reload and the history is gone.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — |
Outputs (0)
No outputs