Skills for Real Engineers. Straight from my .agents directory.
n8n-code-tool
Agent skill fromczlonkowski/n8n-skills
Write JavaScript or Python for the n8n Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode) — the AI-agent-callable tool, NOT the workflow Code node. Use when building a Code Tool attached to an AI Agent, writing code that an LLM will invoke, parsing the `query` input, returning a string result, defining an input schema for structured arguments (specifyInputSchema, jsonSchemaExample, DynamicStructuredTool), or troubleshooting errors like \"Wrong output type returned\", \"No execution data available\", \"The response property should be a string, but it is an object\", \"Cannot assign to read only property 'name'\", or an AI agent that refuses to call the tool. Covers the critical differences between Code node and Code Tool: return format (string vs `[{json:{...}}]`), unavailability of `$fromAI`/`$input`/`$helpers` in the Code Tool sandbox, naming rules for AI invocation, and when to use `toolWorkflow`/HTTP Request Tool instead.
How to install n8n-code-tool
npx skills add czlonkowski/n8n-skills# or add only this skill to Claude Code: copy the folder
skills/n8n-code-tool/
# into
~/.claude/skills/n8n-code-tool/ (all projects)
.claude/skills/n8n-code-tool/ (one project)
1# n8n Custom Code Tool23Expert guidance for writing code inside `@n8n/n8n-nodes-langchain.toolCode` — the tool an AI Agent can invoke, **not** the regular workflow Code node.45---67## ⚠️ This is NOT the Code node89The Custom Code Tool looks like a Code node in the editor — same JavaScript editor, similar layout — but it is a **completely different node** from a different package with a **different runtime contract**.1011| | Code node | Custom Code Tool |12|---|---|---|13| **Node type** | `n8n-nodes-base.code` | `@n8n/n8n-nodes-langchain.toolCode` |14| **Package** | `n8n-nodes-base` | `@n8n/n8n-nodes-langchain` |15| **Invoked by** | Previous node (workflow flow) | AI Agent (LangChain) |16| **Input** | `$input.all()` — item stream | `query` — string or object from LLM |17| **Return** | `[{json: {...}}]` (items array) | **A string** |18| **`$fromAI()`** | N/A | **Not available** (see Errors) |19| **HTTP helper** | `this.helpers.httpRequest` (auth helpers blocked) | Not exposed to the tool sandbox |20| **State** | Per-run execution data | No `getContext`, no `$getWorkflowStaticData` |2122**If you treat it like a Code node, it fails.** The rest of this skill covers the Code Tool's actual contract.2324---2526## Quick Start2728### Minimal JavaScript Code Tool2930```javascript31// `query` is whatever the AI sent (a string by default)32return `You asked: ${query}`;33```3435### Minimal Python Code Tool3637```python38# `_query` is whatever the AI sent (a string by default)39return f"You asked: {_query}"40```41…
Excerpt shown under the repository's MIT license.
More skills in n8n-skills
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
