N8n Code Python skill for Claude
Write Python in n8n Code nodes (native Python, `language` pythonNative, n8n 2.x).
When Claude uses it
Use when the user explicitly wants Python in a Code node, when migrating old Pyodide/"Python (Beta)" code that used _input/_json/_node/_now, or when a Python Code node fails with NameError, "Security violations detected", "Import of standard library module … is disallowed", "__build_class__ not found", "A 'json' property isn't a dictionary", or "Python runner unavailable". Covers the only two variables (_items/_item), dict-only access, imports blocked by default, the sandbox's denied builtins, accepted return shapes, and how errors interact with onError. JavaScript is the default for Code nodes — native Python has no n8n helpers and, by default, no imports. EXCEPTION — for Python in the AI-agent-callable Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode), use the n8n-code-tool skill instead (input is _query, return must be a string).
N8n Code Python SKILL.md
A preview of the skill file from WilkoMarketing/antigravity-n8n-skills.
Python Code Node (native)
Since n8n 2.0 the Code node's Python runs as native Python in a task runner (language: "pythonNative"). The old Pyodide "Python (Beta)" is gone, and with it every n8n helper it had:
_input, _json, _node, _now, _today and _jmespath all raise NameError now. Code copied
from old templates, forum posts or older docs usually breaks on this.
JavaScript first — stronger than before
Native Python gives you two variables and plain Python, and by default no imports: no
json, datetime or re. Everything n8n-specific ($('Node'), $jmespath, Luxon,
this.helpers.httpRequest, static data) exists only in JavaScript. Use Python only when the user
explicitly asks for it. Even then, first check whether an expression, Edit Fields, or a native
node (Crypto, Date & Time, HTML, XML) does the job. See n8n-code-javascript and the transform
gatekeeper in n8n-expression-syntax.
Quick start
# Run Once for All Items (default mode)
return [
How to install N8n Code Python
Claude Code
Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):
npx degit WilkoMarketing/antigravity-n8n-skills/n8n-code-python#main ~/.claude/skills/n8n-code-pythonCodex
npx degit WilkoMarketing/antigravity-n8n-skills/n8n-code-python#main ~/.codex/skills/n8n-code-pythonClaude.ai and Claude Desktop
Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.
Frequently asked questions
+What does the N8n Code Python skill do?
Write Python in n8n Code nodes (native Python, `language` pythonNative, n8n 2.x). Use when the user explicitly wants Python in a Code node, when migrating old Pyodide/"Python (Beta)" code that used _input/_json/_node/_now, or when a Python Code node fails with NameError, "Security violations detected", "Import of standard library module … is disallowed", "__build_class__ not found", "A 'json' property isn't a dictionary", or "Python runner unavailable". Covers the only two variables (_items/_item), dict-only access, imports blocked by default, the sandbox's denied builtins, accepted return shapes, and how errors interact with onError. JavaScript is the default for Code nodes — native Python has no n8n helpers and, by default, no imports. EXCEPTION — for Python in the AI-agent-callable Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode), use the n8n-code-tool skill instead (input is _query, return must be a string).
+How do I install N8n Code Python in Claude Code?
Copy the skill folder into ~/.claude/skills/n8n-code-python, for example with "npx degit WilkoMarketing/antigravity-n8n-skills/n8n-code-python#main ~/.claude/skills/n8n-code-python". Claude Code loads it automatically and uses it when a task matches.
+Does N8n Code Python work with ChatGPT or Codex?
Yes. N8n Code Python uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/n8n-code-python. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.
+Is N8n Code Python free?
N8n Code Python is published on GitHub by WilkoMarketing. The repository does not declare a license, so check with the author before reusing it.