CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

n8n-code-python

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

Quality

97%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

96%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

Excellent reference-style content: terse, verified, error-message-driven, and fully actionable, with a strong closing checklist that embeds validation into the workflow. The one real defect is progressive disclosure — the body's only external reference, COMMON_PATTERNS.md, is missing from the bundle, leaving a dangling link.

Suggestions

Include COMMON_PATTERNS.md in the skill bundle (e.g. under references/) or remove the Reference section, since the promised '12 import-free patterns' are currently unreachable and the link 404s.

If COMMON_PATTERNS.md is added, briefly restate its one-or-two highest-value patterns (or the safe-nested-access idiom) inline so the most common need survives a broken or skipped reference.

Consider moving the Related-skills and Reference sections adjacent to each other (or merging them) so all outbound pointers live in one navigable block.

DimensionReasoningScore

Conciseness

The body is lean and assumes Python competence: dense tables (inputs, migration, sandbox limits, return shapes, onError matrix) with no re-teaching of basic Python or generic n8n concepts, e.g. 'Everything else in plain Python works (verified): comprehensions, generators, lambdas...'. Version pins ('Observed on n8n 2.38.5') are provenance notes with an explicit re-check caveat rather than date-conditional instructions, so the time-sensitivity penalty does not apply; every token earns its place, matching the 5 anchor.

5 / 5

Actionability

Copy-paste-ready code for both modes ('return [{"json": ...} for it in _items ...]', 'row = _item["json"]'), exact node config JSON, a legacy-to-native migration table with literal replacements, a one-line import probe ('import json + return [{"json": {"ok": True}}}]'), and exact fixes paired to exact error strings ('NameError: name 'type' is not defined' → 'isinstance(x, dict)'). Fully executable guidance covering the common cases, matching the 5 anchor.

5 / 5

Workflow Clarity

The decision flow is clear and sequenced: JavaScript first (with an explicit fallback gatekeeper), mode/variable matching, dict-only access, no unconfirmed imports, correct return shape — culminating in a Checklist with an explicit validation checkpoint ('Ran a real test execution and inspected the output items (validation alone won't catch the traps above)') and feedback loops (the import probe node, 'test-run before relying on it' for pairedItem). This matches the 5 anchor (clear sequence, explicit validation, feedback loops, checklist) rather than the 4 anchor's minor validation gaps.

5 / 5

Progressive Disclosure

Sections are well organized and the single reference is clearly signaled and one level deep ('**[COMMON_PATTERNS.md](COMMON_PATTERNS.md)**: 12 import-free patterns, each verified on a live n8n instance'), but that referenced file does not exist anywhere in the bundle — no references/ directory and no COMMON_PATTERNS.md — so the link is dangling and the promised detailed content is unavailable. This is above the 3 anchor (the reference is clearly signaled and no detail content is inlined) but the broken reference is more than the 5 anchor's 'easy navigation' allows.

4 / 5

Total

19

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

An exemplary description: it states concrete capabilities, gives explicit multi-condition 'Use when' triggers including verbatim error messages a user would paste, and explicitly fences off the neighboring JavaScript and Custom Code Tool skills. It is dense but every clause is functional trigger or scope information rather than padding.

DimensionReasoningScore

Specificity

The description names the domain ('Write Python in n8n Code nodes (native Python, `language` pythonNative, n8n 2.x)') and enumerates concrete capabilities: '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'. This is comprehensive coverage of multiple specific actions, matching the 5 anchor; it exceeds the 4 anchor because no meaningful capability gaps are evident.

5 / 5

Completeness

Both 'what' and 'when' are explicit: the what is 'Write Python in n8n Code nodes' with an enumerated scope, and the when is a literal 'Use when the user explicitly wants Python in a Code node, when migrating old Pyodide/'Python (Beta)' code..., or when a Python Code node fails with [concrete error messages]'. This mirrors the 5 anchor's structure (concrete capability statement plus explicit trigger phrases), so it cannot be capped at 3 or reduced to 4.

5 / 5

Trigger Term Quality

It includes the natural phrases users would actually say or paste: 'Python in a Code node', 'Python (Beta)', 'Pyodide', '_input/_json/_node/_now', plus verbatim error strings ('Security violations detected', '__build_class__ not found', 'A 'json' property isn't a dictionary', 'Python runner unavailable'). Coverage including synonyms and exact failure messages matches the 5 anchor; it is well above the 4 anchor, which expects only a few missing natural terms.

5 / 5

Distinctiveness Conflict Risk

The niche is precise (native Python in n8n Code nodes, pythonNative, n8n 2.x) and it actively disambiguates adjacent skills: 'JavaScript is the default for Code nodes' and 'EXCEPTION — for Python in the AI-agent-callable Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode), use the n8n-code-tool skill instead'. Clear distinct triggers with minimal conflict risk, matching the 5 anchor rather than the 4 anchor's 'minor overlap risk'.

5 / 5

Total

20

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 1 missing

Warning

Total

15

/

16

Passed

Repository

czlonkowski/n8n-skills

Path

skills/n8n-code-python/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.