n8n-nodes-claudecode
CLAUDE.md81 starsChanged 16 months agoMITView on GitHub
This project uses automated semantic versioning with conventional commits: This is an n8n community node that integrates Claude Code SDK into n8n workflows. The architecture consists of: No automated tests are configured (typical for n8n community nodes). Testing involves: 1. Building the node: npm run build 2. Linking locally: npm link 3. Starting n8n: n8n start 4. Creating test workflows with various parameter combinations 5. Using Debug mode to inspect Claude Code interactions The examples/ directory contains sample configurations: -…
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Use npm run commit to use commitizen for guided commit creation.
- Very specific: line 72
All node logic resides in ClaudeCode.node.ts
- Distinctive: line 93
No automated tests are configured (typical for n8n community nodes).
- Distinctive: line 111
When using Project Path, Claude Code automatically loads these configurations from the specified directory.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Semantic Versioning & Release Process
This project uses automated semantic versioning with conventional commits:
Commit Conventions
feat:New features (triggers minor version bump)fix:Bug fixes (triggers patch version bump)perf:Performance improvements (triggers patch version bump)docs:Documentation changes (no version bump)chore:Maintenance tasks (no version bump)test:Test updates (no version bump)BREAKING CHANGE:in commit body (triggers major version bump)
Automated Release Process
- Make changes following conventional commit format
- Push to
mainbranch - GitHub Actions runs semantic-release automatically
- Version is bumped based on commit types since last release
- npm package is published
- GitHub release is created with changelog
- Version updates are committed back to repository
Interactive Commits
Use npm run commit to use commitizen for guided commit creation.
Common Commands
Development
npm run dev- Run TypeScript compiler in watch mode for developmentnpm run build- Build the project (clean dist, compile TypeScript, copy icons)npm run format- Format code using Prettiernpm run lint- Run ESLint to check code qualitynpm run lintfix- Auto-fix linting issues where possible
n8n Integration
- Install locally:
npm linkthenn8n startto test the node - The node appears in n8n UI under "Claude Code" category
- Debug output available when Debug option is enabled in node parameters
Architecture Overview
This is an n8n community node that integrates Claude Code SDK into n8n workflows. The architecture consists of:
- Main Node Implementation (
nodes/ClaudeCode/ClaudeCode.node.ts)- Implements
INodeTypeinterface from n8n - Provides Query and Continue operations
- Handles Claude Code SDK initialization and message processing
- Manages tool availability and project path configuration
- Implements
- Tool System
- Dynamic tool enabling/disabling based on user configuration
- Supports: Bash, Edit/MultiEdit, Read/Write, Web operations, Todo management
- MCP servers supported via Claude's native configuration system (.claude/settings.local.json)
- Output Handling
- Multiple output formats: structured JSON, messages array, or plain text
- Streaming support with abort signal handling
- Debug mode for troubleshooting
- Project Path Support (v0.2.0+)
- Configure working directory via
projectPathparameter - Allows Claude Code to run in specific project directories
- Enables access to code repositories without changing n8n's working directory
- Configure working directory via
Key Development Patterns
n8n Node Structure
- All node logic resides in
ClaudeCode.node.ts - Parameters defined using n8n's declarative schema
- Error handling follows n8n patterns with
NodeOperationError - Supports both single execution and streaming responses
TypeScript Configuration
- Strict mode enabled for type safety
- Target ES2019 with CommonJS modules (n8n requirement)
- Source maps generated for debugging
- Output to
dist/directory
Code Style
- Uses tabs with width 2 (n8n standard)
- Single quotes for strings
- Semicolons required
- Maximum line width: 100 characters
- ESLint configured with n8n-nodes-base rules
Testing Approach
No automated tests are configured (typical for n8n community nodes). Testing involves:
- Building the node:
npm run build - Linking locally:
npm link - Starting n8n:
n8n start - Creating test workflows with various parameter combinations
- Using Debug mode to inspect Claude Code interactions
Configuration Examples
The examples/ directory contains sample configurations:
- simple-project/: Basic setup without MCP servers
- project-with-mcp/: Full MCP server configuration example
Key configuration files:
.mcp.json: Defines available MCP servers (project root).claude/settings.json: Team-shared settings.claude/settings.local.json: Personal settings (gitignored)
When using Project Path, Claude Code automatically loads these configurations from the specified directory.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

