Skip to content

abbibo/N8N-Workflow-Builder-Agent-skills-N8N

n8n-agent-skill-system

Verified

Primary engineering skill for designing, generating, validating, and delivering complete, importable, production-ready n8n workflows using Antigravity and Agentic IDEs. Implements 131 automated validation rules, comprehensive node catalogs, Luxon DateTime verification, AI agent architectures, and modular subworkflows.

references/expression-syntax-guide.md

View on GitHub
# N8N Expression Syntax & Luxon DateTime Reference Guide

Expressions in n8n allow dynamic parameter assignment using JavaScript template expressions wrapped in `{{ ... }}`.

## 1. Syntax Fundamentals

* **Wrap all expressions in double curly braces**: `{{ $json.fieldName }}`
* **Do NOT use string interpolation syntax like `${var}`** inside expression strings.
* **Accessing current node data**:
  * `$json.propertyName`: Access field from current item
  * `$json["property with space"]`: Use bracket notation for special keys
  * `$binary.data.fileName`: Access binary metadata
* **Accessing other nodes**:
  * `$('Node Name').item.json.fieldName`: Access item from specific node with matching index
  * `$('Node Name').first().json.fieldName`: Access first item from specific node
  * `$('Node Name').all()`: Access all items as array (e.g. in Code node)

## 2. Luxon DateTime vs Moment.js (Critical Rules)

n8n uses **Luxon** (`DateTime`), NOT Moment.js. Using Moment.js methods will fail at runtime.

| Concept | Correct (Luxon) | WRONG (Moment.js Trap) | Rule |
| :--- | :--- | :--- | :--- |
| **Formatting** | `{{ $now.toFormat('yyyy-MM-dd') }}` | `{{ $now.format('YYYY-MM-DD') }}` | Rule 93, 125 |
| **Date Tokens** | Lowercase `yyyy`, `dd`, `HH`, `mm` | Uppercase `YYYY`, `DD` (ISO year/day trap) | Rule 125 |
| **Date Addition** | `{{ $now.plus({ days: 7, hours: 2 }) }}` | `{{ $now.add(7, 'days') }}` | Rule 112, 122 |
| **Date Subtraction** | `{{ $now.minus({ months: 1 }) }}` | `{{ $now.subtract(1, 'months') }}` | Rule 112, 122 |
| **ISO String** | `{{ $now.toISO() }}` | `{{ $now.toISOString() }}` | Rule 92 |
| **Timezone** | `{{ $now.setZone('America/New_York') }}` | `{{ $now.tz('America/New_York') }}` | Luxon API |

### Common Date Patterns
```javascript
// Current timestamp in ISO format
{{ $now.toISO() }}

// Current date formatted as YYYY-MM-DD
{{ $now.toFormat('yyyy-MM-dd') }}

// Start of current day (midnight)
{{ $today.startOf('day').toISO() }}

// 7 days ago
{{ $now.minus({ days: 7 }).toISO() }}

// Format a date string from incoming JSON
{{ DateTime.fromISO($json.createdAt).toFormat('dd/MM/yyyy HH:mm') }}
```

## 3. Data Transformation & JMESPath

* **Ternary Operator**: `{{ $json.status === 'active' ? 'ENABLED' : 'DISABLED' }}`
* **Default Values**: `{{ $json.userEmail ?? 'noreply@example.com' }}`
* **Array Mapping**: `{{ $json.items.map(i => i.id).join(',') }}`
* **JMESPath queries**: `{{ $jmespath($json, 'people[?age > `20`].name') }}`

## 4. Trigger Node Caveats

> [!WARNING]
> Trigger nodes (Schedule, Webhook, Chat Trigger) have no upstream input at execution start.
> Never write expressions referencing `$json` inside trigger node parameters (Rule 107).
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall