All skillsDisallow string literals in node description
Skillintermediate
Disallow string literals in node description `inputs`/`outputs` ā use `NodeConnectionTypes` enum instead (`@n8n/community-nodes/node-connection-type-l
š¼ This rule is enabled in the following configs: ā `recommended`, āļø `recommendedWithoutN8nCloudSupport`.
Claude Code Knowledge Pack7/10/2026
Overview
Disallow string literals in node description inputs/outputs ā use NodeConnectionTypes enum instead (@n8n/community-nodes/node-connection-type-literal)
š¼ This rule is enabled in the following configs: ā
recommended, āļø recommendedWithoutN8nCloudSupport.
š§ This rule is automatically fixable by the --fix CLI option.
Rule Details
Using raw string literals like 'main' in inputs and outputs is fragile: the values are not type-checked, and typos or renamed connection types will go undetected. The NodeConnectionTypes object from n8n-workflow is the single source of truth and should always be used instead.
Examples
ā Incorrect
description: INodeTypeDescription = {
displayName: 'My Node',
name: 'myNode',
inputs: ['main'],
outputs: ['main'],
properties: [],
};
}
ā Correct
description: INodeTypeDescription = {
displayName: 'My Node',
name: 'myNode',
inputs: [NodeConnectionTypes.Main],
outputs: [NodeConnectionTypes.Main],
properties: [],
};
}