{"skill":{"slug":"automatelab-n8n","displayName":"N8n Skill","summary":"Use when the user wants to build, debug, or extend an n8n workflow - generating workflow JSON from a description, scaffolding a custom TypeScript node, build...","description":"---\r\nname: n8n\r\ndescription: Use when the user wants to build, debug, or extend an n8n workflow - generating workflow JSON from a description, scaffolding a custom TypeScript node, building an AI agent (LangChain cluster), iterating over items, writing Code-node JS, linting an existing workflow, diagnosing a failed execution, or driving a live n8n instance via REST.\r\nversion: 0.4.0\r\nlicense: MIT\r\nhomepage: https://github.com/ratamaha-git/n8n-mcp\r\ncompatibility:\r\n  hosts:\r\n    - claude-code\r\n    - cursor\r\n    - claude-desktop\r\n    - windsurf\r\n    - vscode\r\n    - zed\r\n    - continue\r\n    - cline\r\n    - jetbrains\r\n    - warp\r\nmetadata:\r\n  npm: \"@automatelab/n8n-mcp\"\r\n  mcpName: io.github.ratamaha-git/n8n-mcp\r\n---\r\n\r\n# n8n\r\n\r\nPairs with the `@automatelab/n8n-mcp` server. The server exposes 9 MCP tools; this skill tells you when to use which and where to load deeper context.\r\n\r\n## Tool routing\r\n\r\nTool names use dot-notation: `node.*`, `workflow.*`, `execution.*` (renamed in v0.4.0 from `n8n_*`).\r\n\r\n**Stateless tools** (work without any n8n instance):\r\n\r\n- `workflow.generate` - plain-English description → workflow JSON. Detects AI-agent intent and emits a LangChain cluster.\r\n- `node.scaffold` - description → single `INodeType` TypeScript file for a custom n8n package.\r\n- `workflow.lint` - workflow JSON → list of issues (deprecated types, missing `typeVersion`, broken connections, AI Agent without `ai_languageModel`, IF v1 schema, etc.).\r\n- `execution.explain` - failed/surprising execution JSON → diagnosis. Catches the #1 n8n pain point: items \"silently disappearing\" between nodes. Also flags unresolved `={{ ... }}` expressions and surfaces LLM token usage.\r\n\r\n**Live-instance tools** (require `N8N_API_URL` + `N8N_API_KEY` env vars):\r\n\r\n- `workflow.list` - paginate workflows; filter by active/tags/name.\r\n- `workflow.get` - fetch a workflow by id. Pair with `workflow.lint` to audit deployed workflows.\r\n- `workflow.create` - POST a generated workflow. Strips read-only fields. Workflow is created inactive.\r\n- `workflow.activate` - flip active on/off.\r\n- `execution.list` - browse executions; pass `includeData: true` for the full body. Pair with `execution.explain`.\r\n\r\nDefault chains:\r\n- *Generate, then ship*: `workflow.generate` → `workflow.lint` → (if env configured) `workflow.create` → `workflow.activate`.\r\n- *Audit a deployed workflow*: `workflow.list` → `workflow.get` → `workflow.lint`.\r\n- *Diagnose a failure*: `execution.list {status: \"error\"}` → pick one → `execution.list {includeData: true, ...}` → `execution.explain`.\r\n\r\n## When the user describes a flow\r\n\r\n1. Run `workflow.generate` with their description verbatim.\r\n2. Run `workflow.lint` on the result.\r\n3. If lint clean → return the JSON. If warnings → return JSON + a one-line summary of warnings. If errors → fix them (usually by editing the JSON inline or re-prompting the user) before returning.\r\n\r\n## When the user pastes execution data and says \"why is X empty?\"\r\n\r\n1. Run `execution.explain` with the JSON.\r\n2. Read the findings; if the answer is in the report (e.g. \"Node Y returned 0 items because IF condition routed to other branch\"), summarize. Otherwise inspect the workflow node's `parameters` block manually.\r\n\r\n## Loading deeper context\r\n\r\nThe skill stays small to keep your context window free. Load from `references/` only when the task actually needs that depth:\r\n\r\n- `references/expressions.md` - `$json`, `$input.all()`, `$(\"Node Name\")`, auto-iteration. **Load when**: writing or debugging expressions, or the user says \"use `$json[0]`\" (common mistake).\r\n- `references/ai-agents.md` - LangChain cluster topology, `ai_languageModel` / `ai_memory` / `ai_tool` connection types, sub-node catalog. **Load when**: building an AI agent or the lint flags an agent without a language model.\r\n- `references/code-node.md` - Code node return-shape contract, what breaks, sandbox limits. **Load when**: writing a Code node or the user reports \"Code node fails silently.\"\r\n- `references/workflow-json.md` - `nodes`/`connections` structure, required fields, credential block. **Load when**: hand-editing workflow JSON or merging two workflows.\r\n- `references/iteration.md` - Split Out vs Loop Over Items vs Aggregate. **Load when**: the user says \"loop over an array\" or \"process N at a time.\"\r\n- `references/deprecations.md` - retired node types and their replacements. **Load when**: lint flags a deprecation or the user is migrating an old workflow.\r\n\r\n## Server setup\r\n\r\nAdd to the user's MCP config (Cursor: `~/.cursor/mcp.json`, Claude Desktop: `claude_desktop_config.json`):\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"n8n\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@automatelab/n8n-mcp\"],\r\n      \"env\": {\r\n        \"N8N_API_URL\": \"https://your-n8n.example.com\",\r\n        \"N8N_API_KEY\": \"n8n_...\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nThe `env` block is optional — the 4 stateless tools work without it. Get an API key from n8n: Settings → API → Create API key.\r\n\r\n---\r\n\r\nDeveloped by [AutomateLab](https://automatelab.tech). Source: [github.com/ratamaha-git/n8n-mcp](https://github.com/ratamaha-git/n8n-mcp).\r\n","tags":{"latest":"0.4.0"},"stats":{"comments":0,"downloads":406,"installsAllTime":1,"installsCurrent":1,"stars":1,"versions":2},"createdAt":1778422543490,"updatedAt":1780236968437},"latestVersion":{"version":"0.4.0","createdAt":1780236968437,"changelog":"- Major update: Adds live n8n instance tooling, refines tool routing, and improves documentation structure.\n- Expanded from 3 to 9 tools, including execution diagnostics and direct workflow management (list, create, activate).\n- Tool names now use dot-notation (e.g., workflow.generate), replacing previous n8n_* naming.\n- Clear separation of stateless tools vs. those requiring n8n API credentials.\n- Added references directory for deeper context (expressions, AI agents, iteration, code node details, etc.), loaded only as needed.\n- skill-card.md file removed to streamline documentation.","license":"MIT-0"},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"automatelab","userId":"s17d2fxqjhpy9jp6zvvj71062586nfxk","displayName":"AutomateLab","image":null},"moderation":null}