Description
n8n-nodes-code-build

This is an n8n community node that provides AI-powered code building capabilities. It lets you automate code development, modification, and building directly from your n8n workflows.
Current Support: Claude Code
Coming Soon: I'm actively working on adding support for other AI coding platforms including Codex. For now, this node works with Claude Code, but additional providers will be added in future updates.
n8n is a fair-code licensed workflow automation platform.
Table of Contents
Installation
Follow the installation guide in the n8n community nodes documentation.
Community Nodes Installation
- Go to Settings > Community Nodes in your n8n instance
- Select Install
- Enter
n8n-nodes-code-buildin the Enter npm package name field - Click Install
Alternatively, if you're self-hosting n8n:
npm install n8n-nodes-code-build
Prerequisites
Before using this node, you need:
- A GitHub account with a personal access token
- A Claude API key (for API authentication) or Claude subscription access token (for subscription authentication)
- Access to Claude's API or subscription service
Credentials
To use this node, you'll need to configure the Code Build API credentials in n8n:
| Field | Description | Required |
|---|---|---|
| GitHub Token | Your GitHub personal access token | Yes |
| Provider | AI provider to use (default: Claude Code) | Yes |
| Authentication Type | API Key or Subscription | Yes |
| API Key | Your Claude API key (if using API authentication) | Conditional |
| Access Token | Your Claude subscription access token (if using subscription) | Conditional |
Setting Up GitHub Token
- Go to GitHub Settings > Developer settings > Personal access tokens > Tokens (classic)
- Click Generate new token > Generate new token (classic)
- Give your token a descriptive name (e.g., "n8n Code Build")
- IMPORTANT: Select the following permissions:
- ✅ repo (Full control of private repositories)
- ✅ workflow (Update GitHub Action workflows)
- Click Generate token
- Copy the token immediately (you won't be able to see it again!)
Setting Up Claude Authentication
Option 1: Using API Key
If you want to use Claude's API:
- Go to the Anthropic Console
- Navigate to API Keys
- Click Create Key
- Copy your API key
- In the n8n credential:
- Select Authentication Type: API Key
- Paste your API key in the API Key field
Option 2: Using Subscription (Claude Code)
If you have a Claude subscription and want to use Claude Code:
- Install Claude Code if you haven't already
- Run the following command in your terminal:
claude setup-token - This will generate an access token
- Copy the access token from the output
- In the n8n credential:
- Select Authentication Type: Subscription
- Paste your access token in the Access Token field
How to Add Credentials
- In your n8n workflow, add the Code Build node
- Click on Credential to connect with
- Select Create New
- Enter your credentials:
- GitHub Token: Your GitHub personal access token (with
repoandworkflowpermissions) - Provider: Claude Code (default)
- Authentication Type: Choose API Key or Subscription
- API Key or Access Token: Enter based on your authentication choice
- GitHub Token: Your GitHub personal access token (with
- Click Save
Operations
The Code Build node automates the complete setup of a GitHub repository with Claude integration.
Build
Creates a new GitHub repository with Claude AI integration fully configured.
Parameters:
- Owner: The GitHub repository owner (username or organization)
- Repository Name: The name for the new repository
- Private Repository: Whether the repository should be private (default: true)
- Prompt: Instructions for Claude to execute
What This Node Does:
This node sets up Claude Code on your repository and runs your prompt on a GitHub Actions runner. Claude will build the code based on your prompt and automatically commit and merge it into the main branch.
The node automatically:
-
Creates a GitHub Repository
- Creates a new repository with the specified name
- Sets privacy level (public/private)
- Initializes with a README
-
Configures Claude Integration
- Adds the appropriate secret (ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN)
- Creates the GitHub Actions workflow file
- Creates an issue with your prompt to trigger Claude
-
Executes Your Prompt
- Claude Code runs on a GitHub Actions runner
- Builds the code based on your prompt
- Automatically commits and merges changes to main branch
Example:
Input:
- Owner:
myusername - Repository Name:
my-new-app - Private Repository:
true - Prompt:
Create a React application with TypeScript and Tailwind CSS
Result:
- Repository created at
github.com/myusername/my-new-app - Claude Code configured and running
- Your app is built and committed automatically
Compatibility
- n8n version: 0.220.0 or higher
- Tested with: n8n 1.0+
Version History
0.1.0
- Initial release
- Basic credential setup for GitHub token and Claude authentication
- Support for both API key and subscription authentication
- Claude Code provider integration
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues or have questions:
Author
Joshua Riley
- Email: joshua@joshuariley.co.uk
- GitHub: @joshuarileydev
License
Disclaimer
This is a community-developed node and is not officially affiliated with or endorsed by Anthropic or GitHub. Use at your own risk.