Skip to content

Python code guide for n8n Code nodes, covering native _items/_item syntax and runtime limits.

CCM score
57 of 100
skills.sh installs
215
GitHub stars
50.5K
last updated
Jun 3, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers bounded Python transformations in n8n Code nodes, with all-items and per-item modes shown
  • Explains the n8n 2 runtime contract: the removed Pyodide runtime, unavailable _input/_json/_node helpers, and import restrictions
  • Enforces guardrails such as validating input types, using managed credentials, and keeping item counts and runtime bounded
  • Designed for users who need to check n8n version and task runner support before writing Python in workflows

Install

$ npx -y skills add sickn33/agentic-awesome-skills --skill n8n-code-python -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Python Code Node (Native)

When to Use

Use for bounded Python transformations in an n8n Code node when native nodes or expressions are insufficient. Check the installed n8n version and task runner first.

Runtime contract

n8n 2 removed the legacy Pyodide runtime. Native Python uses _items in all-items mode and _item in per-item mode; legacy _input, _json, _node and _now helpers are unavailable. Self-hosted imports depend on installed runner packages and explicit allowlists. Cloud imports may be unavailable, including standard modules. JavaScript imports are restricted too; switching languages does not provide unrestricted filesystem, networking or package access.

Examples

All-items mode, with no imports:

return [
    {"json": {"id": item["json"].get("id"), "processed": True},
     "pairedItem": {"item": index}}
    for index, item in enumerate(_items)
    if item["json"].get("active")
]

Per-item mode:

return {"json": {**_item["json"], "name_upper": (_item["json"].get("name") or "").upper()}}

Details

Repository
github.com/sickn33/agentic-awesome-skills
Categories
Workflow Automation, Python
First seen
Jun 3, 2026

Questions

What does the n8n-code-python skill do?

n8n-code-python writes Python code for n8n Code nodes, covering the _items and _item syntax for all-items and per-item modes. It also explains the standard library limits and runtime constraints that apply to Python inside n8n Code nodes.

How do I install the n8n-code-python skill?

Run npx -y skills add sickn33/agentic-awesome-skills --skill n8n-code-python -y in your project. After that, n8n-code-python lets the agent write bounded Python transformations for n8n Code nodes.

Which n8n versions does n8n-code-python support for Python code nodes?

n8n-code-python notes that n8n 2 removed the legacy Pyodide runtime, so native Python uses _items and _item instead of _input, _json and _node. Self-hosted imports depend on installed runner packages, and cloud imports may be unavailable.

Where does n8n-code-python sit in the Workflow Automation category?

n8n-code-python is listed in the Workflow Automation category on Claude Marketplaces, next to computer-use, python-executor and gws-events. Its focus is narrow: Python inside n8n Code nodes rather than general workflow building.

More from sickn33/agentic-awesome-skills

All 682

Similar to N8n Code Python

More Workflow Automation