nodes-declarative-patterns

majiayu000 的头像作者 majiayu000

使用声明式风格和基于 JSON 的路由配置构建 n8n 节点,以进行 REST API 集成。在实现标准 CRUD 操作、配置 requestDefaults、在操作选项中定义路由、设置声明性分页、通过routing.send 添加查询参数或使用 postReceive 处理响应时,请使用此技能。在构建具有简单请求/响应模式和自动分页处理的 REST API 节点时应用。

📖 中文导读:使用声明式风格和基于 JSON 的路由配置构建 n8n 节点,以进行 REST API 集成。在实现标准 CRUD 操作、配置 requestDefaults、在操作选项中定义路由、设置声明性分页、通过routing.send 添加查询参数或使用 postReceive 处理响应时,请使用此技能。在构建具有简单请求/响应模式和自动分页处理的 REST API 节点时应用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: Nodes Declarative Patterns description: Build n8n nodes using declarative style with JSON-based routing configuration for REST API integrations. Use this skill when implementing standard CRUD operations, configuring requestDefaults, defining routing in operation options, setting up declarative pagination, adding query parameters via routing.send, or processing responses with postReceive. Apply when building REST API nodes with simple request/response patterns and automatic pagination handling.

When to use this skill:

  • When building REST API integrations with standard CRUD operations
  • When configuring requestDefaults (baseURL, headers)
  • When defining routing configuration in operation options
  • When using routing.request for HTTP method and URL
  • When implementing routing.send for body or query parameters
  • When setting up declarative pagination (offset-based)
  • When using displayOptions to show/hide fields based on resource/operation
  • When processing responses with output.postReceive
  • When extracting data from nested response properties (rootProperty)
  • When adding filters as collection type properties with routing
  • When deciding whether to use declarative vs programmatic style
  • When working with *.node.ts files that use routing patterns

Nodes Declarative Patterns

This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle nodes declarative patterns.

Instructions

For details, refer to the information provided in this file: nodes declarative patterns