Shaike1 Claude Code Enhanced icon

Shaike1 Claude Code Enhanced

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

Continue

AI-generated

Overview

The "Shaike1 Claude Code Enhanced" node integrates with the Claude Code AI assistant, enabling users to interact with it in multiple ways: starting new conversations, continuing previous ones, or making direct API calls. This node is designed for advanced code-related tasks such as generating code snippets, editing files, running commands, and fetching web content through built-in tools.

Typical use cases include:

  • Automating coding tasks by sending prompts to Claude Code.
  • Continuing an ongoing conversation with Claude Code to build on previous context.
  • Directly calling the Claude API for custom or simpler interactions.
  • Using Claude Code’s built-in tools to manipulate project files, run shell commands, or perform web searches within a specified project directory.

For example, a developer might use this node to generate Python functions based on natural language prompts, continue refining code through iterative conversations, or fetch relevant documentation from the web automatically.

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 model to use. Options include:
- Claude 3 Opus (complex reasoning)
- Claude 3.5 Haiku (fast, efficient)
- Claude 3.5 Sonnet (latest, most capable)
- Legacy models (CLI-based)
Max Turns Maximum number of back-and-forth conversation turns allowed (not applicable for direct API calls).
Timeout Maximum time in seconds to wait for Claude Code to respond before aborting the operation.
Project Path Directory path where Claude Code should run, allowing access to project files and command execution. If empty, uses current working directory.
Output Format Format of the output data:
- Structured: detailed object with messages, summary, result, and metrics
- Messages: raw array of all exchanged messages
- Text: only the final result text
Allowed Tools Built-in Claude Code tools permitted 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 or 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, and success status.
    • result: 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.
    • Additional 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 tool invocations.

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

If binary data were involved (not indicated here), it would typically represent files or attachments generated or manipulated by Claude Code tools.

Dependencies

  • Requires either:
    • An API key credential for direct API calls to the Claude service.
    • Existing Claude Code CLI authentication for other operations.
  • Uses the @anthropic-ai/claude-code and @anthropic-ai/sdk packages internally.
  • Node configuration may require setting up credentials and optionally specifying a project directory path.
  • Network access to Claude's API endpoints is necessary.
  • For CLI authentication, the Claude Code CLI must be installed and configured on the host machine.

Troubleshooting

  • Empty Prompt Error: The node throws an error if the prompt is empty or whitespace. Ensure the prompt field is filled with meaningful input.
  • Timeouts: Operations may timeout if Claude Code takes longer than the specified timeout (default 300 seconds). Increase the timeout in additional options if needed.
  • Authentication Failures: Incorrect or missing credentials will cause authentication errors. Verify that the API key or CLI authentication is properly set up.
  • Direct API Call Failures: Errors during direct API calls return messages indicating failure; check network connectivity and API key validity.
  • Abort Errors: If the operation is aborted due to timeout, the error message suggests increasing the timeout.
  • Debugging: Enable debug mode to get detailed console logs for troubleshooting.
  • Tool Permissions: If tool usage fails, verify if "Require Permissions" is enabled and grant necessary permissions accordingly.

Links and References

Discussion