n8n AI Code Tool Guide
Write JavaScript or Python that obeys the n8n Custom Code Tool contract for AI-agent calls.
The skill clearly separates the Code Tool from the Code node, limits HTTP, credential, and state access, and recommends alternative tools for broader operations, reducing permission and data-flow risk. It does not address sensitive-data handling, user confirmation, rollback or recovery, dependency security, or deployment isolation; publisher provenance is unverified, so points are deducted.
The documentation is internally organized around inputs, outputs, common errors, alternatives, and actionable failure messages, and the main paths appear reproducible. There is no committed test suite or CI execution evidence for key paths, and version compatibility boundaries are not fully consistent across the v1.1+, v1.2, and v1.3 statements; deductions apply within the static ceiling.
The audience, activation triggers, use cases, and boundaries against toolWorkflow and HTTP Request Tool are clearly described. The material is primarily English-language and gives no Chinese-language support or mainland-China reachability assessment; evidence for exact n8n-version and environment boundaries is limited.
The main skill, schema guide, and error catalog provide useful progressive disclosure with installation prerequisites, examples, limitations, version information, and MIT licensing. Maintenance ownership, changelog, update path, and formal dependency-lock information are incomplete, and some governance evidence comes from repository-level README material rather than the target skill itself.
The skill supplies directly usable JavaScript and Python patterns, return contracts, schema configuration, error fixes, and tool-selection guidance, so the core task is plausibly completed with meaningful marginal value. Because examples and n8n behavior were not executed or independently verified, their claim to be fully working in the target environment remains uncertain; the static maximum is applied.
The documentation identifies official n8n, ToolCode, and LangChain sources and provides auditable error strings and configuration snippets. It contains no local test suite, CI results, or third-party execution records, and the cited source contents were not independently verified within this review, so only limited points are awarded.
- Do not treat this skill as a validated security boundary; review sensitive inputs, credentials, external side effects, and production deployment manually.
- Execute the key paths on the target n8n version and verify v1.2/v1.3 schema behavior, Python bindings, return types, and error handling; the files provide no reproducible test evidence.
- Publisher identity is not verified by the FollowSkills enterprise registry; recheck the official source links and maintenance status before adoption.
What does this skill do, and when should you use it?
This skill focuses on n8n’s Custom Code Tool rather than the regular Code node. It explains how to read the AI-provided query, handle unstructured or schema-based arguments, and return a string result. It also covers naming, input schemas, sandbox boundaries, and recurring runtime errors. It fits n8n users who need AI Agents to perform deterministic computation, parsing, formatting, or validation.
Provides JavaScript and Python Custom Code Tool examples; explains reading input from query or _query; shows how to define structured arguments with specifyInputSchema, jsonSchemaExample, inputSchema, and DynamicStructuredTool; demonstrates JSON.stringify for structured results; diagnoses errors such as Wrong output type returned and No execution data available; documents unavailable variables and helpers in the sandbox; and compares Code Tool with toolWorkflow and HTTP Request Tool.
- An n8n AI Agent developer needs a deterministic calculator for loans, prices, or other numeric operations.
- A workflow author needs to parse JSON text sent by an LLM and return the result as a tool observation.
- A troubleshooter is seeing Wrong output type returned or response property should be a string errors.
- A production tool author needs multiple typed parameters with validation through specifyInputSchema.
- A developer needs HTTP access, credentials, or cross-call state and must choose between Code Tool, toolWorkflow, and HTTP Request Tool.
What are this skill's strengths and limitations?
- Clearly distinguishes the Custom Code Tool from the regular Code node, including node type, input, and return contract.
- Covers JavaScript, Python, unstructured input, and structured schemas.
- Gives causes, fixes, and LLM-oriented error messages for common failures.
- Documents sandbox limitations involving $fromAI, $input, $json, and HTTP helpers.
- It focuses narrowly on the n8n Custom Code Tool rather than complete n8n workflow development.
- The sandbox lacks common data-access, HTTP, credential, and persistent-state capabilities.
- Structured input depends on an n8n version that supports the relevant schema features; no full compatibility matrix is provided.
- The source provides no standalone test results or broad platform coverage evidence.
How do you install this skill?
This skill is part of the n8n-skills collection, whose prerequisites include an installed and configured n8n-mcp MCP server. In Claude Code, run /plugin install czlonkowski/n8n-skills; for manual installation, clone the repository and run cp -r n8n-skills/skills/* ~/.claude/skills/. In Claude.ai, download the skills/n8n-code-tool folder, zip it, and upload it through Settings → Capabilities → Skills. The source does not provide a standalone Codex installation command.
How do you use this skill?
After installation, trigger it with a specific n8n Custom Code Tool question, such as Why does my Code Tool throw 'Wrong output type returned'? or How do I define structured input for an n8n AI Agent Code Tool? In the tool code, read JavaScript input from query or Python input from _query, and return a string; use JSON.stringify() for structured output.
How does this skill compare with similar options?
Unlike the regular n8n Code node, the Custom Code Tool is invoked by an AI Agent, reads query, and returns a string instead of [{json:{...}}]. Use toolWorkflow when you need $fromAI(), credentials, HTTP helpers, or access to other nodes. Use HTTP Request Tool when the primary operation is a single external API call.