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 [

Read the full SKILL.md on GitHub →

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-python

Codex

npx degit WilkoMarketing/antigravity-n8n-skills/n8n-code-python#main ~/.codex/skills/n8n-code-python

Claude.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.

Related software development skills

  1. Code Review

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's…

    mattpocock/skills★ 327k
  2. Using Agent Skills

    Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of…

    addyosmani/agent-skills★ 119k
  3. Build

    Fully automate a coding task with make-plan, do, and babysit.

    thedotmack/claude-mem★ 118k
  4. N8n Code Tool

    Write JavaScript or Python for the n8n Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode) — the AI-agent-callable tool, NOT the workflow…

    WilkoMarketing/antigravity-n8n-skills★ 108
  5. N8n Error Handling

    Wire n8n error handling so failures are loud, structured, and recoverable.

    WilkoMarketing/antigravity-n8n-skills★ 108
  6. N8n Node Configuration

    Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields,…

    WilkoMarketing/antigravity-n8n-skills★ 108
  7. N8n Validation Expert

    Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator…

    WilkoMarketing/antigravity-n8n-skills★ 108
  8. N8n Workflow Patterns

    Proven workflow architectural patterns from real n8n workflows.

    WilkoMarketing/antigravity-n8n-skills★ 108
  9. Image To Code

    Elite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply…

    Leonxlnx/imagegen-skills★ 86

See all software development skills →

More skills from WilkoMarketing

  1. N8n Expression Syntax

    Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables,…

    WilkoMarketing/antigravity-n8n-skills★ 108

All skills by WilkoMarketing →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.