Claude Output Reader:
ClaudeCodeReader is a utility node designed to facilitate the inspection and analysis of outputs generated by Claude Code processes. Its primary function is to read and display contents from specified output folders, allowing you to easily access and review the results of Claude Code executions. This node is particularly beneficial for users who need to verify the outputs of their code generation tasks, as it provides a straightforward way to list files, read all contents, or focus on specific files within the output directories. By offering flexible reading modes and customizable parameters, ClaudeCodeReader enhances your ability to manage and understand the outputs of your AI-driven projects, making it an essential tool for efficient workflow management in AI art and code generation environments.
Claude Output Reader Input Parameters:
output_folder
This parameter specifies the name of the output folder from which the node will read files. It is crucial for directing the node to the correct location where Claude Code outputs are stored. The default value is an empty string, and it is required to provide the correct folder name to ensure accurate file reading.
file_pattern
The file_pattern parameter allows you to define a pattern for the files you wish to read, such as *.py for Python files or README.md for a specific file. This parameter helps filter the files in the output folder, making it easier to focus on relevant files. The default pattern is *, which means all files will be considered.
read_mode
This parameter determines the mode in which files are read from the output folder. It offers three options: list_files, read_all, and read_specific. The default mode is list_files, which lists all files matching the pattern. read_all reads the contents of all matching files, while read_specific focuses on a particular file specified by the specific_file parameter.
specific_file
When using the read_specific mode, this optional parameter allows you to specify the exact file you want to read. It is useful for targeting a single file within the output folder. The default value is an empty string, and it should be set to the desired file name when needed.
max_files
This optional parameter sets the maximum number of files to read when using modes that involve reading multiple files. It helps manage the volume of data processed, ensuring that the node does not attempt to read an overwhelming number of files at once. The default value is 10, with a minimum of 1 and a maximum of 100.
Claude Output Reader Output Parameters:
file_contents
This output provides the contents of the files read from the output folder. It is particularly useful when you need to review or analyze the data generated by Claude Code processes. The content is returned as a string, allowing for easy display and inspection.
file_list
The file_list output returns a JSON object containing a list of files that match the specified pattern in the output folder. This list is valuable for quickly identifying which files are available for further inspection or processing.
metadata
This output provides additional information about the files read, such as their names and sizes. It helps you understand the context and characteristics of the files processed, offering insights into the nature of the outputs generated by Claude Code.
Claude Output Reader Usage Tips:
- Use the
file_patternparameter to narrow down the files you want to inspect, which can save time and resources by focusing only on relevant outputs. - When dealing with large output folders, adjust the
max_filesparameter to limit the number of files read, ensuring that the node operates efficiently without overwhelming your system. - Utilize the
read_modeoptions to tailor the node's behavior to your specific needs, whether you want a simple file list or detailed content analysis.
Claude Output Reader Common Errors and Solutions:
"Output folder not found"
- Explanation: This error occurs when the specified output folder does not exist or the path is incorrect.
- Solution: Double-check the folder name and path provided in the
output_folderparameter to ensure it is correct and accessible.
"No files match the pattern"
- Explanation: This error indicates that no files in the output folder match the specified
file_pattern. - Solution: Verify the file pattern for accuracy and ensure that the output folder contains files that meet the criteria.
"Specific file not found"
- Explanation: This error arises when the
read_specificmode is used, but the specified file does not exist in the output folder. - Solution: Confirm that the
specific_fileparameter is set to the correct file name and that the file is present in the output folder.
