nodes-credentials-patterns

dpietersz 的头像作者 dpietersz

实现n8n凭据类型,包括API密钥、OAuth2和基于头的身份验证模式。在创建*.credentials.ts文件、实现ICredentialType接口、配置OAuth2流、设置凭据测试、注入身份验证头或遵循凭据安全最佳实践时使用此技能。在构建任何需要API身份验证、令牌管理或安全凭据处理的n8n节点时应用。

📖 中文导读:实现n8n凭据类型,包括API密钥、OAuth2和基于头的身份验证模式。在创建*.credentials.ts文件、实现ICredentialType接口、配置OAuth2流、设置凭据测试、注入身份验证头或遵循凭据安全最佳实践时使用此技能。在构建任何需要API身份验证、令牌管理或安全凭据处理的n8n节点时应用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: Nodes Credentials Patterns description: Implement n8n credential types including API key, OAuth2, and header-based authentication patterns. Use this skill when creating *.credentials.ts files, implementing ICredentialType interfaces, configuring OAuth2 flows, setting up credential testing, injecting authentication headers, or following credential security best practices. Apply when building any n8n node that requires API authentication, token management, or secure credential handling.

When to use this skill:

  • When creating new credential files (*.credentials.ts)
  • When implementing ICredentialType interfaces
  • When setting up API key authentication
  • When configuring OAuth2 credential flows
  • When implementing header-based authentication with the authenticate property
  • When adding credential testing with ICredentialTestRequest
  • When using getCredentials() in node execute methods
  • When handling production vs sandbox environments
  • When implementing token refresh logic for OAuth2
  • When following security best practices (never log credentials, use password typeOptions)
  • When declaring credentials in node description
  • When testing credential validation in n8n UI

Nodes Credentials 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 credentials patterns.

Instructions

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