n8n-syntax-code-node

n8n-syntax-code-node is a skill for Claude Code, Codex from Impertio-Studio/n8n-Claude-Skill-Package. It costs 136 tokens per session (2,184 once invoked), scanned A, original, MIT.

A reference for writing JavaScript or Python in n8n Code nodes, which run custom logic inside a workflow. It explains execution modes, input and output formats, binary data, available variables, and sandbox restrictions.

In plain words
What is it for?
Use it to transform workflow data, process multiple items, handle binary data, choose between per-item and all-items execution, and pass work to dedicated n8n nodes when needed.
Why use it?
It prevents runtime errors caused by returning the wrong data shape or trying to use file access, HTTP libraries, secrets, or variables unavailable in the Code node.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/impertio-studio/n8n-claude-skill-package/n8n-syntax-code-node
Any agent
npx skills add Impertio-Studio/n8n-Claude-Skill-Package --skill n8n-syntax-code-node
Clone the repo
git clone --depth 1 https://github.com/Impertio-Studio/n8n-Claude-Skill-Package

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for n8n-syntax-code-node

README.md
[![agentmods](https://agentmods.dev/badge/skills/impertio-studio/n8n-claude-skill-package/n8n-syntax-code-node.svg)](https://agentmods.dev/skills/impertio-studio/n8n-claude-skill-package/n8n-syntax-code-node)
Your own site
<a href="https://agentmods.dev/skills/impertio-studio/n8n-claude-skill-package/n8n-syntax-code-node"><img src="https://agentmods.dev/badge/skills/impertio-studio/n8n-claude-skill-package/n8n-syntax-code-node.svg" alt="Measured on agentmods" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,184 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00136 $0.02184
Opus 5 $0.00068 $0.01092
Sonnet 5 $0.00027 $0.00437
Haiku 4.5 $0.00014 $0.00218

Measured 5d ago against content hash aef8717680f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

n8n-syntax-code-node scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/source/n8n-syntax/n8n-syntax-code-node/SKILL.md · 229 lines

How it starts

The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.

n8n Code Node

Complete reference for the n8n v1.x Code node — JavaScript and Python modes, execution models, available variables, binary data, restrictions, and return format.

Quick Reference

Aspect Detail
Languages JavaScript (Node.js) — always available; Python — requires N8N_PYTHON_ENABLED=true (stable v1.111.0+)
Default mode Run Once for All Items
Return format MUST return [{json: {...}}] (all-items) or {json: {...}} (each-item)
Environment Sandboxed — no filesystem, no HTTP, no $itemIndex, no $secrets, no $parameter

CRITICAL: 5 Restrictions

These restrictions apply to ALL Code node executions. Violating them causes runtime errors.

  1. NO filesystem access — NEVER use fs, path, or any file I/O. Use Read/Write Files From Disk nodes instead.
  2. NO HTTP requests — NEVER use fetch, axios, or http. Use the HTTP Request node instead.
  3. NO $itemIndex — This variable is NOT available in the Code node. Track index manually with a loop counter.
  4. NO $secrets — External secrets are NOT accessible in Code node. Pass secret values through preceding node output.
  5. NO $parameter — Node configuration parameters are NOT available. Hardcode values or pass them as input data.

Execution Mode Decision Tree

Need to write Code node logic?
├── Processing items independently (filter, transform, enrich)?
│   └── Use "Run Once for Each Item"
│       ├── JS: access current item via $input.item.json
│       └── Python: access current item via _item["json"]
├── Need to compare/aggregate across ALL items (sort, deduplicate, summarize)?
│   └── Use "Run Once for All Items" (default)
│       ├── JS: access all items via items array
│       └── Python: access all items via _items list
└── Can a native node do this instead (Set, Filter, Sort, Merge)?
    └── ALWAYS prefer native nodes — they are faster and maintain item linking

Return Format

Run Once for All Items — MUST Return Array

Read the full file on GitHub · 229 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 229 lines · 136 tokens per session scan A aef8717680f6

Subscribe to this mod's changes

n8n-syntax-code-node is a skill published in the GitHub repository Impertio-Studio/n8n-Claude-Skill-Package (3 stars, last pushed 1mo ago), licensed MIT. It adds 136 tokens to every session and 2,184 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

qgis-agents-analysis-orchestrator

Use when planning a spatial analysis workflow, choosing between analysis approaches, or chaining multiple operations. Prevents wrong analysis method selection and suboptimal workflow ordering. Covers vector vs raster decision trees, processing algorithm selection, workflow chaining, CRS/format guidance, and MCP server…

Impertio-Studio/QGIS-Claude-Skill-Package · 100 tokens

qgis-agents-map-generator

Use when generating complete maps from data: loading, styling, composing layouts, and exporting. Prevents poor cartographic choices and empty map exports. Covers the full map pipeline: data loading, symbology selection, labeling, layout composition, atlas generation, and export. Keywords: map generation, create map…

Impertio-Studio/QGIS-Claude-Skill-Package · 104 tokens

qgis-errors-data-loading

Use when diagnosing data loading failures, invalid layers, or provider connection errors. Prevents silent failures from unchecked layer validity and incorrect URI formats. Covers invalid layer detection, URI format errors, encoding issues, GeoPackage locking, connection failures, and performance. Keywords: invalid…

Impertio-Studio/QGIS-Claude-Skill-Package · 92 tokens

qgis-errors-projections

Use when diagnosing CRS/projection errors, coordinate mismatches, or datum transformation issues. Prevents silent data corruption from wrong CRS assignment and coordinate order confusion. Covers wrong EPSG selection, lat/lon vs lon/lat, datum warnings, on-the-fly reprojection pitfalls, and fix patterns. Keywords: CRS…

Impertio-Studio/QGIS-Claude-Skill-Package · 99 tokens

qgis-impl-3d-visualization

Use when creating 3D map views, configuring terrain, or rendering vector/point cloud data in 3D. Prevents performance issues from unoptimized point cloud rendering and incorrect terrain configuration. Covers Qgs3DMapSettings, terrain providers, 3D symbols, materials, camera/lights, and layout integration. Keywords: 3D…

Impertio-Studio/QGIS-Claude-Skill-Package · 132 tokens

qgis-impl-georeferencing

Use when georeferencing raster images or vector data using ground control points. Prevents accuracy loss from insufficient GCPs and wrong transformation type selection. Covers GCP management, 7 transformation types, QgsVectorWarper, residual computation, and accuracy assessment. Keywords: georeferencing, GCP, ground…

Impertio-Studio/QGIS-Claude-Skill-Package · 100 tokens