nodes-node-structure
使用 INodeTypeDescription、资源操作模式和正确的 package.json 配置正确构建 n8n 节点。在创建新的 *.node.ts 文件、定义 INodeTypeDescription 属性、实现资源和操作参数、构建触发器节点、将复杂节点组织到 actions 文件夹中或配置 package.json 中的 n8n 部分时,请使用此技能。在声明式和编程式样式之间进行选择、设置节点元数据或构建社区节点包时应用。
📖 中文导读:使用 INodeTypeDescription、资源操作模式和正确的 package.json 配置正确构建 n8n 节点。在创建新的 *.node.ts 文件、定义 INodeTypeDescription 属性、实现资源和操作参数、构建触发器节点、将复杂节点组织到 actions 文件夹中或配置 package.json 中的 n8n 部分时,请使用此技能。在声明式和编程式样式之间进行选择、设置节点元数据或构建社区节点包时应用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Nodes Node Structure description: Structure n8n nodes correctly with INodeTypeDescription, resource-operation patterns, and proper package.json configuration. Use this skill when creating new *.node.ts files, defining INodeTypeDescription properties, implementing resource and operation parameters, building trigger nodes, organizing complex nodes into actions folders, or configuring the n8n section in package.json. Apply when choosing between declarative and programmatic styles, setting up node metadata, or structuring community node packages.
When to use this skill:
- When creating new n8n node files (*.node.ts)
- When defining INodeTypeDescription (displayName, name, icon, group, version)
- When setting up resource and operation parameters with noDataExpression: true
- When using displayOptions to conditionally show fields
- When adding action fields to operations for future compatibility
- When building trigger nodes (polling or webhook-based)
- When organizing complex nodes with actions/ folders by resource
- When defining userOperations and userFields arrays
- When configuring the "n8n" section in package.json (nodes, credentials paths)
- When setting subtitle templates for dynamic node labels
- When specifying inputs, outputs, and credential requirements
- When deciding between declarative style (REST APIs) and programmatic style (triggers, GraphQL)
Nodes Node Structure
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle nodes node structure.
Instructions
For details, refer to the information provided in this file: nodes node structure