abbibo/N8N-Workflow-Builder-Agent-skills-N8N
n8n-agent-skill-system
VerifiedPrimary 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.0 KB |
| references/code-node-recipes.md | markdown | 2.6 KB |
| references/expression-syntax-guide.md | markdown | 2.6 KB |
| references/node-catalog.json | config | 95.9 KB |
| references/node-catalog.md | markdown | 5.1 KB |
| references/validation-rules-131.json | config | 15.9 KB |
| references/validation-rules-131.md | markdown | 13.1 KB |
| scripts/inspect_workflow.py | script | 1.0 KB |
| scripts/scaffold_workflow.py | script | 1.9 KB |
| scripts/validate_workflow.py | script | 21.7 KB |
| templates/ai-agent-rag-tools.json | config | 3.1 KB |
| templates/claudecode-bug-fixer.json | config | 3.6 KB |
| templates/error-trigger-handler.json | config | 2.6 KB |
| templates/paginated-api-ingestion.json | config | 3.7 KB |
| templates/scheduled-db-sync.json | config | 4.4 KB |
| templates/subworkflow-modular-child.json | config | 1.5 KB |
| templates/subworkflow-modular-parent.json | config | 2.5 KB |
| templates/webhook-crm-pipeline.json | config | 5.5 KB |
references/code-node-recipes.md
View on GitHub# N8N Code Node Engineering Recipes (JavaScript & Python)
## 1. JavaScript Code Node Patterns
n8n Code nodes run in two modes:
1. **Run Once for All Items** (`mode: "runOnceForAllItems"`): Receives `$input.all()`, must return array of items: `return [{ json: { ... } }]`.
2. **Run Once for Each Item** (`mode: "runOnceForEachItem"`): Receives `$input.item`, must return single item or object: `return { json: { ... } }` or `return $input.item`.
### Recipe JS-1: Aggregating Items
```javascript
// Mode: Run Once for All Items
const items = $input.all();
const totalRevenue = items.reduce((acc, item) => acc + (item.json.price || 0), 0);
const allIds = items.map(item => item.json.id);
return [{
json: {
count: items.length,
totalRevenue,
ids: allIds,
processedAt: new Date().toISOString()
}
}];
```
### Recipe JS-2: Exploding / Splitting Nested Arrays
```javascript
// Mode: Run Once for All Items
const items = $input.all();
const output = [];
for (const item of items) {
const lineItems = item.json.line_items || [];
for (const line of lineItems) {
output.push({
json: {
orderId: item.json.id,
customer: item.json.customer_name,
sku: line.sku,
quantity: line.quantity,
price: line.price
}
});
}
}
return output;
```
### Recipe JS-3: Safe JSON Parsing
```javascript
// Mode: Run Once for Each Item
let parsed = {};
try {
parsed = typeof $json.raw_payload === 'string'
? JSON.parse($json.raw_payload)
: ($json.raw_payload || {});
} catch (err) {
parsed = { error: 'INVALID_JSON', raw: $json.raw_payload };
}
return {
json: {
...$json,
payload: parsed
}
};
```
## 2. Python Code Node Patterns
In Python mode, n8n executes within a WebAssembly Pyodide sandbox.
- Standard libraries available: `json`, `re`, `datetime`, `math`, `urllib.parse`, `hashlib`, `base64`.
- **No external pip packages** can be installed at runtime.
- Use `_input.all()` to access all items.
- Return must be a list of dictionaries with a `'json'` key.
### Recipe PY-1: Text Normalization and Regex Extraction
```python
# Mode: Run Once for All Items
import re
from datetime import datetime
items = _input.all()
output = []
email_pattern = re.compile(r'[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+')
for item in items:
data = item.get('json', {})
text = data.get('raw_text', '')
emails = email_pattern.findall(text)
output.append({
'json': {
'original_id': data.get('id'),
'found_emails': emails,
'email_count': len(emails),
'processed_at': datetime.utcnow().isoformat()
}
})
return output
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |