npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-claude

v2.1.0

Published

n8n nodes for Anthropic Claude AI and PRD Agent - includes session management, PRD generation, and automatic Markdown documentation

Downloads

41

Readme

n8n-nodes-claude

This is an n8n community node package that provides two powerful nodes for integrating Anthropic's Claude AI into your n8n workflows:

  1. Claude Node: Execute Claude CLI commands with full agentic capabilities
  2. PRD Agent Node: Product Requirements Document management with specialized AI agents

n8n is a fair-code licensed workflow automation platform.

Anthropic Claude is a family of large language models developed by Anthropic.

Claude CLI is a command-line interface that provides agentic AI capabilities with file system access and tool usage.

Prerequisites

Claude CLI must be installed on the system running n8n:

npm install -g @anthropic-ai/claude-code

For detailed installation instructions, see the Claude CLI Installation Guide.

Installation

Follow the installation guide in the n8n community nodes documentation.

Local Development

  1. Navigate to your n8n custom nodes directory:
cd ~/.n8n/nodes
  1. Install dependencies:
cd n8n-nodes-claude
npm install
  1. Build the node:
npm run build
  1. Restart n8n to load the custom node

Nodes Overview

1. Claude Node

This node executes Claude CLI commands with full agentic capabilities including file system access, tool usage, and multi-turn reasoning.

2. PRD Agent Node

Specialized node for Product Requirements Document management with five operations:

  • Draft PRD: Generate initial PRD from a goal
  • Review Block: Edit, confirm, or rollback PRD blocks
  • Compile Spec: Generate technical specifications
  • QA Guide: Refine PRD based on Q&A answers
  • Generate Diagrams: Create ER and state machine diagrams

See PRD Node Documentation for detailed information and examples.

Usage

Claude Node

This node executes Claude CLI commands with full agentic capabilities including file system access, tool usage, and multi-turn reasoning.

Parameters:

  • Prompt (required): The command/query to send to Claude CLI
  • CLI Options:
    • Output Format: Choose JSON, Text, or Stream JSON (default: json)
    • Max Turns: Maximum number of agentic iterations (default: 5)
    • Verbose: Enable detailed turn-by-turn logging
    • Model Alias: Choose sonnet, opus, or haiku (default: sonnet)
    • Additional Directories: Comma-separated paths to make accessible
    • Permission Mode: How to handle permissions (ask/allow/deny, default: allow)
    • Input Text: Optional text to pipe as input to the CLI

Example - Simple Query

Prompt: "What is 2+2?"
CLI Options:
  Output Format: json
  Model Alias: sonnet

Example - Code Analysis

Prompt: "Review this code and suggest improvements"
CLI Options:
  Output Format: json
  Max Turns: 10
  Additional Directories: /path/to/project
  Permission Mode: allow
  Input Text: "{{ $json.code }}"

Example - File Processing

Prompt: "Analyze this log file for errors"
CLI Options:
  Output Format: json
  Verbose: true
  Input Text: "{{ $json.logContent }}"

Example - Multi-file Refactoring

Prompt: "Refactor all components to use TypeScript strict mode"
CLI Options:
  Output Format: json
  Max Turns: 20
  Additional Directories: /path/to/src/components
  Permission Mode: allow

Output Format

  • JSON Output: Returns structured JSON with the CLI response
  • Text Output: Returns plain text in { text: "...", raw: "..." } format

Example JSON output:

{
  "text": "Response from Claude...",
  "raw": "Full CLI output..."
}

Example Workflows

1. Automated Code Review

GitHub Trigger → Claude CLI → Comment on PR

Automatically review code changes with full project context and file system access.

2. Multi-file Refactoring

Schedule Trigger → Claude CLI → Git Commit → Send Notification

Refactor code across multiple files with agentic capabilities.

3. Log Analysis & Alerting

Read Log Files → Claude CLI → Parse Errors → Send Slack Alert

Analyze logs and extract actionable insights with detailed reasoning.

4. Documentation Generation

Cron Trigger → Claude CLI → Save to Repository → Create PR

Generate or update documentation based on codebase changes.

5. Test Generation

Webhook → Claude CLI → Write Tests → Run Tests → Report Results

Automatically generate comprehensive tests for new code.

6. Security Audit

Schedule → Claude CLI → Generate Report → Send Email

Perform security audits with file access and multi-step analysis.

Best Practices

  1. Permission Mode: Use allow for automated workflows to avoid interactive prompts
  2. Max Turns: Increase for complex multi-step tasks (e.g., 10-20 for code refactoring)
  3. Additional Directories: Grant access to specific project directories for file operations
  4. Verbose Mode: Enable for debugging to see detailed execution logs
  5. JSON Output: Use JSON format for easier parsing in n8n workflows
  6. Security: Be cautious with permission mode allow - only use in trusted environments
  7. Error Handling: Enable "Continue On Fail" in node settings for robust workflows
  8. Input Text: Use to pipe content from previous nodes for analysis or processing

Resources

Compatibility

  • Requires n8n version 0.210.0 or later
  • Requires Claude CLI installed on the host system
  • Compatible with all n8n deployment types (self-hosted, cloud, desktop)
  • Works with Claude CLI version 1.0.0 and above

License

MIT

Support

For issues, questions, or feature requests, please create an issue in the repository.


Made with ❤️ for the n8n community