43 skills · 279 min
Skills
Skill 3 of 43
Create new ESLint rules for the @n8n/eslint-plugin-community-nodes package.
1 minute · 239 words · 10 sections
Install
npx skills add n8n-io/n8n --skill n8n:create-community-node-lint-rulenpx skills add n8n-io/n8n/plugin marketplace add n8n-io/n8nThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Guide for adding new ESLint rules to packages/@n8n/eslint-plugin-community-nodes/.
All paths below are relative to packages/@n8n/eslint-plugin-community-nodes/.
Before writing code, clarify:
.node.ts files, credential classes, both)error (must fix) or warn (should fix)?recommended configs, or exclude from recommendedWithoutN8nCloudSupport?Create src/rules/<rule-name>.ts:
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import {
isNodeTypeClass, // or isCredentialTypeClass
findClassProperty,
findObjectProperty,
createRule,
} from '../utils/index.js';
Naming: Export as PascalCaseRule (e.g. MissingPairedItemRule). The name field is kebab-case.
Available AST helpers — see reference.md (opens in a new tab) for the full catalog of ast-utils and file-utils exports.
Create src/rules/<rule-name>.test.ts:
import { RuleTester } from '@typescript-eslint/rule-tester';
import { YourRuleNameRule } from './rule-name.js';
const ruleTester = new RuleTester();
// Helper to generate test code — keeps test cases readable
function createNodeCode(
Test guidelines:
vi.mock('../utils/file-utils.js')errors: [{ messageId, suggestions: [...] }]src/rules/index.tsimport { YourRuleNameRule } from './rule-name.js';
// Add to the rules object:
export const rules = {
// ... existing rules
'rule-name': YourRuleNameRule,
} satisfies Record<string, AnyRuleModule>;src/plugin.ts configsAdd to both config objects (unless the rule depends on n8n cloud features):
'@n8n/community-nodes/rule-name': 'error', // or 'warn'error for rules that catch bugs or required patternswarn for style/convention rules (like options-sorted-alphabetically)no-restricted-globals or no-restricted-imports patterns,
only add to recommended (not recommendedWithoutN8nCloudSupport)Create docs/rules/<rule-name>.md:
# Description of what the rule does (`@n8n/community-nodes/rule-name`)
<!-- end auto-generated rule header -->
## Rule Details
Explain why this rule exists and what problem it prevents.
## Examples
### Incorrect
\`\`\`typescript
// code that triggers the rule
\`\`\`
### Correct
\`\`\`typescript
// code that passes the rule
\`\`\`The header above <!-- end auto-generated rule header --> will be regenerated by pnpm build:docs. Write a reasonable first version — it gets overwritten.
Run from packages/@n8n/eslint-plugin-community-nodes/:
pushd packages/@n8n/eslint-plugin-community-nodes
pnpm test <rule-name>.test.ts # tests pass
pnpm typecheck # types are clean
pnpm build # compiles
pnpm build:docs # regenerates doc headers and README table
pnpm lint:docs # docs match schema
popdsrc/rules/<rule-name>.tssrc/rules/<rule-name>.test.tssrc/rules/index.tssrc/plugin.tsdocs/rules/<rule-name>.mdpnpm build:docsCreate new ESLint rules for the @n8n/eslint-plugin-community-nodes package. Use when adding a lint rule, creating a community node lint, or working on eslint-plugin-community-nodes. Guides rule implementation, tests, docs, and plugin registration.
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
master, last pushed 24 September 2026.SKILL.md, not by matching a directory convention. 5 distinct layouts observed: .agents/skills/*/SKILL.md, .claude/plugins/n8n/skills/*/SKILL.md, .opencode/skills/*/SKILL.md, packages/@n8n/cli/skills/*/SKILL.md, packages/@n8n/instance-ai/skills/*/SKILL.md.h1 and no skipped levels:.claude/plugins/n8n/.claude-plugin/marketplace.json by n8n, declaring 1 plugin. It is read for editorial metadata only — never as the skill index, which is always the repository tree./n8n-io/n8n.md, and each skill at its own .md URL.1 file · 4 KB
Everything this skill ships beside its prose. All of it is set here, as a subchapter of skill 3.
Everything else published alongside the skill.