czlonkowski/n8n-code-javascript

n8n の Code ノードで JavaScript コードを作成します。データの集計、フィルタリング、API 呼び出し、フォーマット変換、バッチ処理など、あらゆるカスタム JavaScript 処理に使用します。

n8n-code-javascript とは?

このスキルは、n8n ワークフロー内の Code ノードで JavaScript コードを記述するための包括的なガイドです。データの集約、フィルタリング、API コール、形式変換、バッチ処理ロジックなど、カスタムデータ変換のあらゆる場面で活用できます。特に、`$input`、`$json`、`$node` 構文の使い方、`this.helpers` や `$helpers` グローバルを使った HTTP リクエスト、`DateTime` を使った日付処理、Code ノードのエラー解決、モード選択(「すべてのアイテムを一度に実行」 vs 「各アイテムを個別に実行」)をカバーしています。また、`SplitInBatches` ループパターン、反復間データの保持、`pairedItem` による元アイテムとの関連付け、本番環境でのパターンについても解説。Code ノードやワークフローのパフォーマンス問題(なぜ遅いのか、どの実行モードが高速か、大量データセットで1アイテムあたりのオーバーヘッドを削減する方法)にも対応します。ただし、AI エージェントから呼び出せるカスタムコードツール(`@n8n/n8n-nodes-langchain.toolCode`)には、別の実行契約があるため、代わりに n8n-code-tool スキルを使用してください。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/czlonkowski/n8n-skills/tree/main/skills/n8n-code-javascript

Installed? Explore more 生産性&コラボレーション skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

n8n-code-javascript は何をしますか?

n8n の Code ノードで JavaScript コードを記述します。n8n で JavaScript を記述する際、$input/$json/$node 構文の使用、this.helpers / $helpers グローバルを使った HTTP リクエスト、DateTime を使用した日付処理、Code ノードのエラー解決、Code ノードのモード選択、または n8n でのカスタムデータ変換を行う場合に使用します。ワークフローに Code ノードが必要な場合は、データ集計、フィルタリング、API 呼び出し、形式変換、バッチ処理ロジック、あらゆるカスタム JavaScript において、常にこのスキルを使用してください。SplitInBatches ループパターン、反復間データ、pairedItem、本番環境での実用的なパターンをカバーします。また、Code ノードやワークフローが遅い理由、どの実行モードが高速か、大規模データセットで1アイテムあたりのオーバーヘッドを削減する方法について質問された場合にも使用します。例外 — AI エージェントから呼び出し可能なカスタムコードツール(@n8n/n8n-nodes-langchain.toolCode、AI エージェントにアタッチされるツール)については、代わりに n8n-code-tool スキルを使用してください。実行契約が異なります。

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

czlonkowski/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 cases — only use Python when the user explicitly prefers it or the task requires Python-specific standard library capabilities (regex, hashlib, statistics). 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).

czlonkowski/n8n-expression-syntax

Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, mapping data between nodes, or referencing webhook data in workflows. Use this skill whenever configuring node fields that reference data from previous nodes — expressions are how n8n passes data between nodes, and getting the syntax wrong is the most common source of workflow errors. Also use when asked whether a complex expression hurts performance.

czlonkowski/n8n-mcp-tools-expert

Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, managing credentials, auditing instance security, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats, and common patterns. IMPORTANT — Always consult this skill before calling any n8n-mcp tool — it prevents common mistakes like wrong nodeType formats, incorrect parameter structures, and inefficient tool usage. If the user mentions n8n, workflows, nodes, or automation and you have n8n MCP tools available, use this skill first.

czlonkowski/n8n-node-configuration

Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between get_node detail levels, or learning common configuration patterns by node type. Always use this skill when setting up node parameters — it explains which fields are required for each operation, how displayOptions control field visibility, and when to use patchNodeField for surgical edits vs full node updates.

czlonkowski/n8n-validation-expert

Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator structure issues, or need help understanding validation results. Also use when asking about validation profiles, error types, the validation loop process, or auto-fix capabilities. Consult this skill whenever a validate_node or validate_workflow call returns errors or warnings — it knows which warnings are false positives and which errors need real fixes.

czlonkowski/n8n-workflow-patterns

Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, batch processing, or scheduled tasks. Always consult this skill when the user asks to create, build, or design an n8n workflow, automate a process, or connect services — even if they don't explicitly mention 'patterns'. Covers webhook, API, database, AI, batch processing, and scheduled automation architectures. Also use when optimizing a slow workflow or speeding up large-item-count processing (node count, batchSize, all-items vs per-item).

関連スキル