Shaike1 Claude Code Enhanced icon

Shaike1 Claude Code Enhanced

Enhanced Claude Code node with native authentication, advanced MCP support, and enterprise features

Query

AI-generated

Overview

The node "Shaike1 Claude Code Enhanced" integrates with the Claude Code AI assistant, enabling users to send prompts and receive AI-generated responses. It supports multiple interaction modes including starting new conversations, continuing previous ones, and making direct API calls. The node is designed for advanced use cases such as code generation, project assistance, file editing, web searching, and task automation by leveraging Claude's capabilities combined with built-in tools.

Typical scenarios where this node is beneficial include:

  • Automating coding tasks like generating functions or scripts.
  • Conducting complex multi-turn conversations with an AI assistant.
  • Running AI-powered searches and fetching web content.
  • Managing project files and directories through AI-driven commands.
  • Using direct API calls for customized prompt-response workflows.

For example, a user can input a prompt like "Create a Python function to parse CSV files," select a model, and receive structured output containing the generated code and related metadata.

Properties

Name Meaning
Authentication Method How to authenticate with Claude Code: either using n8n credentials or an existing Claude Code CLI authentication.
Prompt The instruction or query sent to Claude Code. Supports expressions to dynamically use data from previous nodes.
Model The Claude AI model to use. Options include "Claude 3 Opus" (complex reasoning), "Claude 3.5 Haiku" (fast/simple tasks), "Claude 3.5 Sonnet" (latest/capable), and legacy CLI models.
Max Turns Maximum number of conversation turns (back-and-forth exchanges) allowed in multi-turn interactions.
Timeout Maximum time in seconds to wait for the AI response before aborting the operation.
Project Path Directory path where Claude Code should run, allowing it to access files and execute commands within that project context. If empty, uses the current working directory.
Output Format Format of the output data: "Structured" (detailed object with messages, summary, result, metrics), "Messages" (raw array of all exchanged messages), or "Text" (only final result text).
Allowed Tools Built-in tools Claude Code is permitted to use during execution, such as Bash commands, file edits, web search/fetch, todo list management, etc.
Additional Options Collection of optional settings:
- System Prompt: extra context/instructions for Claude.
- Require Permissions: whether tool usage requires explicit permission.
- Debug Mode: enable debug logging.
- Enable Streaming: enable streaming responses (direct API only).

Output

The node outputs JSON data structured according to the selected output format:

  • Structured: An object containing:

    • messages: Array of all exchanged messages (user, assistant, system).
    • summary: Metadata including counts of user/assistant messages, tool uses, available tools.
    • result: The final result text or error message.
    • metrics: Performance data such as duration, number of turns, cost, and usage statistics.
    • success: Boolean indicating if the operation succeeded.
    • Other flags like enhanced and auth_method.
  • Messages: Raw array of all messages exchanged during the conversation or API call, including user inputs, assistant replies, and system messages.

  • Text: Only the final textual result from Claude Code, suitable for simple use cases where detailed metadata is not needed.

If binary data were supported, it would be summarized here, but this node focuses on textual and structured JSON outputs.

Dependencies

  • Requires an API key credential or CLI-based authentication for Claude Code.
  • Uses the official Claude Code SDK and Anthropic AI SDK libraries.
  • For direct API calls, requires configuration of API base URL and API key.
  • Node expects network connectivity to Claude Code services.
  • Optional: Access to local filesystem paths if Project Path is specified, enabling file operations.

Troubleshooting

  • Empty Prompt Error: The node throws an error if the prompt is empty or whitespace. Ensure the prompt parameter is set and non-empty.
  • Timeouts: Operations may timeout if the AI response takes longer than the configured Timeout value. Increase the timeout setting if necessary.
  • Authentication Failures: Incorrect or missing API keys or CLI authentication will cause failures. Verify credentials are correctly configured.
  • Direct API Call Errors: Errors during direct API calls return descriptive messages. Check API key validity, model selection, and network connectivity.
  • AbortError: Indicates the operation was aborted due to timeout. Adjust timeout or check for network issues.
  • Debug Mode: Enable debug mode to get detailed console logs for troubleshooting.
  • Tool Permissions: If tool usage is restricted, ensure Require Permissions is set appropriately and that allowed tools are configured.

Links and References

Discussion