n8n-skills is a collection of Claude Code skills and hooks that guide AI assistants in creating, validating, and deploying n8n workflows through the n8n-mcp server. Developers use it to automate workflow construction, configure nodes and expressions, resolve validation errors, and operate self-hosted n8n. The catalogue entries are its skills, hooks, plugins, and instruction.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add czlonkowski/n8n-skills --skill n8n-code-pythongit clone --depth 1 https://github.com/czlonkowski/n8n-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/czlonkowski/n8n-skills/n8n-code-python)<a href="https://agentmods.dev/skills/czlonkowski/n8n-skills/n8n-code-python"><img src="https://agentmods.dev/badge/skills/czlonkowski/n8n-skills/n8n-code-python/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/czlonkowski/n8n-skills/n8n-code-python"><img src="https://agentmods.dev/badge/skills/czlonkowski/n8n-skills/n8n-code-python.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00228 | $0.03001 |
| Opus 5.5 | $0.00091 | $0.01200 |
| Sonnet 5.5 | $0.00046 | $0.00600 |
| Haiku 4.5 | $0.00023 | $0.00300 |
Grade A, and why
n8n-code-python scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to n8n-code-python — 572 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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 [
{"json": {"name": it["json"]["name"], "revenue": it["json"]["revenue"]}}
for it in _items
if it["json"].get("active")
]
# Run Once for Each Item
row = _item["json"]
return {"json": {**row, "name_upper": (row.get("name") or "").upper()}}
Node config: {"language": "pythonNative", "mode": "runOnceForAllItems" | "runOnceForEachItem", "pythonCode": "..."} on n8n-nodes-base.code typeVersion 2.
The only inputs: _items and _item
| Mode | Variable | Shape |
|---|---|---|
| Run Once for All Items | _items |
list of plain dicts {"json": {...}, "pairedItem": {...}} |
| Run Once for Each Item | _item |
one plain dict {"json": {...}, "pairedItem": {...}} |
- Each variable exists only in its own mode.
_itemsin each-item mode (or_itemin all-items mode) raisesNameError. - Dict access only.
it["json"]["name"]orit["json"].get("name").it.json.nameraisesAttributeError: 'dict' object has no attribute 'json'. - No other nodes. There is no
_node/$('Node')equivalent. If you need data from another branch, bring it in with Merge first, or read it in JavaScript. - Webhook payloads are under
["body"]:_items[0]["json"].get("body", {}).get("email"). - Binary data isn't covered here. Read and write binary in JavaScript (see n8n-binary-and-data).
- pairedItem: returning
_items/_itemkeeps it. When you build new dicts and downstream uses$('Node').item, add"pairedItem": {"item": i}to each returned item. That isn't verified on native Python yet, so test-run before relying on it. - Missing keys: prefer
.get(key, default).row["missing"]raisesKeyError.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · -288 lines · +71 tokens per session scan C → A 11f673926b25
- 1mo ago First seen · 502 lines · 157 tokens per session scan C cae740351f90
n8n-code-python is a skill published in the GitHub repository czlonkowski/n8n-skills (6,444 stars, last pushed yesterday), licensed MIT. It adds 228 tokens to every session and 3,001 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to n8n-code-python, differing in 572 lines, and is treated as a copy.
Other skills, from other repositories
n8n-code-python
Write Python code in n8n Code nodes. Use when writing Python in n8n, using input/json/node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes.
n8n-code-python
Write Python code in n8n Code nodes. Use when writing Python in n8n, using input/json/node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes. Use this skill when the user specifically requests Python for an n8n Code node. Note — JavaScript is recommended for 95% of use…
n8n-code-javascript
Write JavaScript code in n8n Code nodes. Use when writing JavaScript in n8n, using $input/$json/$node syntax, making HTTP requests with $helpers, working with dates using DateTime, troubleshooting Code node errors, or choosing between Code node modes.
n8n-code-python
Write correct Python for n8n Code nodes. Use Python when you need libraries or prefer Python syntax.
matlab
Builds, reviews, migrates, and plans MATLAB or GNU Octave numerical workflows. Use for arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.
pennylane
Builds and differentiates PennyLane quantum circuits, hybrid PyTorch or JAX models, molecular VQE and QAOA workflows. Use for variational quantum algorithms, quantum machine learning, simulator validation, and moving validated circuits to provider plugins. For hardware-specific compilation use qiskit or cirq; for…