Skip to content

n8n Code JavaScript skill

Write or debug n8n JavaScript Code nodes with mode-aware data access and returns.

Community · Romuald Członkowski
AuthorRomuald Członkowski
LicenceMIT
Sourceczlonkowski/n8n-skills · SKILL.md on GitHub
Project websitedocs.n8n.io
Works inClaude Code · Codex, Gemini CLI, Cursor, Copilot
Read from the source on

n8n Code JavaScript skill: Write or debug n8n JavaScript Code nodes with mode-aware data access and returns.

Choose native nodes first, justify custom code and preserve item linkage through transformations.

From the skill's SKILL.md: # JavaScript Code Node

This is a community skill by Romuald Członkowski, not checked by us or by Anthropic. Skills can tell the agent to run code, read files or call the network. Before installing, read its SKILL.md and every script in the folder, and look for anything that does not match what it says it does.

What it does

  1. Choose native nodes first, justify custom code and preserve item linkage through transformations.

What you get

  • Mode-correct JavaScript, item mappings and runtime checks for existing Code nodes.

When to use it

  • Review this Code node and explain whether a native node fits.

When not to use it

  • Treating instructions as a guarantee that a remote service, validation or deployment has succeeded.

What it needs

  • A compatible n8n-mcp server and actual workflow data. Live management needs an authorized n8n instance; connected services and hosting can have separate costs.

Files in the skill

File or folderWhat it is for
SKILL.mdEntry instructions and task-specific workflow.
DATA_ACCESS.mdCompanion reference used by this workflow.
BUILTIN_FUNCTIONS.mdCompanion reference used by this workflow.
ERROR_PATTERNS.mdCompanion reference used by this workflow.

Licence as found in the repository on 2026-11-17: MIT.

Example prompts

Type one of these after installing; naming the skill makes sure it is used.

  • Review this Code node and explain whether a native node fits.
  • Fix this return shape and preserve pairedItem links.
  • Check webhook body access and all-items performance.

How to install n8n-code-javascript

Prepare the workflow

The website link is n8n product documentation, not the community MCP server installer. Install n8n-mcp separately; hosting and connected services may cost money. Review plugin hooks before installation.

Claude Code plugin hooks are not installed by copying a skill folder to another agent. Check the live tool schema and review writes before execution.

A skill is a folder with a SKILL.md file. You install it once; the agent reads its short description at the start of each session and loads the full instructions only when a request matches. Pick the place you use:

Claude Code: from the plugin marketplace

  1. Start Claude Code in a terminal with claude.
  2. Add the marketplace (once per computer):
    /plugin marketplace add czlonkowski/n8n-skills
  3. Install the plugin. Claude Code opens its details first: check what it will add (skills, hooks, MCP servers), then choose whether it is for you, for everyone on this repository, or for you in this repository only.
    /plugin install n8n-mcp-skills@n8n-mcp-skills
  4. Type / and look for /n8n-mcp-skills:n8n-code-javascript, or simply ask for the task.

From your shell instead of a session:

claude plugin marketplace add czlonkowski/n8n-skills
claude plugin install n8n-mcp-skills@n8n-mcp-skills

The plugin installs as a whole, so other skills come with it, including n8n-subworkflows, n8n-multi-instance, n8n-self-hosting, n8n-binary-and-data, n8n-node-configuration, n8n-workflow-patterns, using-n8n-mcp-skills, n8n-code-python, n8n-agents, n8n-expression-syntax, n8n-error-handling, n8n-validation-expert, n8n-mcp-tools-expert, n8n-code-tool.

Claude Code: copy the folder into your skills folder

Put the skill's folder in ~/.claude/skills/ to use it in every project on this computer, or in .claude/skills/ inside a repository to share it with everyone who works there (commit it).

git clone --depth 1 https://github.com/czlonkowski/n8n-skills.git
mkdir -p ~/.claude/skills
cp -R n8n-skills/skills/n8n-code-javascript ~/.claude/skills/

Claude Code notices new or changed skills in these folders during the session. If the skills folder did not exist when the session started, run /reload-skills once. Then type /n8n-code-javascript or just describe the task.

On Windows, run the commands in Git Bash or WSL, or copy the folder into the same place with File Explorer.

Codex, Gemini CLI, Cursor and GitHub Copilot

These agents read the same SKILL.md folders. The one folder all four accept inside a project is .agents/skills/, so this copies the skill there:

git clone --depth 1 https://github.com/czlonkowski/n8n-skills.git
mkdir -p .agents/skills
cp -R n8n-skills/skills/n8n-code-javascript .agents/skills/
AgentProject folderYour user folderNotes
OpenAI Codex
.agents/skills/
~/.agents/skills/
Type $ or run /skills to pick a skill; Codex also chooses one when your task matches.
Gemini CLI
.agents/skills/
.gemini/skills/
~/.agents/skills/
~/.gemini/skills/
Or install from Git with gemini skills install <git URL> --path <folder> --consent. Google replaced Gemini CLI with Antigravity CLI for free-tier and Google One users on 18 June 2026; Antigravity uses .agents/skills/ in a project and ~/.gemini/config/skills/ for you.
Cursor
.agents/skills/
.cursor/skills/
~/.agents/skills/
~/.cursor/skills/
Type / in Agent chat to pick a skill. Cursor also reads Claude Code's .claude/skills/ folders.
GitHub Copilot
.github/skills/
.agents/skills/
.claude/skills/
~/.copilot/skills/
~/.agents/skills/
Works in Copilot CLI, the cloud agent, and agent mode in VS Code, Visual Studio and JetBrains (IDE support depends on the version). Or run gh skill install OWNER/REPOSITORY SKILL (public preview, GitHub CLI 2.90.0 or later).
Only install skills you trust. Anthropic's advice is to use skills only from trusted sources, and to read every file of any other skill before using it: a skill can direct the agent to run commands, read files or send data in ways its description does not mention.

Sources for these steps

Checked against each vendor's documentation on 2026-11-14:

Native first

Use Code for justified recursion, state or heavy transforms, not simple filtering or totals. Document why Code is needed and keep webhook data under body.

Modes and linkage

Match all-items or per-item execution to input access and return shape. Preserve pairedItem when downstream expressions depend on item ancestry.

Questions about n8n-code-javascript

Does this website execute the skill?

No. This is a source-based installation guide. Your agent runs the skill in its own configured environment.

Are full cloud workflows verified here?

No. Generic cloud upload and API execution steps are omitted; source-specific local requirements and host capabilities still apply.

Can I reuse Code Tool examples?

No. The workflow Code node uses item streams and JSON item returns. Agent-callable Code Tools use query input and string output.

Are modules and helpers unrestricted?

No. Module access depends on the instance allowlist; authenticated HTTP helpers are blocked. Prefer the HTTP Request node for credentials and retries.

More AI skills

Related skills

Skill categories