agentleFS
johnlindquistjohnlindquist/n8n-nodes-claudecode/CLAUDE.md

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
  1. Very specific:

    Use npm run commit to use commitizen for guided commit creation.

    line 28
  2. Very specific:

    All node logic resides in ClaudeCode.node.ts

    line 72
  3. Distinctive:

    No automated tests are configured (typical for n8n community nodes).

    line 93
  4. Distinctive:

    When using Project Path, Claude Code automatically loads these configurations from the specified directory.

    line 111

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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

  1. Make changes following conventional commit format
  2. Push to main branch
  3. GitHub Actions runs semantic-release automatically
  4. Version is bumped based on commit types since last release
  5. npm package is published
  6. GitHub release is created with changelog
  7. 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 development
  • npm run build - Build the project (clean dist, compile TypeScript, copy icons)
  • npm run format - Format code using Prettier
  • npm run lint - Run ESLint to check code quality
  • npm run lintfix - Auto-fix linting issues where possible

n8n Integration

  • Install locally: npm link then n8n start to 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:

  1. Main Node Implementation (nodes/ClaudeCode/ClaudeCode.node.ts)
    • Implements INodeType interface from n8n
    • Provides Query and Continue operations
    • Handles Claude Code SDK initialization and message processing
    • Manages tool availability and project path configuration
  2. 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)
  3. Output Handling
    • Multiple output formats: structured JSON, messages array, or plain text
    • Streaming support with abort signal handling
    • Debug mode for troubleshooting
  4. Project Path Support (v0.2.0+)
    • Configure working directory via projectPath parameter
    • Allows Claude Code to run in specific project directories
    • Enables access to code repositories without changing n8n's working directory

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:

  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

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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.