n8n Code Python skill
Write native Python for n8n 2.x Code nodes with explicit sandbox and mode limits.
Community · Romuald Członkowski| Author | Romuald Członkowski |
|---|---|
| Licence | MIT |
| Source | czlonkowski/n8n-skills · SKILL.md on GitHub |
| Project website | docs.n8n.io |
| Works in | Claude Code · Codex, Gemini CLI, Cursor, Copilot |
| Read from the source on |
n8n Code Python skill: Write native Python for n8n 2.x Code nodes with explicit sandbox and mode limits.
Migrate legacy Pyodide helpers to dict-based _items or _item access and verify real execution.
From the skill's SKILL.md: # Python Code Node (native)
What it does
- Migrate legacy Pyodide helpers to dict-based _items or _item access and verify real execution.
What you get
- Native Python snippets, migration checks and tests for silent unchanged-input failures.
When to use it
- Migrate this old _input Python node to pythonNative.
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 folder | What it is for |
|---|---|
SKILL.md | Entry instructions and task-specific workflow. |
COMMON_PATTERNS.md | Companion 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.
- Migrate this old _input Python node to pythonNative.
- Remove blocked imports and match the return shape to the mode.
- Test whether this failure passes unchanged input downstream.
How to install n8n-code-python
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
- Start Claude Code in a terminal with
claude. - Add the marketplace (once per computer):
/plugin marketplace add czlonkowski/n8n-skills - 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 - Type / and look for
/n8n-mcp-skills:n8n-code-python, 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-skillsThe 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-code-javascript, n8n-workflow-patterns, using-n8n-mcp-skills, 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-python ~/.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-python 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-python .agents/skills/| Agent | Project folder | Your user folder | Notes |
|---|---|---|---|
| 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). |
Sources for these steps
Checked against each vendor's documentation on 2026-11-14:
Restricted runtime
Imports are blocked unless explicitly allowed on the target instance. Classes, dunder access and several builtins are unavailable; use native nodes or JavaScript when appropriate.
Mode-specific returns
All-items mode uses a list of JSON items; per-item mode returns one JSON object. Keep item links and test the instance runner rather than assuming compatibility.
Questions about n8n-code-python
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 use old Python helpers?
No. Native Python uses _items or _item and dict access. Legacy _input, _json and _now helpers are unavailable.
Does validation prove Python ran correctly?
No. Sandbox rejection or wrong return shapes can leave unchanged data on the success path. Inspect actual execution output.
More AI skills
Related skills
n8n Code JavaScript skill
Community · Romuald CzłonkowskiWrite or debug n8n JavaScript Code nodes with mode-aware data access and returns.n8n Code Tool skill
Community · Romuald CzłonkowskiWrite agent-callable n8n Custom Code Tools with query input and string output.n8n Agents skill
Community · Romuald CzłonkowskiDesign n8n agents with deliberate tools, memory, structured output and human review.n8n Multi Instance skill
Community · Romuald CzłonkowskiTarget multiple n8n instances explicitly and recover from ambiguous MCP routing.n8n Node Configuration skill
Community · Romuald CzłonkowskiConfigure n8n nodes from live schemas, operations and property dependencies.n8n Validation Expert skill
Community · Romuald CzłonkowskiInterpret n8n validation errors, profiles and runtime verification requirements.