N8n Code Tool skill for Claude

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.

When Claude uses it

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.

N8n Code Tool SKILL.md

A preview of the skill file from WilkoMarketing/antigravity-n8n-skills.

n8n Custom Code Tool

Expert guidance for writing code inside @n8n/n8n-nodes-langchain.toolCode — the tool an AI Agent can invoke, not the regular workflow Code node.


⚠️ This is NOT the Code node

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

Code nodeCustom Code Tool
Node typen8n-nodes-base.code@n8n/n8n-nodes-langchain.toolCode
Packagen8n-nodes-base@n8n/n8n-nodes-langchain
Invoked byPrevious node (workflow flow)AI Agent (LangChain)
Input$input.all() — item streamquery — string or object from LLM
Return[{json: {...}}] (items array)A string
$fromAI()N/ANot available (see Errors)
HTTP helperthis.helpers.httpRequest (auth helpers blocked)Not exposed to the tool sandbox
StatePer-run execution dataNo getContext, no $getWorkflowStaticData

If you treat it like a Code node, it fails. The rest of this skill covers the Code Tool's actual contract.


Read the full SKILL.md on GitHub →

How to install N8n Code Tool

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit WilkoMarketing/antigravity-n8n-skills/n8n-code-tool#main ~/.claude/skills/n8n-code-tool

Codex

npx degit WilkoMarketing/antigravity-n8n-skills/n8n-code-tool#main ~/.codex/skills/n8n-code-tool

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the N8n Code Tool skill do?

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 do I install N8n Code Tool in Claude Code?

Copy the skill folder into ~/.claude/skills/n8n-code-tool, for example with "npx degit WilkoMarketing/antigravity-n8n-skills/n8n-code-tool#main ~/.claude/skills/n8n-code-tool". Claude Code loads it automatically and uses it when a task matches.

+Does N8n Code Tool work with ChatGPT or Codex?

Yes. N8n Code Tool uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/n8n-code-tool. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is N8n Code Tool free?

N8n Code Tool is published on GitHub by WilkoMarketing. The repository does not declare a license, so check with the author before reusing it.

Related software development skills

  1. Code Review

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's…

    mattpocock/skills★ 327k
  2. Using Agent Skills

    Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of…

    addyosmani/agent-skills★ 119k
  3. Build

    Fully automate a coding task with make-plan, do, and babysit.

    thedotmack/claude-mem★ 118k
  4. N8n Error Handling

    Wire n8n error handling so failures are loud, structured, and recoverable.

    WilkoMarketing/antigravity-n8n-skills★ 108
  5. N8n Node Configuration

    Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields,…

    WilkoMarketing/antigravity-n8n-skills★ 108
  6. N8n Validation Expert

    Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator…

    WilkoMarketing/antigravity-n8n-skills★ 108
  7. N8n Workflow Patterns

    Proven workflow architectural patterns from real n8n workflows.

    WilkoMarketing/antigravity-n8n-skills★ 108
  8. Image To Code

    Elite website image-to-code skill for Codex. For visually important web tasks, it must first generate the design image(s) itself, deeply…

    Leonxlnx/imagegen-skills★ 86
  9. Character Reference Sheet

    Generates a 3:2 aspect ratio character reference sheet with three columns: detailed portrait, full-body front view, and full-body back…

    ShinChven/nano-banana-skills★ 72

See all software development skills →

More skills from WilkoMarketing

  1. N8n Expression Syntax

    Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables,…

    WilkoMarketing/antigravity-n8n-skills★ 108
  2. N8n Mcp Tools Expert

    Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates,…

    WilkoMarketing/antigravity-n8n-skills★ 108

All skills by WilkoMarketing →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.