conventions

Provides quick-reference coding conventions and patterns for the n8n monorepo codebase.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/Uguryldz/n8nclean --skill conventions-uguryldz
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: conventions
Source: https://github.com/Uguryldz/n8nclean/tree/main/.claude/plugins/n8n/skills/conventions
Command: npx skills add https://github.com/Uguryldz/n8nclean --skill conventions-uguryldz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Contributors to the n8n codebase need fast access to critical coding standards without reading the full AGENTS.md documentation, reducing style violations and review cycles. ## Core Features & Use Cases - Critical Rules Summary: Covers TypeScript strictness (no any, prefer satisfies), error handling with UnexpectedError, and Zod validation. - Frontend & Backend Patterns: Vue 3 Composition API, CSS variables, i18n usage, Controller-Service-Repository layering, and dependency injection via @n8n/di. - Use Case: When writing a new backend service in packages/cli, quickly recall the correct DI pattern, testing commands (pnpm typecheck, pnpm lint), and Pinia store conventions before committing. ## Quick Start Ask for the n8n coding conventions to review the required patterns before writing or modifying code in the n8n repository.

Frequently Asked Questions about conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the n8n TypeScript coding conventions?▼

n8n conventions forbid `any` in favor of `unknown`, prefer `satisfies` over `as` except in tests, and place shared types in the `@n8n/api-types` package. Run `pnpm typecheck` and `pnpm lint` before committing.

How do I handle errors in n8n backend code?▼

Throw `UnexpectedError` from the `n8n-workflow` package with a message and an `extra` context object. Do not use the deprecated `ApplicationError` class.

What frontend framework does n8n use?▼

The n8n editor UI uses Vue 3 with the Composition API and `<script setup lang="ts">`. All text must go through i18n (`$t('key')`), styling uses CSS variables instead of hardcoded pixels, and E2E tests rely on single-value `data-testid` attributes.

How is dependency injection done in n8n backend services?▼

Backend services use the `@n8n/di` package with the `@Service()` decorator, injecting dependencies like `@n8n/config` through the constructor. The architecture follows a Controller to Service to Repository layering.

Which databases does n8n support for its application data?▼

The n8n application database supports SQLite and PostgreSQL only. An exception exists for database nodes such as the MySQL node, which may use database-specific features.