abbibo/N8N-Workflow-Builder-Agent-skills-N8N / skills/04-code-nodes-javascript-python
n8n-code-nodes-javascript-python
VerifiedBest practices for writing JavaScript and Python in n8n Code nodes, data access methods, and return contracts.
| File | Kind | Size |
|---|---|---|
| JAVASCRIPT_PATTERNS.md | markdown | 606 B |
| SKILL.md | skill md | 593 B |
SKILL.md
View on GitHub---
name: n8n-code-nodes-javascript-python
description: Best practices for writing JavaScript and Python in n8n Code nodes, data access methods, and return contracts.
---
# N8N Code Nodes: JavaScript & Python
## Decision: Edit Fields vs Code Node
- Prefer **Edit Fields (Set)** for basic mapping, renaming, and static formulas (runs in-process, ~100x faster).
- Use **Code Node** for complex loops, regex extraction, array flattening, deduplication, and non-trivial algorithms.
## Return Contracts
- Every returned item must be a dictionary/object with a `json` key: `[{ json: { ... } }]`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |