Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

n8n-code-python

Skill by davila7

Guides an AI assistant in writing Python code for n8n Code nodes. It covers the _input, _json and _node syntax, the required return format, and the standard library limits. It is for n8n users who want to write Python instead of JavaScript.

  • Score 94
  • 35k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install n8n-code-python

Built from the published package, never by AI.

git clone --depth 1 https://github.com/davila7/claude-code-templates /tmp/claude-code-templates && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-templates/cli-tool/components/skills/workflow-automation/n8n/n8n-code-python ~/.claude/skills/n8n-code-python

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install n8n-code-python in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill gives an AI assistant guidance for writing Python in n8n Code nodes. It explains the Python (Beta) helper syntax, including _input.all(), _input.first(), _input.item and _node, and the Python (Native) mode that uses _items and _item. It also covers the Run Once for All Items and Run Once for Each Item modes.

The skill lists rules that are easy to miss. Results must be returned as a list of dictionaries with a "json" key. Webhook data sits under ["body"]. External libraries such as requests, pandas and numpy are not available, so only standard library modules like json, datetime, re and statistics can be used. The source recommends JavaScript for most use cases and suggests Python only when a standard library function or Python syntax is specifically needed.

Written from the project's SKILL.md and checked against it.

What it can do

  • Data access patternsShows how to read items with _input.all(), _input.first(), _input.item and _node.
  • Return format rulesExplains the required list of objects with a json key and lists common wrong formats.
  • Webhook data structureExplains that webhook request data is nested under the body property in Code nodes.
  • Standard library referenceLists the standard library modules available in n8n Python Code nodes.
  • Common Python patternsProvides examples for transformation, filtering, regex extraction, validation and statistics.
  • Error preventionCovers frequent mistakes such as importing external libraries, missing returns and wrong return shapes.

What you need

  • n8n with a Code node
  • Python (Beta) or Python (Native) mode in the Code node

Try asking

  • Write a Python Code node that sums the amount field across all items
  • Show me how to read webhook data in an n8n Python Code node
  • Which Python libraries can I use in an n8n Code node?

Good to know

  • No external Python libraries such as requests, pandas or numpy are available.
  • Python support in n8n Code nodes is marked Beta in the source.
  • The source recommends JavaScript for about 95% of use cases.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: cli-tool/components/skills/workflow-automation/n8n/n8n-code-python/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • COMMON_PATTERNS.md19 KB
  • DATA_ACCESS.md15 KB
  • ERROR_PATTERNS.md14 KB
  • README.md9 KB
  • SKILL.md18 KB
Show all 6 files
  • STANDARD_LIBRARY.md18 KB

Alternatives to n8n-code-python

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

n8n-code-python: common questions

Can I use requests or pandas in an n8n Python Code node?

No. The source says external libraries are not available and lists requests, pandas and numpy as examples that raise errors. It suggests using an HTTP Request node or JavaScript instead.

Why is my webhook data missing in the Python Code node?

The source says webhook data is nested under the body property, so it should be read as _json["body"] rather than _json directly.

What format must a Python Code node return?

The source says results must be a list of dictionaries that each have a json key, for example [{"json": {...}}]. Returning a plain dictionary or string causes the workflow to fail.

How do I install n8n-code-python?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is n8n-code-python free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is n8n-code-python safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to n8n-code-python?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

n8n-code-python Install

Add to stack

Loading.