Agent skill

n8n Code Node JavaScript

by czlonkowski in czlonkowski/n8n-skills

Guides writing JavaScript in n8n Code nodes: picking an execution mode, reading input data, returning items, using built-in helpers and avoiding common errors.

MITAuto-check passedProductivity & Automation

Install n8n Code Node JavaScript

skills CLI
$ npx skills add czlonkowski/n8n-skills --skill n8n-code-javascript -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install czlonkowski/n8n-skills n8n-code-javascript --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/czlonkowski/n8n-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/n8n-code-javascript .claude/skills/n8n-code-javascript && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
n8n-code-javascript
GitHub stars
6.4k
Token cost
~4.9k tokens
SKILL.md length
1,903 words
Files
6
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Guides writing JavaScript in n8n Code nodes: picking an execution mode, reading input data, returning items, using built-in helpers and avoiding common errors.

  • Works in 7 steps: Choose "Run Once for All Items" mode… → Access data: $input.all(),… → Return [{json: {...}}] — the canonical,… → …
  • Writing a Code node that aggregates or filters items
  • SKILL.md covers Quick Start, Mode Selection Guide, Data Access Patterns and Critical: Webhook Data Structure, plus 10 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

This skill is a guide to JavaScript in n8n Code nodes. It recommends the Run Once for All Items mode for most work, shows how to read data with $input.all(), $input.first() or $input.item, and says the node should return an array of objects with a json key. Webhook payloads sit under $json.body, a detail it flags as critical.

It documents what the sandbox provides: this.helpers.httpRequest for unauthenticated calls, Luxon DateTime and $jmespath, while the bare $helpers global, httpRequestWithAuthentication and, depending on settings, $env and require() are unavailable. For authenticated calls, pagination or retries it recommends the HTTP Request node. Instances can allowlist modules through environment variables, and the skill tells the agent to use them when you say they are enabled.

Supporting files cover built-in functions, common patterns, data access and error patterns. The skill also addresses SplitInBatches loops, pairedItem and questions about speed on large datasets. For the Custom Code Tool attached to an AI Agent it redirects to the separate n8n-code-tool skill.

When your agent uses it

  • Writing a Code node that aggregates or filters items
  • Fixing a Code node error such as an undefined $helpers
  • Deciding between per-item and all-items execution modes
  • Making a Code node faster on a large dataset

Example prompts

  • “Write an n8n Code node that groups incoming orders by customer and sums the totals.”
  • “My Code node throws that $helpers is not defined. What should I use instead?”
  • “Convert the webhook payload dates to ISO strings with DateTime in a Code node.”

Requirements

  • An n8n instance with Code nodes

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Choose "Run Once for All Items" mode (recommended for most use cases)
  2. Access data: $input.all(), $input.first(), or $input.item
  3. Return [{json: {...}}] — the canonical, mode-portable form. In Run Once for All Items mode n8n also auto-wraps a bare return {…} object…
  4. CRITICAL: Webhook data is under $json.body (not $json directly)
  5. Built-ins available: this.helpers.httpRequest() (no auth — the bare $helpers global is undefined in the task-runner sandbox, so…
  6. Instance-allowlisted libraries: Self-hosted instances can allowlist modules via N8N_RUNNERS_ALLOWED_BUILT_IN_MODULES and…
  7. Wrong skill? If you're writing code for a Custom Code Tool attached to an AI Agent (@n8n/n8n-nodes-langchain.toolCode), stop — that node…

What it can do on your machine

Read from SKILL.md and the folder at commit 19cd793. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.n8n.io
    • moment.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

n8n Code Node JavaScript loads about 4.9k tokens when it runs. Until then it costs about 242 tokens; SKILL.md has 1,903 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~242
When it runs · the whole SKILL.md, loaded when a task matches
~4.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from czlonkowski/n8n-skills at commit 19cd793, republished under its MIT licence (© czlonkowski). 1,903 words, ~4,897 tokens.

Download SKILL.mdSave it as .claude/skills/n8n-code-javascript/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
n8n-code-javascript
description
Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with this.helpers / the $helpers global, working with dates using DateTime, troubleshooting Code node errors, choosing between Code node modes, or doing any custom data transformation in n8n. Always use this skill when a workflow needs a Code node — whether for data aggregation, filtering, API calls, format conversion, batch processing logic, or any custom JavaScript. Covers SplitInBatches loop patterns, cross-iteration data, pairedItem, and real-world production patterns. Also use when asked why a Code node or workflow is slow, which execution mode is faster, or how to cut per-item overhead on large datasets. EXCEPTION — for the AI-agent-callable Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode, a tool attached to an AI Agent), use the n8n-code-tool skill instead; it has a different runtime contract.

JavaScript Code Node

Expert guidance for writing JavaScript code in n8n Code nodes.


Quick Start

javascript
// Basic template for Code nodes
const items = $input.all();

// Process data
const processed = items.map(item => ({
  json: {
    ...item.json,
    processed: true,
    timestamp: new Date().toISOString()
  }
}));

return processed;
Essential Rules
  1. Choose "Run Once for All Items" mode (recommended for most use cases)
  2. Access data: $input.all(), $input.first(), or $input.item
  3. Return [{json: {...}}] — the canonical, mode-portable form. In Run Once for All Items mode n8n also auto-wraps a bare return {…} object, so that runs too; what genuinely fails is returning a primitive (string/number) or null.
  4. CRITICAL: Webhook data is under $json.body (not $json directly)
  5. Built-ins available: this.helpers.httpRequest() (no auth — the bare $helpers global is undefined in the task-runner sandbox, so $helpers.httpRequest() throws ReferenceError: $helpers is not defined), DateTime (Luxon), $jmespath(). Not available: this.helpers.httpRequestWithAuthentication (deny-listed), $env (when N8N_BLOCK_ENV_ACCESS_IN_NODE=true), require() (unless allowlisted). For anything beyond a trivial unauthenticated GET (auth, pagination, retries), prefer the HTTP Request node and keep Code nodes for pure logic.
  6. Instance-allowlisted libraries: Self-hosted instances can allowlist modules via N8N_RUNNERS_ALLOWED_BUILT_IN_MODULES and N8N_RUNNERS_ALLOWED_EXTERNAL_MODULES (legacy: NODE_FUNCTION_ALLOW_BUILTIN / NODE_FUNCTION_ALLOW_EXTERNAL). If the user says their instance allows specific modules (e.g. axios, lodash, crypto), use them via require() — don't refuse. If unsure, ask or default to built-ins only.
  7. Wrong skill? If you're writing code for a Custom Code Tool attached to an AI Agent (@n8n/n8n-nodes-langchain.toolCode), stop — that node has a different contract (input via query, must return a string, no $input/$helpers). Use the n8n-code-tool skill.

Mode Selection Guide

The Code node offers two execution modes. Choose based on your use case:

Use this mode for: 95% of use cases

  • How it works: Code executes once regardless of input count
  • Data access: $input.all() or items array
  • Best for: Aggregation, filtering, batch processing, transformations, API calls with all data
  • Performance: Faster for multiple items (single execution)
javascript
// Example: Calculate total from all items
const allItems = $input.all();
const total = allItems.reduce((sum, item) => sum + (item.json.amount || 0), 0);

return [{
  json: {
    total,
    count: allItems.length,
    average: total / allItems.length
  }
}];

When to use:

  • ✅ Comparing items across the dataset
  • ✅ Calculating totals, averages, or statistics
  • ✅ Sorting or ranking items
  • ✅ Deduplication
  • ✅ Building aggregated reports
  • ✅ Combining data from multiple items
Run Once for Each Item

Use this mode for: Specialized cases only

  • How it works: Code executes separately for each input item
  • Data access: $input.item or $item
  • Best for: Item-specific logic, independent operations, per-item validation
  • Performance: Slower for large datasets (multiple executions)
javascript
// Example: Add processing timestamp to each item
const item = $input.item;

return [{
  json: {
    ...item.json,
    processed: true,
    processedAt: new Date().toISOString()
  }
}];

When to use:

  • ✅ Each item needs independent API call
  • ✅ Per-item validation with different error handling
  • ✅ Item-specific transformations based on item properties
  • ✅ When items must be processed separately for business logic

Decision Shortcut:

  • Need to look at multiple items? → Use "All Items" mode
  • Each item completely independent? → Use "Each Item" mode
  • Not sure? → Use "All Items" mode (you can always loop inside)
Why "All Items" is faster — the per-item boundary

Mode choice is the single biggest performance lever in a Code node. Each per-item execution context costs a setup tax (measured on n8n 2.x, small records):

What runs per itemApprox. cost
Code All Items (one run for the whole set)~0.02 ms/item
Expression in any node (IF / Set / etc.)~0.2 ms/item
Code Each Item (a full sandbox per item)~0.6 ms/item — ~25–30× All Items

So Run Once for Each Item over 10k items is ~6 s of pure overhead vs ~0.2 s in Run Once for All Items. Use Each Item only when an item genuinely needs isolating (independent error handling, or a per-item API call you can't batch); otherwise loop inside one All Items node. Expression complexity itself is essentially free (~90% of the cost is the per-item context, not your code) and every node→node hop re-copies all items — so reduce the number of per-item boundaries, don't micro-optimize each one. Below a few hundred items none of this matters; reach for it on the hot path (large item counts, little I/O).

See: DATA_ACCESS.md → "Mode Performance" for the corollaries, hop costs, and scale check.


Data Access Patterns

Four ways to pull data from upstream nodes. Note $node["Name"] and $('Name') need .first().json or .all() — never .json directly.

javascript
const allItems = $input.all();          // 1. All items — batch ops, aggregation (most common)
const data = $input.first().json;       // 2. First item — single objects, API responses
const item = $input.item;               // 3. Current item — "Each Item" mode ONLY (undefined otherwise)
const other = $node["Webhook"].json;    // 4. Named node — combine data across nodes

Always access fields via .json (e.g. item.json.name, not item.name), and prefer the explicit $input.first().json.field over a bare $json.field.

See: DATA_ACCESS.md for the full guide — every pattern with examples, a decision tree, and the common mistakes (mutating originals, missing length checks, $input.item in the wrong mode).


Critical: Webhook Data Structure

MOST COMMON MISTAKE: Webhook data is nested under .body

javascript
// ❌ WRONG - Will return undefined
const name = $json.name;
const email = $json.email;

// ✅ CORRECT - Webhook data is under .body
const name = $json.body.name;
const email = $json.body.email;

// Or with $input
const webhookData = $input.first().json.body;
const name = webhookData.name;

Why: Webhook node wraps all request data under body property. This includes POST data, query parameters, and JSON payloads.

See: DATA_ACCESS.md for full webhook structure details


Return Format Requirements

Canonical form: [{json: {...}}] — an array of objects each with a json property. It is unambiguous and works identically in both execution modes, so make it your default.

In Run Once for All Items mode n8n auto-normalizes looser shapes on the way out: a single bare object, or an array of bare objects, gets wrapped under json for you. So return {foo: 1} runs. What has nothing to wrap — and therefore genuinely fails at runtime with "Code doesn't return items properly" — is a primitive (string/number/boolean) or null/undefined. (n8n-mcp ≥ 2.63.0 no longer flags a bare-object return as an error; it reflects this auto-wrap behavior.)

Correct Return Formats
javascript
// ✅ Single result
return [{
  json: {
    field1: value1,
    field2: value2
  }
}];

// ✅ Multiple results
return [
  {json: {id: 1, data: 'first'}},
  {json: {id: 2, data: 'second'}}
];

// ✅ Transformed array
const transformed = $input.all()
  .filter(item => item.json.valid)
  .map(item => ({
    json: {
      id: item.json.id,
      processed: true
    }
  }));
return transformed;

// ✅ Empty result (when no data to return)
return [];

// ✅ Conditional return
if (shouldProcess) {
  return [{json: processedData}];
} else {
  return [];
}
Non-Canonical Returns (auto-wrapped — prefer the canonical form)
javascript
// ⚠️ Auto-wrapped in All Items mode → [{json: {field: value}}]. Runs, but prefer the array form.
return {
  json: {field: value}
};

// ⚠️ Auto-wrapped → [{json: {field: value}}]. Runs, but add the json wrapper for clarity.
return [{field: value}];

// ✅ Fine — input items already carry a json property, so returning them unchanged is a valid passthrough
return $input.all();
Genuinely Broken Returns
javascript
// ❌ FAILS: primitive — n8n errors "Code doesn't return items properly"
return "processed";

// ❌ FAILS: null / undefined — nothing to pass to the next node
return null;

Why it matters: The canonical [{json: {...}}] is unambiguous and behaves the same in both modes. n8n auto-normalizes bare objects and arrays-of-objects in All Items mode, but a primitive or null return has nothing to wrap and stops execution.

See: ERROR_PATTERNS.md #3 for detailed error solutions


Common Patterns Overview

The most useful Code node shapes from production workflows. One quick example — sum/aggregate across all items:

javascript
const items = $input.all();
const total = items.reduce((sum, item) => sum + (item.json.amount || 0), 0);
return [{ json: { total, count: items.length, average: total / items.length } }];

The full library covers 10 patterns: multi-source aggregation, regex filtering, markdown/structured-text parsing, JSON comparison, CRM/form transformation, release processing, array transformation with computed fields, Slack Block Kit formatting, top-N ranking, and string-aggregation reporting — each with variations.

See: COMMON_PATTERNS.md for the 10 detailed production patterns (and the Best Practices section: validate input, try-catch, filter-early, array methods over loops, console.log debugging).


Error Prevention - Top Mistakes

The recurring Code node failures, in rough frequency order:

  1. Empty code / missing return — always end with return [...], and make sure every branch returns.
  2. Expression syntax as code — don't write {{ }} where JavaScript belongs (return {{ $json.x }} is a syntax error). Use `${$json.field}` or $input.first().json.field. {{ }} inside a string literal is fine — it's just literal text n8n won't evaluate.
  3. Return shape — prefer return [{json:{...}}]. A bare return {…} auto-wraps in All Items mode, but returning a primitive (string/number) or null is what actually fails.
  4. Missing null checks — use optional chaining: item.json?.user?.email || 'fallback'.
  5. Webhook body nesting — $json.email is undefined; use $json.body.email.
  6. Auth helpers blocked (httpRequestWithAuthentication) and $env blocked — route secrets through credentials/HTTP Request node, not the Code node sandbox.

See: ERROR_PATTERNS.md for the comprehensive guide — each error with wrong/right code, escaping rules, the sandbox restrictions (Errors #6–#7), a prevention checklist, and a quick error-message lookup table.


Show full SKILL.md (798 more words)Show less

Built-in Functions & Helpers

javascript
// HTTP requests (no auth — see sandbox note below)
const res = await this.helpers.httpRequest({ method: 'GET', url: 'https://api.example.com/data' });

// DateTime (Luxon): now, formatting, arithmetic
const now = DateTime.now();
const formatted = now.toFormat('yyyy-MM-dd');
const tomorrow = now.plus({ days: 1 });

// $jmespath() — query JSON structures
const adults = $jmespath($input.first().json, 'users[?age >= `18`]');

// $getWorkflowStaticData() — data that persists across executions

Sandbox (since n8n v2.0, JsTaskRunnerSandbox): the accessor is this.helpers.httpRequest() — the bare $helpers global is undefined here ($helpers.httpRequest() throws ReferenceError). Inside a nested async function where this is lost, call it as await fn.call(this, ...). this.helpers.httpRequestWithAuthentication and this.helpers.requestWithAuthenticationPaginated are deny-listed (→ UnsupportedFunctionError); for authenticated calls use an HTTP Request node with the credential (preferred), a sub-workflow, or a manual Authorization: Bearer ${token} header on this.helpers.httpRequest() only when the token already flows through the workflow as data. $env is blocked when N8N_BLOCK_ENV_ACCESS_IN_NODE=true; require() works only for allowlisted modules. Buffer, URL, and standard JS globals (Math, JSON, Object, Array) always work.

See: BUILTIN_FUNCTIONS.md for the complete reference — full httpRequest options, all DateTime/Luxon operations, JMESPath patterns, static-data use cases, and the sandbox-restriction details.


Best Practices

  • Validate input first — guard for empty arrays / missing .json before processing.
  • Try-catch risky work (HTTP calls) and return an error object instead of crashing.
  • Prefer array methods (filter/map/reduce) over manual loops.
  • Filter early, transform late — shrink the dataset before expensive work.
  • Descriptive names and console.log() for debugging (output goes to the browser console).

See: COMMON_PATTERNS.md → "Best Practices" for code examples of each.


Production Gotchas

Hard-won lessons from real deployments — summarized here, with code in DATA_ACCESS.md → "Production Gotchas":

  • SplitInBatches outputs are counterintuitive: main[0] = done (fires once, after all batches), main[1] = each batch (the loop body). Add a Limit 1 node after the done output as a safety.
  • Iteration count is the cost: each loop iteration re-runs the whole body through the engine (~0.8 ms overhead each). batchSize: 1 is the loop equivalent of Each Item — use the largest batch your real constraint (rate limit, page size, memory) allows, or don't loop at all.
  • Cross-iteration accumulation (CRITICAL): after the loop, $('Node Inside Loop').all() returns ONLY the last iteration's items. Accumulate via $getWorkflowStaticData('global') (reset before, push inside, read after).
  • pairedItem: when emitting items that don't map 1:1 to input, set pairedItem: { item: i } or downstream Set nodes fail with paired_item_no_info.
  • Node reference syntax: $('Node').first().json or $('Node').all() — never .json directly on the reference.
  • Float precision: compare currency at the cent level — Math.round(a*100) !== Math.round(b*100) — to avoid false positives from float noise.

When to Use Code Node

Before reaching for a Code node, walk the transform gatekeeper in the n8n Expression Syntax skill: expression → arrow-function IIFE inside an Edit Fields field → Code node, in that order. The first two paths cover most "transform this data" tasks at ~1–10ms each, versus the Code node's sandboxed ~500–1000ms — a ~100x gap on pure single-item shaping, with no functional difference. The Code node earns its place only for whole-dataset aggregation ($input.all()), allowlisted libraries, or async work. And before writing code for crypto (HMAC, hashing, signing) or XML/SOAP/RSS parsing, check for a native node — n8n has a Crypto node (nodes-base.crypto) and an XML node (nodes-base.xml) that cover those without any JavaScript. Dropping into Code for something a native node already does is one of the most common false positives.

Use Code node when:

  • ✅ Complex transformations requiring multiple steps
  • ✅ Custom calculations or business logic
  • ✅ Recursive operations
  • ✅ API response parsing with complex structure
  • ✅ Multi-step conditionals
  • ✅ Data aggregation across items

Consider other nodes when:

  • ❌ Simple field mapping → Use Set node
  • ❌ Basic filtering → Use Filter node
  • ❌ Simple conditionals → Use IF or Switch node
  • ❌ HTTP requests only → Use HTTP Request node

Code node excels at: Complex logic that would require chaining many simple nodes


Integration with Other Skills

Works With:

n8n Expression Syntax:

  • Expressions use {{ }} syntax in other nodes
  • Code nodes use JavaScript directly (no {{ }})
  • When to use expressions vs code

n8n MCP Tools Expert:

  • How to find Code node: search_nodes({query: "code"})
  • Get configuration help: get_node({nodeType: "nodes-base.code"})
  • Validate code: validate_node({nodeType: "nodes-base.code", config: {...}})

n8n Node Configuration:

  • Mode selection (All Items vs Each Item)
  • Language selection (JavaScript vs Python)
  • Understanding property dependencies

n8n Workflow Patterns:

  • Code nodes in transformation step
  • Webhook → Code → API pattern
  • Error handling in workflows

n8n Validation Expert:

  • Validate Code node configuration
  • Handle validation errors
  • Auto-fix common issues

Quick Reference Checklist

Before deploying Code nodes, verify:

  • Code is not empty - Must have meaningful logic
  • Return statement exists - Returns items, not a primitive/null
  • Canonical return format - Each item: {json: {...}} (bare objects auto-wrap, but be explicit)
  • Data access correct - Using $input.all(), $input.first(), or $input.item
  • No {{ }} written as code - Use JavaScript template literals: `${value}`
  • Error handling - Guard clauses for null/undefined inputs
  • Webhook data - Access via .body if from webhook
  • Mode selection - "All Items" for most cases
  • Performance - Prefer map/filter over manual loops
  • Output consistent - All code paths return same structure

Additional Resources

n8n Documentation

Ready to write JavaScript in n8n Code nodes! Start with simple transformations, use the error patterns guide to avoid common mistakes, and reference the pattern library for production-ready examples.

© czlonkowski, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in skills/n8n-code-javascript of czlonkowski/n8n-skills.

  • SKILL.md
  • BUILTIN_FUNCTIONS.md
  • COMMON_PATTERNS.md
  • DATA_ACCESS.md
  • ERROR_PATTERNS.md
  • README.md

Open the folder on GitHubat commit 19cd793

Compare with similar skills

n8n Code Node JavaScript next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

n8n Code Node JavaScript compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
n8n Code Node JavaScript this skillczlonkowski/n8n-skills6.4k—~4.9kAutomated safety check: PassMIT
N8n Code Pythondavila7/claude-code-templates32k7 repos~4.5kAutomated safety check: PassMIT
N8n Code Javascriptdavila7/claude-code-templates32k4 repos~4kAutomated safety check: PassMIT
N8n Code Toolsickn33/agentic-awesome-skills47k1 repos~4.1kAutomated safety check: PassMIT
Debugging Executionsn8n-io/n8n207k—~2.6kAutomated safety check: PassCustom licence
N8n CLIn8n-io/n8n207k—~3kAutomated safety check: PassCustom licence

Similar skills

  • N8n Code Python

    davila7/claude-code-templates

    Write Python code in n8n Code nodes. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 7 repos~4.5k tokens
    Productivity & AutomationAuto-check passed
  • N8n Code Javascript

    davila7/claude-code-templates

    Write JavaScript code in n8n Code nodes. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 4 repos~4k tokens
    Productivity & AutomationAuto-check passed
  • N8n Code Tool

    sickn33/agentic-awesome-skills

    Write and debug JavaScript or Python for the AI-callable n8n Custom Code Tool, including schemas, sandbox limits, and return formats.

    47k GitHub starsUsed in 1 repo~4.1k tokens
    Productivity & AutomationAuto-check passed
  • Official

    Debug failed or wrong-output workflow executions using executions tools.

    207k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • N8n CLI

    n8n-io/n8n

    Official

    Use the n8n CLI to manage workflows, credentials, executions, and more on an n8n instance.

    207k GitHub stars~3k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Official

    Answers n8n product, setup, credential, node, hosting, API, and usage questions from current n8n docs.

    207k GitHub stars~550 tokensUpdated today
    Productivity & AutomationAuto-check passed

More from czlonkowski/n8n-skills

All 15 skills in this repo
  • n8n Binary Data Handling

    czlonkowski/n8n-skills

    Explains how n8n keeps file bytes in $binary apart from structured $json data, and how to read, write and preserve binary across nodes, agent tools and chat.

    6.4k GitHub stars~3.9k tokensUpdated 22 days ago
    Auto-check passed
  • Native Python in n8n Code Nodes

    czlonkowski/n8n-skills

    Explains how to write native Python in n8n Code nodes, including the two input variables, blocked imports and fixes for common errors.

    6.4k GitHub stars~2.8k tokensUpdated 22 days ago
    Auto-check passed
  • n8n Custom Code Tool Guide

    czlonkowski/n8n-skills

    Explains the n8n Custom Code Tool's actual runtime contract so an AI-agent-callable tool doesn't get written like a regular workflow Code node.

    6.4k GitHub stars~4k tokensUpdated 22 days ago
    Auto-check passed
  • n8n Error Handling

    czlonkowski/n8n-skills

    Wires n8n workflows so failures are visible and recoverable: per-node error outputs, retries, error workflows and correct 4xx and 5xx webhook responses.

    6.4k GitHub stars~5.1k tokensUpdated 22 days ago
    Auto-check passed
  • n8n Multi-Instance Targeting

    czlonkowski/n8n-skills

    Keeps an n8n MCP session pointed at the right n8n instance, with rules for discovering, switching and verifying the target before credential writes and for recovering from misroutes.

    6.4k GitHub stars~3.2k tokensUpdated 22 days ago
    Auto-check passed
  • n8n Node Configuration

    czlonkowski/n8n-skills

    Explains how to configure n8n nodes correctly: which fields each operation requires, how property dependencies show or hide fields, and which get_node detail level to use.

    6.4k GitHub stars~4.5k tokensUpdated 22 days ago
    Auto-check passed

Works with

Questions about n8n Code Node JavaScript

What does n8n Code Node JavaScript do?

Guides writing JavaScript in n8n Code nodes: picking an execution mode, reading input data, returning items, using built-in helpers and avoiding common errors. This skill is a guide to JavaScript in n8n Code nodes.item, and says the node should return an array of objects with a json key.

When should I use n8n Code Node JavaScript?

n8n Code Node JavaScript fits situations like: writing a Code node that aggregates or filters items; fixing a Code node error such as an undefined $helpers; deciding between per-item and all-items execution modes; making a Code node faster on a large dataset.

How do I install n8n Code Node JavaScript in Claude Code?

Run `npx skills add czlonkowski/n8n-skills --skill n8n-code-javascript -a claude-code`. Or copy the skill folder (skills/n8n-code-javascript in czlonkowski/n8n-skills) into .claude/skills/n8n-code-javascript in your project. Claude Code loads it when a task matches its description.

How do I install n8n Code Node JavaScript in Codex?

Run `npx skills add czlonkowski/n8n-skills --skill n8n-code-javascript -a codex`. Or copy the skill folder (skills/n8n-code-javascript in czlonkowski/n8n-skills) into .agents/skills/n8n-code-javascript in your project. Codex loads it when a task matches its description.

Can I use n8n Code Node JavaScript in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add czlonkowski/n8n-skills --skill n8n-code-javascript -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/n8n-code-javascript, .gemini/skills/n8n-code-javascript, .github/skills/n8n-code-javascript and .opencode/skills/n8n-code-javascript in your project.

What does n8n Code Node JavaScript need to run?

SKILL.md names no scripts, command-line tools or credentials: n8n Code Node JavaScript is instructions for the agent only. Our summary lists: An n8n instance with Code nodes.

Does n8n Code Node JavaScript access the network?

SKILL.md names 2 domains. As links in the text: docs.n8n.io and moment.github.io. This is read from the text; nothing was executed.

Is n8n Code Node JavaScript safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does n8n Code Node JavaScript use?

n8n Code Node JavaScript is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does n8n Code Node JavaScript use?

About 4.9k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to n8n Code Node JavaScript?

Skills that share tags, products or a category with n8n Code Node JavaScript: N8n Code Python (davila7/claude-code-templates, 32k stars), N8n Code Javascript (davila7/claude-code-templates, 32k stars), N8n Code Tool (sickn33/agentic-awesome-skills, 47k stars) and Debugging Executions (n8n-io/n8n, 207k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains n8n Code Node JavaScript?

czlonkowski (a GitHub user) maintains it in czlonkowski/n8n-skills, which has 6,389 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 16, 2026.

Source: czlonkowski/n8n-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.