Nodes/Claude Code ComfyUI Nodes/Claude Arguments Builder
ComfyUI Node

Claude Arguments Builder

Stop hardcoding project names — one JSON blob can drive every command

By christian-byrne·Created about a year ago·Updated about a year ago· 34
Claude Arguments Builder
  • base_arguments
  • merge_arguments
  • arguments
  • arguments_json
input_modejson
json_arguments{ "PROJECT_NAME": "MyProject", "LANGUAGE": "Python" }
key
value

Claude Arguments Builder is the pack's templating layer. It builds a set of key-value pairs that get substituted into your commands and memory before they reach Claude, using ${VARIABLE} placeholders. So instead of a command that says "Create the MyAwesomeProject Python structure," you write "Create a ${PROJECT_NAME} Python structure" once and let the arguments node fill in PROJECT_NAME - and swap it for the next project by changing one node instead of editing a prompt.

It's a thin, boring node, and that's its charm. The one genuinely useful habit it enables is separating what you want done (the command file, shared and versioned) from what it's about (the arguments, per run). If you've ever maintained ten copies of a command that differ only by project name, you know why this exists.

How it works

How it works: the node takes arguments, turns them into a JSON string, and passes that to Claude Code Execute's arguments input. Execute's replace_arguments step swaps every ${KEY} in the command and memory for its value before the prompt is built.

The inputs

There's an input_mode with three flavors:

  • json (default) - paste a JSON object into json_arguments, like {"PROJECT_NAME": "MyProject", "LANGUAGE": "Python"}.
  • key_value - add a single pair with the key and value fields. Handy when you just want to tweak one thing.
  • merge - combine a base_arguments set with a merge_arguments set, for layering defaults under overrides across multiple nodes.

base_arguments also works in the other modes as a starting point, so you can build one canonical set and derive variations from it.

Outputs

Outputs: arguments (CLAUDE_ARGUMENTS, for chaining into Execute or another Arguments node) and arguments_json (the same data as a plain string, if you want it in a text widget or log).

Installing

Install: ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/christian-byrne/claude-code-comfyui-nodes

and restart. Nothing else to set up - this is a pure string utility, no models, no network.

Common issues

The one real trap is malformed JSON: if json_arguments doesn't parse, the node stuffs an _error key into the result rather than crashing, so a typo silently becomes context instead of an obvious failure. ComfyUI also tends to mangle multiline JSON widgets on paste - if your substitutions aren't happening, that's the first thing to check. And remember the substitution only applies to commands and memory that reach Execute; arguments don't magically reach the Reddit scraper or anything else. Keep the keys all-caps and obvious, and this node quietly removes an entire class of copy-paste bugs from your workflows.

Categoryclaude_code/helpers

Inputs (6)

NameTypeDefaultDescription
input_modeCOMBOjsonHow to input arguments
json_argumentsoptSTRING{ "PROJECT_NAME": "MyProject", "LANGUAGE": "Python" }JSON object with argument key-value pairs
keyoptSTRINGArgument key (for key_value mode)
valueoptSTRINGArgument value (for key_value mode)
base_argumentsoptCLAUDE_ARGUMENTSBase arguments to merge with
merge_argumentsoptCLAUDE_ARGUMENTSArguments to merge (for merge mode)

Outputs (2)

NameTypeDescription
argumentsCLAUDE_ARGUMENTS
arguments_jsonSTRING