using-n8n-skills-official
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUsing n8n Skills
使用n8n Skills
The official n8n MCP evolves over time, so tool names, parameters, and default behaviors can drift between versions. When you spot drift (a tool a skill names doesn't exist, a parameter shape doesn't match what returns, or behavior differs from what the skill describes), suggest updating the skill and n8n instance to the latest stable.
get_node_types官方n8n MCP会不断演进,因此不同版本间的工具名称、参数和默认行为可能会存在差异。当你发现差异(Skill提及的工具不存在、参数结构与返回的不符,或行为与Skill描述不一致)时,建议将Skill和n8n实例更新至最新稳定版本。
get_node_typesNon-negotiables
不可违背的规则
Three rules with no exceptions. Violating any produces workflows that look right but break in production.
- Invoke the relevant skill before any n8n action. Not just MCP tool calls. Before writing SDK code, configuring a node, designing a workflow, wiring a connection, building an agent, or handling errors: invoke the matching skill via the Skill tool. This document is a router. The skill body has the actual rules. The PreToolUse hooks remind you on the highest-impact MCP calls if a plugin is installed. The responsibility is yours on everything else. Err on the side of reading extra documents.
- Validate AND verify before publishing. before
validate_workflow, andpublish_workflowafter every create or update to check theget_workflow_detailsobject. Validation alone misses many issues documented in the skills that will silently break workflows.connections - Tokens/secrets never go in text fields. Always use the n8n credential system. If no native node exists, configure HTTP Request with the official credential type. See .
n8n-credentials-and-security-official
三条无例外的规则。违反任何一条都会导致工作流看似正常,但在生产环境中失效。
- 执行任何n8n操作前先调用对应的Skill。不仅限于MCP工具调用。在编写SDK代码、配置节点、设计工作流、连接节点、构建Agent或处理错误之前:通过Skill工具调用匹配的Skill。本文档仅作为路由指引,具体规则在Skill主体内容中。若已安装插件,PreToolUse钩子会在高影响MCP调用时提醒你。其他所有操作则由你自行负责,宁可多阅读相关文档也不要遗漏。
- 发布前必须验证并确认。发布前先执行,每次创建或更新后执行
validate_workflow检查get_workflow_details对象。仅靠验证无法发现Skill文档中记录的许多会导致工作流静默失效的问题。connections - 令牌/机密信息绝不能放入文本字段。务必使用n8n凭证系统。若没有原生节点,可配置HTTP Request并使用官方凭证类型。详见。
n8n-credentials-and-security-official
Lean on skills, not training data
依赖Skill,而非训练数据
n8n evolves faster than any model's training cutoff. Parameter names drift, new MCP tools land, defaults change, patterns get deprecated. Anything you "remember" is likely wrong, often silently.
Trust the skills + live MCP tools (, , ) over recollection. If a skill contradicts what you "know", trust the skill. If contradicts a skill, trust the tool. Without this discipline you will ship workflows that look right and silently fail: parameter names that don't exist, renamed nodes, deprecated patterns.
get_node_typesget_sdk_referenceget_workflow_best_practicesget_node_typesUnless a user preference overrides it, err on the side of loading too many skills rather than too few. Even a 3-node webhook flow typically needs , , , and . Nothing in n8n is too small for skills.
n8n-node-configuration-officialn8n-expressions-officialn8n-error-handling-officialn8n-workflow-lifecycle-officialn8n的演进速度远超任何模型的训练截止时间。参数名称会变化,新的MCP工具会上线,默认值会修改,旧模式会被弃用。你“记得”的内容很可能已经过时,且往往是静默失效。
优先信任Skill和实时MCP工具(、、),而非记忆。若Skill与你“所知”内容冲突,信任Skill;若与Skill冲突,信任工具。若不遵守这一原则,你交付的工作流可能看似正常,但会静默失效:比如使用不存在的参数名称、已重命名的节点、已弃用的模式。
get_node_typesget_sdk_referenceget_workflow_best_practicesget_node_types除非用户有特殊偏好,否则宁可加载过多Skill也不要遗漏。即使是包含3个节点的webhook流程,通常也需要、、和。n8n中没有任何内容是小到不需要Skill的。
n8n-node-configuration-officialn8n-expressions-officialn8n-error-handling-officialn8n-workflow-lifecycle-officialStrong defaults (each skill owns its exceptions)
默认规则(每个Skill可定义例外情况)
- The Code node is a last resort. Expression first, then arrow function inside Edit Fields, then Code. Code earns its place for multi-source aggregation, libraries, and stateful work. See .
n8n-code-nodes-official - Anything reusable becomes a stateless sub-workflow. Search existing ones via before building. See
search_workflows({ tags: ['subworkflow'] }).n8n-subworkflows-official
- Code节点是最后选择。优先使用表达式,其次是Edit Fields中的箭头函数,最后才是Code节点。仅在需要多源聚合、调用库或有状态操作时使用Code节点。详见。
n8n-code-nodes-official - 任何可复用内容都应做成无状态子工作流。在构建前先通过搜索现有子工作流。详见
search_workflows({ tags: ['subworkflow'] })。n8n-subworkflows-official
Red flags: thoughts that mean STOP and invoke
警示信号:出现这些想法时请立即停止并调用Skill
These rationalizations cause skills to be skipped. If you catch yourself thinking any of them, invoke the relevant skill via the Skill tool, even if you "already read it" earlier in the session.
| Thought | Action |
|---|---|
| "This workflow is simple, I'll just build it" | Invoke |
| "I'll add a Set node here to map these fields" | Invoke |
| "I'll just use a Code node, it's easier" | Invoke |
| "Validation passed, I'm ready to publish" | Invoke |
| "The agent is wired up, the tool descriptions look fine" | Invoke |
| "I'll set this sub-workflow trigger to passthrough" | Invoke |
| "I'll use passthrough so binary works, then branch internally on which input shape arrived" | Invoke |
| "This section's big, I'll pull it into a sub-workflow" | If it's only to tidy the canvas (not reuse/isolation/testing), a node group is lighter, faster, and simpler: keep it inline and group it via |
| "I should ask the user what their credential is named" | Don't. The string in |
| "The user mentioned data analysis, I'll write Python" | Invoke |
| "I'll add a Loop Over Items here to process each row" | Invoke |
| "Date math, I'll use a DateTime node" | Invoke |
| "I'll wrap this in a Merge with 3 sources" | Invoke |
| "I'll fan out these three slow steps to run in parallel" | Invoke |
| "User said which project, I'll just build it" | Invoke |
"I'll just run | Invoke |
The meta-skill (this document) tells you WHICH skill applies. The Skill tool loads the actual rules. Reading the meta-skill once at session start is not a substitute for invoking the skill at the moment of decision.
这些合理化借口会导致你跳过Skill。若你发现自己有以下任何想法,请通过Skill工具调用对应的Skill,即使你“之前已经读过”。
| 想法 | 操作 |
|---|---|
| 「这个工作流很简单,我直接搭建就行」 | 调用 |
| 「我在这里加个Set节点来映射这些字段」 | 调用 |
| 「我直接用Code节点,这样更简单」 | 调用 |
| 「验证通过了,我可以发布了」 | 调用 |
| 「Agent已经连接好了,工具描述看起来没问题」 | 调用 |
| 「我把子工作流的触发器设置为passthrough」 | 调用 |
| 「我用passthrough来处理二进制数据,然后在内部根据输入结构分支」 | 调用 |
| 「这部分内容太多了,我把它提取成子工作流」 | 如果只是为了整理画布(而非复用/隔离/测试),节点组更轻量、快速且简单:保持内容内联并通过 |
| 「我应该问问用户他们的凭证名称是什么」 | 不要问。 |
| 「用户提到了数据分析,我写Python代码」 | 调用 |
| 「我在这里加个Loop Over Items节点来处理每一行数据」 | 调用 |
| 「处理日期计算,我用DateTime节点」 | 调用 |
| 「我用Merge节点合并3个数据源」 | 调用 |
| 「我把这三个慢步骤并行执行」 | 调用 |
| 「用户说了项目名称,我直接搭建」 | 调用 |
「我直接运行 | 调用 |
本元Skill(本文档)告诉你应使用哪个Skill。Skill工具会加载具体规则。会话开始时阅读一次元Skill不能替代决策时刻调用Skill。
Skill index
Skill索引
Invoke via the Skill tool. Trigger column = when to invoke.
| Skill | Trigger |
|---|---|
| Starting, designing, organizing, or finishing a workflow. Covers sticky-note conventions, descriptions that capture the why, naming, validation checklist, folder limitations, MCP-access-per-workflow gotcha |
| Anything reusable, multi-step builds, or the user mentions reuse. Search before building, stateless patterns, tag-based discovery convention |
| You need capabilities the MCP doesn't natively provide. Wrap n8n APIs as workflow tools, with user permission |
| Writing |
| Configuring any node. Operation-aware, property dependencies, never assume parameters |
| User reaches for a Code node, or custom logic is needed. Decision tree, JavaScript patterns when truly required |
| Multi-item data, batching, paginated APIs, "for each" or "loop over" mentions. Default per-item iteration, |
| LangChain Agent node, tool calling, system prompts, structured output, memory, RAG. Tool names/descriptions as part of the prompt, sub-workflow as tool, modular prompt design |
| Webhook-triggered or production-bound workflows. Error branch on every fallible node, 4xx for caller errors and 5xx for execution errors |
| Any auth, API key, or token mention. Credential system, custom credentials, HTTP Request with official creds |
| Files, images, attachments. Binary handling patterns, agent-tool boundary, CDN requirement for chat surfaces |
| Data Tables: schemas, default columns (id/createdAt/updatedAt), no-FK relational design, dedup, the no-JSON-only-primitives rule, the SDK-vs-UI manual-mapping quirk |
| Errors, unexpected behavior, "this isn't working". Believe the user, check parameters, fetch n8n source from GitHub |
通过Skill工具调用。触发列=调用时机。
| Skill | 触发时机 |
|---|---|
| 开始、设计、整理或完成工作流时。涵盖便签约定、捕获“原因”的描述、命名规则、验证清单、文件夹限制、每个工作流的MCP访问注意事项 |
| 涉及任何可复用内容、多步骤构建或用户提及复用时。构建前先搜索、无状态模式、基于标签的发现约定 |
| 需要MCP原生不具备的功能时。在获得用户许可后,将n8n API封装为工作流工具 |
| 编写 |
| 配置任何节点时。关注操作、属性依赖、绝不假设参数 |
| 用户想要使用Code节点或需要自定义逻辑时。决策树、真正需要时的JavaScript模式 |
| 涉及多项目数据、批量处理、分页API或提及“for each”/“loop over”时。默认逐项迭代、 |
| 使用LangChain Agent节点、工具调用、系统提示词、结构化输出、记忆、RAG时。工具名称/描述作为提示词的一部分、子工作流作为工具、模块化提示词设计 |
| 处理webhook触发或生产环境工作流时。每个可能出错的节点都要设置错误分支,4xx表示调用方错误,5xx表示执行错误 |
| 涉及任何认证、API密钥或令牌时。凭证系统、自定义凭证、使用官方凭证的HTTP Request |
| 处理文件、图片、附件时。二进制数据处理模式、Agent工具边界、聊天界面的CDN要求 |
| 使用Data Tables时:模式、默认列(id/createdAt/updatedAt)、无外键的关系设计、去重、仅使用原始类型而非JSON的规则、SDK与UI手动映射的特殊情况 |
| 遇到错误、意外行为或“无法正常工作”时。相信用户反馈、检查参数、从GitHub获取n8n源码 |
n8n MCP tools (compact reference)
n8n MCP工具(精简参考)
The MCP defers tool descriptions to save tokens. Below is the short-form list so you have working knowledge of every tool from turn one.
Tool names are shown without the MCP prefix. The qualified name is where depends on the user's MCP config.
mcp__<server>__<tool><server>MCP延迟加载工具描述以节省令牌。以下是简短列表,让你从一开始就能了解所有工具的功能。
工具名称省略了MCP前缀。完整名称为,其中取决于用户的MCP配置。
mcp__<server>__<tool><server>Workflow management
工作流管理
| Tool | What it does |
|---|---|
| Search workflows across the instance by |
| Fetch a workflow's full JSON by ID. Use after every create/update to verify connections. |
| List folders. You cannot create or move folders. You can only place workflows into folders that already exist. |
| List projects. |
| List all workflow tags (with |
| Soft-delete / activate / deactivate. Validate before publish. |
| Search executions across the instance (filter by status, workflow, time range). Use for "list recent runs" / "failures in the last hour". Single executions: |
| 工具 | 功能 |
|---|---|
| 通过 |
| 通过ID获取工作流的完整JSON。每次创建/更新后使用以验证连接。 |
| 列出文件夹。你无法创建或移动文件夹。只能将工作流放入已存在的文件夹。 |
| 列出项目。 |
| 列出所有工作流标签(包含每个标签的 |
| 软删除/激活/停用。发布前先验证。 |
| 搜索实例中的执行记录(按状态、工作流、时间范围过滤)。用于“列出最近运行记录”/“过去一小时内的失败记录”。单个执行记录: |
Workflow building
工作流构建
| Tool | What it does |
|---|---|
| Fetch the n8n Workflow SDK reference. Read this before writing workflow code. Sections: |
| Fetch best-practices for a workflow technique. Call once per technique before searching nodes. |
| Discover nodes by capability (e.g. "gmail", "slack", "schedule trigger"). Returns IDs plus discriminators (resource/operation/mode). |
| Fetch exact TypeScript parameter definitions for node IDs. Required before configuring any node. Don't guess parameter names. |
| Resolve the real values behind resource-locator ( |
| Save a workflow from SDK code. Always include a 1-2 sentence |
| Apply atomic ops (max 100, all-or-nothing): node/connection CRUD, |
| Schema-only validation of node configs (1-50 per call). Per-parameter errors, no graph noise. Side-channel for iteration/debug; |
| Validate full SDK code before create/update. Necessary but not sufficient: doesn't catch all wiring traps ( |
| List accessible credentials (filter by type/project/etc). Returns metadata only, never secret values. Discover IDs before binding via |
| 工具 | 功能 |
|---|---|
| 获取n8n工作流SDK参考。编写工作流代码前务必阅读。包含章节: |
| 获取工作流技术的最佳实践。在搜索节点前针对每种技术调用一次。 |
| 按功能发现节点(如“gmail”、“slack”、“schedule trigger”)。返回ID及鉴别器(资源/操作/模式)。 |
| 获取节点ID的精确TypeScript参数定义。配置任何节点前必须调用。不要猜测参数名称。 |
| 解析资源定位符( |
| 从SDK代码保存工作流。务必包含1-2句话的 |
| 应用原子操作(最多100个,要么全部成功要么全部失败):节点/连接的增删改查、 |
| 仅验证节点配置的模式(每次调用1-50个节点)。返回每个参数的错误,无图结构干扰。用于迭代/调试的辅助通道; |
| 创建/更新前验证完整SDK代码。这是必要条件但不充分:无法捕获所有连接陷阱( |
| 列出可访问的凭证(按类型/项目等过滤)。仅返回元数据,绝不返回机密值。在通过 |
Workflow testing & execution
工作流测试与执行
| Tool | What it does |
|---|---|
| Returns JSON Schemas (not data) for nodes that need pinning: triggers, credentialed nodes, and HTTP Request. You generate sample values. |
| Run with the pin data you supply. Auto-pins triggers, credentialed nodes, and HTTP Request. Code, Edit Fields, If, Data Tables, Execute Command, file ops, and sub-workflow calls run for real. Ask before running if any not-auto-pinned node has side effects. Pin data is per-execution only with no visual indicator in the execution viewer, so tell the user which nodes were pinned after the call. See |
| Production execution with the real trigger. Wire error handling first. Same side-effect rules as |
| Fetch an execution by |
| 工具 | 功能 |
|---|---|
| 返回需要固定数据的节点的JSON Schema(而非数据):触发器、带凭证的节点、HTTP Request。你需要生成示例值。 |
| 使用你提供的固定数据运行。自动固定触发器、带凭证的节点和HTTP Request。Code、Edit Fields、If、Data Tables、Execute Command、文件操作和子工作流调用会真实执行。若任何非自动固定的节点有副作用,请先询问用户再运行。固定数据仅针对本次执行,且在执行查看器中无视觉提示,因此调用后需告知用户哪些节点被固定。详见 |
| 使用真实触发器执行生产环境工作流。先配置错误处理。副作用规则与 |
| 通过 |
Data tables
数据表格
n8n's built-in tabular storage. Not an external service. Prefer over external DBs for workflow-local persistent state. Full surface:
| Tool | What it does |
|---|---|
| Create a new Data Table. |
| Find existing Data Tables. |
| Rename. |
| Schema changes. |
| Append rows. |
n8n内置的表格存储。不是外部服务。对于工作流本地持久化状态,优先使用它而非外部数据库。完整功能如下:
| 工具 | 功能 |
|---|---|
| 创建新的数据表格。 |
| 查找现有数据表格。 |
| 重命名。 |
| 修改模式。 |
| 追加行。 |
Version history
版本历史
| Tool | What it does |
|---|---|
| List a workflow's saved versions, newest first (n8n 2.29.0+). |
| Fetch a past version's full content by |
| Re-apply a past version as the current draft (records a new history entry). |
| 工具 | 功能 |
|---|---|
| 列出工作流的已保存版本,按从新到旧排序(n8n 2.29.0+)。 |
| 通过 |
| 将历史版本重新应用为当前草稿(会记录新的历史条目)。 |
The protocol, in order
操作流程(按顺序)
For any n8n task:
- Recognize the matching skill from the index above. If the task spans skills, recognize the primary one first and pick up others as their triggers come up.
- Invoke the skill via the Skill tool before the first MCP call. Don't call n8n MCP tools blind.
- Read the SDK reference once per session before writing workflow code (). The most efficient way to avoid SDK-shape mistakes.
get_sdk_reference - Get node types before configuring any node (). Guessing parameter names creates invalid workflows, sometimes silently.
get_node_types - Validate before publish, verify after create/update. Validation catches schema errors. Verification (pulling the workflow back via ) catches connection bugs validation misses.
get_workflow_details - Surface drift when you spot it. If a tool or parameter doesn't match what a skill says, tell the user. Updates may be needed.
对于任何n8n任务:
- 从上述索引中识别匹配的Skill。若任务涉及多个Skill,先识别主要Skill,再根据触发时机调用其他Skill。
- 在首次调用MCP工具前通过Skill工具调用对应的Skill。不要盲目调用n8n MCP工具。
- 每次会话编写工作流代码前先阅读SDK参考()。这是避免SDK结构错误的最有效方式。
get_sdk_reference - 配置任何节点前先获取节点类型()。猜测参数名称会导致无效工作流,有时甚至是静默失效。
get_node_types - 发布前验证,创建/更新后确认。验证可发现模式错误。确认(通过拉回工作流)可发现验证遗漏的连接问题。
get_workflow_details - 发现差异时及时告知。若工具或参数与Skill描述不符,请告知用户。可能需要更新。
Reporting skills used
报告使用的Skill
create_workflow_from_codeupdate_workflowskillsUsed: string[]- Contents: report each skill exactly as the Skill tool names it, keeping the suffix:
-officialwhen plugin-namespaced, else bareplugin:skill-official. The suffix marks these as ours (vs other n8n packs); the plugin prefix marks plugin vs raw-skill usage.skill-official - Window: skills invoked since the last successful create/update call. Resets after each.
- Limits: max 50 entries, each max 128 chars.
create_workflow_from_codeupdate_workflowskillsUsed: string[]- 内容:严格按照Skill工具中的名称报告每个Skill,保留后缀:若为插件命名空间则为
-official,否则为plugin:skill-official。后缀标识这些是官方Skill(而非其他n8n工具包);插件前缀标识是插件使用还是原生Skill使用。skill-official - 范围:自上次成功创建/更新调用以来调用的Skill。每次成功创建/更新后重置。
- 限制:最多50个条目,每个条目最多128字符。
Reviewing existing workflows or projects
审查现有工作流或项目
For audits, code-review, or any task framed as "review this workflow" / "what's wrong with this" / "audit this project," walk the review checklist: . Severity-tiered (MUST FIX / SHOULD FIX / NICE TO HAVE), with each item linking to the canonical skill ref for the fix. Distinct from (pre-publish gates for in-progress builds): REVIEW_CHECKLIST is for any workflow, including ones built by anyone, any age.
n8n-workflow-lifecycle-officialreferences/REVIEW_CHECKLIST.mdVALIDATION_CHECKLIST.mdA review agent should call first, walk the checklist top to bottom, and report findings grouped by severity. MUST FIX items shouldn't be auto-fixed without user confirmation.
get_workflow_details对于审计、代码审查或任何以“审查这个工作流”/“这个工作流有什么问题”/“审计这个项目”为主题的任务,请遵循审查清单:的。清单按严重程度分层(必须修复/应该修复/建议修复),每个条目都链接到对应的官方Skill参考以获取修复方法。该清单与(针对在建工作流的发布前检查)不同:REVIEW_CHECKLIST适用于任何工作流,包括任何人在任何时间构建的工作流。
n8n-workflow-lifecycle-officialreferences/REVIEW_CHECKLIST.mdVALIDATION_CHECKLIST.md审查Agent应先调用,从上到下逐一检查清单,并按严重程度分组报告发现的问题。必须修复的问题未经用户确认不得自动修复。
get_workflow_detailsWhen in doubt
疑问处理
- Can't find a workflow the user is referring to? If the user built it in the n8n UI, the most common reason is MCP access isn't enabled on that specific workflow: UI-created workflows can default to MCP-disabled and stay invisible until the per-workflow toggle is flipped. Ask the user: "Open the workflow in n8n, Settings, toggle MCP access on." (MCP-created workflows default on, so this only applies to UI-built ones.) See the skill (
n8n-workflow-lifecycle-official).references/MCP_ACCESS_PER_WORKFLOW.md - The user is right. If they say something's broken, believe them, even if you "know" the workflow is correct. Re-check parameters, fetch the n8n source from to trace logic, find API docs for missing functions. The
github.com/n8n-io/n8nskill walks through this.n8n-debugging-official - If no skill fits and the task is non-trivial, ask before guessing.
- These skills are opinionated, but considered best practice by the n8n team. The user can override any opinion by editing the SKILL.md. The plugin is just markdown.
- 找不到用户提及的工作流? 如果用户在n8n UI中构建了该工作流,最常见的原因是该工作流未启用MCP访问:UI创建的工作流默认可能禁用MCP访问,且在开启每个工作流的开关前保持不可见。请询问用户:“在n8n中打开该工作流,进入设置,开启MCP访问。”(MCP创建的工作流默认开启,因此仅适用于UI构建的工作流)。详见Skill的
n8n-workflow-lifecycle-official。references/MCP_ACCESS_PER_WORKFLOW.md - 用户是对的。如果用户说某个功能无法正常工作,请相信他们,即使你“知道”工作流是正确的。重新检查参数,从获取n8n源码追踪逻辑,查找缺失函数的API文档。
github.com/n8n-io/n8nSkill会引导你完成这一过程。n8n-debugging-official - 若找不到匹配的Skill且任务非 trivial,请先询问用户再猜测。
- 这些Skill是有倾向性的,但被n8n团队视为最佳实践。用户可通过编辑SKILL.md覆盖任何规则。插件仅包含markdown文档。