Claude Memory Builder
Give every Claude run the same project context without rewriting the prompt
- append_to
- memory
- memory_text
Claude Memory Builder is the pack's way of giving every command the same background knowledge without you retyping it. Claude Code already understands CLAUDE.md conventions from its own ecosystem, so this node builds exactly that kind of context - project facts, style rules, what a "good" output looks like - and hands it to Claude Code Execute through its memory input. Execute drops whatever it receives into the prompt under a # Context/Memory header, right above your command.
It's the pack's version of "please remember this." Since every run is stateless (each execution is a fresh folder and a fresh agent), memory is the glue that makes runs feel like they share a brain. Combined with Claude Context Builder, it's also how you chain runs: the Context Builder turns a previous output folder into a string, and this node wraps that string up in the right type for Execute.
The inputs
You pick a memory_type and then fill in whichever field it needs:
- text - type your context straight into
text_memory. - memory_file - a dropdown of
.md/.txttemplates from the pack'smemories/folder. This is the reusable one: save a project brief there once, pick it forever. - file - read any file on disk via
file_path(aCLAUDE.mdyou already maintain, say). - claude_md - a dedicated
claude_md_contentbox, preformatted for the CLAUDE.md style. - combined - all of the above joined together.
append_to takes a previous CLAUDE_MEMORY and stacks new context on top, which is how you build up memory across multiple nodes in one graph.
Outputs
Outputs: memory (CLAUDE_MEMORY, for wiring into Execute's memory input) and memory_text (the same content as a plain STRING, useful for logging or a preview).
Installing
Install: ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/christian-byrne/claude-code-comfyui-nodes
and restart. One gotcha on the dropdown: it's populated when the node loads, so a template you drop into memories/ won't show up until you refresh the page / reload the node. And remember the dropdown only lists files that existed at load time - you'll see the bundled reddit-video-context.md from day one, your own files after a reload.
Common issues
The trap to avoid is cargo-culting a giant memory blob into every run. Claude reads the whole context on every turn, so a 5,000-word memory file makes every run slower and pricier for context you mostly don't need. Keep it to the facts that actually change the output - tone, format, constraints, the shape of a good result - and let the command carry the specifics. That's what the file's author clearly intended with the bundled template, and it's the difference between context that guides and context that just eats tokens.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| memory_type | COMBO | memory_file | Type of memory input |
| memory_fileopt | COMBO | [Custom Memory] | Select a memory file from the memories folder |
| text_memoryopt | STRING | Direct text input for memory/context | |
| file_pathopt | STRING | Path to a file containing memory (e.g., CLAUDE.md) | |
| claude_md_contentopt | STRING | # Project Context | CLAUDE.md formatted content |
| append_toopt | CLAUDE_MEMORY | Previous memory to append to |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| memory | CLAUDE_MEMORY | — |
| memory_text | STRING | — |