← 返回
未分类 Key 中文

N8n Skill

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...
在用户想要构建、调试或扩展 n8n 工作流时使用——根据描述生成工作流 JSON、搭建自定义 TypeScript 节点、构建...
automatelab
未分类 clawhub v0.4.0 2 版本 100000 Key: 需要
★ 1
Stars
📥 343
下载
💾 1
安装
2
版本
#latest

概述

n8n

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

Tool routing

Tool names use dot-notation: node., workflow., execution. (renamed in v0.4.0 from n8n_).

Stateless tools (work without any n8n instance):

  • workflow.generate - plain-English description → workflow JSON. Detects AI-agent intent and emits a LangChain cluster.
  • node.scaffold - description → single INodeType TypeScript file for a custom n8n package.
  • workflow.lint - workflow JSON → list of issues (deprecated types, missing typeVersion, broken connections, AI Agent without ai_languageModel, IF v1 schema, etc.).
  • 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.

Live-instance tools (require N8N_API_URL + N8N_API_KEY env vars):

  • workflow.list - paginate workflows; filter by active/tags/name.
  • workflow.get - fetch a workflow by id. Pair with workflow.lint to audit deployed workflows.
  • workflow.create - POST a generated workflow. Strips read-only fields. Workflow is created inactive.
  • workflow.activate - flip active on/off.
  • execution.list - browse executions; pass includeData: true for the full body. Pair with execution.explain.

Default chains:

  • Generate, then ship: workflow.generateworkflow.lint → (if env configured) workflow.createworkflow.activate.
  • Audit a deployed workflow: workflow.listworkflow.getworkflow.lint.
  • Diagnose a failure: execution.list {status: "error"} → pick one → execution.list {includeData: true, ...}execution.explain.

When the user describes a flow

  1. Run workflow.generate with their description verbatim.
  2. Run workflow.lint on the result.
  3. 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.

When the user pastes execution data and says "why is X empty?"

  1. Run execution.explain with the JSON.
  2. 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.

Loading deeper context

The skill stays small to keep your context window free. Load from references/ only when the task actually needs that depth:

  • 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).
  • 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.
  • 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."
  • references/workflow-json.md - nodes/connections structure, required fields, credential block. Load when: hand-editing workflow JSON or merging two workflows.
  • 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."
  • references/deprecations.md - retired node types and their replacements. Load when: lint flags a deprecation or the user is migrating an old workflow.

Server setup

Add to the user's MCP config (Cursor: ~/.cursor/mcp.json, Claude Desktop: claude_desktop_config.json):

{
  "mcpServers": {
    "n8n": {
      "command": "npx",
      "args": ["-y", "@automatelab/n8n-mcp"],
      "env": {
        "N8N_API_URL": "https://your-n8n.example.com",
        "N8N_API_KEY": "n8n_..."
      }
    }
  }
}

The env block is optional — the 4 stateless tools work without it. Get an API key from n8n: Settings → API → Create API key.


Developed by AutomateLab. Source: github.com/ratamaha-git/n8n-mcp.

版本历史

共 2 个版本

  • v0.4.0 当前
    2026-06-01 21:12
  • v0.0.2
    2026-05-12 05:26 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,114 📥 835,488
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,402 📥 323,483
content-creation

Blog Topic Research

automatelab
Stop writing blog posts nobody searches for. This skill builds your editorial backlog from real, verifiable user demand
★ 0 📥 420