n8n-code-javascript
Skill by czlonkowski
Writes, reviews and debugs JavaScript for n8n Code nodes. It is for n8n users who need custom data logic and want guidance on when a native node fits better.
Install n8n-code-javascript
Built from the published package, never by AI.
git clone --depth 1 https://github.com/czlonkowski/n8n-mcp /tmp/n8n-mcp && mkdir -p ~/.claude/skills && cp -r /tmp/n8n-mcp/data/skills/n8n-code-javascript ~/.claude/skills/n8n-code-javascriptRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/czlonkowski/n8n-mcp /tmp/n8n-mcp && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/n8n-mcp/data/skills/n8n-code-javascript ~/.gemini/antigravity-cli/skills/n8n-code-javascriptAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install n8n-code-javascript in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides an AI assistant through writing, reviewing and debugging JavaScript in n8n Code nodes. It covers reading upstream data with $input, $json and $node, choosing between the Run Once for All Items and Run Once for Each Item modes, and returning items in the expected format. It also covers webhook data under $json.body, HTTP requests with this.helpers, Luxon DateTime, SplitInBatches loops, pairedItem and per-item performance.
The skill first asks whether a native n8n node can do the job, and only recommends a Code node for specific cases such as loops, state across runs or heavy all-items work. It is aimed at n8n builders who work with Code nodes. Custom Code Tool nodes attached to AI Agents are handled by a separate skill.
Written from the project's SKILL.md and checked against it.
What it can do
- Write Code node JavaScriptWrites JavaScript for n8n Code nodes using $input, $json and $node to read upstream data.
- Choose execution modeExplains when to use Run Once for All Items or Run Once for Each Item.
- Return correct item formatShows the [{json: {...}}] return shape and the cases that fail at runtime.
- Handle webhook dataReads webhook payloads under $json.body instead of the top level.
- Make HTTP requestsUses this.helpers.httpRequest for simple unauthenticated requests inside a Code node.
- Work with datesUses the DateTime (Luxon) library available in Code nodes.
- Troubleshoot Code node errorsDiagnoses common Code node errors and explains their causes.
- Review performanceExplains per-item overhead and how to reduce it on large datasets.
- Suggest native node alternativesChecks whether a native n8n node can replace a Code node before writing one.
What you need
- An n8n instance with the Code node
Try asking
- Write a Code node that flattens a nested category tree
- Why does my Code node return undefined for webhook fields?
- Should this filter be a Code node or a native n8n node?
Good to know
- Not for the Custom Code Tool attached to an AI Agent; use the n8n-code-tool skill instead.
- The $helpers global is undefined in the task-runner sandbox; use this.helpers.httpRequest.
- this.helpers.httpRequestWithAuthentication is deny-listed.
- require() works only for modules the instance administrator has allowlisted.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: data/skills/n8n-code-javascript/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
BUILTIN_FUNCTIONS.md23 KB -
COMMON_PATTERNS.md33 KB -
DATA_ACCESS.md22 KB -
ERROR_PATTERNS.md23 KB -
README.md10 KB
Show all 6 files
-
SKILL.md22 KB
Alternatives to n8n-code-javascript
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
n8n-code-javascript: common questions
When should I use a Code node instead of a native node?
The skill says to use a Code node only when no native node fits and the job is on its closed list, such as loops, state across runs, or heavy all-items work. Otherwise native nodes come first.
Why is my webhook field undefined in a Code node?
Webhook request data is nested under the body property, so the skill says to read $json.body.fieldName instead of $json.fieldName.
Which execution mode should I choose?
The skill recommends Run Once for All Items for most cases. Run Once for Each Item is slower on large datasets and is for specialized per-item logic.
How do I install n8n-code-javascript?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is n8n-code-javascript free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is n8n-code-javascript safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to n8n-code-javascript?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
