.claude/skills/n8n-workflow/SKILL.md
Generate and manage n8n workflows for AI agents. Creates automation workflows that complement Mastra agents.
npx skillsauth add lucidlabs-hq/agent-kit n8n-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generiere n8n Workflows passend zu deinen Mastra Agents.
┌─────────────────────────────────────────────────────────────────────┐
│ AGENT + WORKFLOW ARCHITECTURE │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ MASTRA AGENT N8N WORKFLOW │
│ ──────────── ──────────── │
│ • AI Reasoning • Scheduled Triggers │
│ • Tool Execution • Webhook Endpoints │
│ • Context Management • Data Transformations │
│ • Decision Making • External Integrations │
│ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ │ triggers │ │ │
│ │ Agent │◄──────────────►│ Workflow │ │
│ │ │ calls │ │ │
│ └─────────────┘ └─────────────┘ │
│ │
│ WHEN TO USE WHAT: │
│ • Agent: Complex reasoning, multi-step decisions │
│ • Workflow: Scheduled tasks, webhooks, integrations │
│ • Both: Agent decides → Workflow executes │
│ │
└─────────────────────────────────────────────────────────────────────┘
n8n hat native MCP-Unterstützung via MCP Server Trigger Node:
# In n8n: MCP Server Trigger Node hinzufügen
# Workflow als Tool für Claude/Agents exponieren
Vorteile:
# Community MCP Server für n8n Workflows
claude mcp add n8n-server -- npx @anthropic-ai/mcp-server-n8n
Oder mit dem populären czlonkowski/n8n-mcp:
{
"mcpServers": {
"n8n": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-n8n"],
"env": {
"N8N_HOST": "https://n8n.example.com",
"N8N_API_KEY": "your-api-key"
}
}
}
}
/n8n-workflow create [agent-name]Generiere n8n Workflow Template für einen Mastra Agent.
Workflow:
n8n/workflows/Output:
{
"name": "Customer Support Agent Triggers",
"nodes": [
{
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [240, 300],
"parameters": {
"httpMethod": "POST",
"path": "agent-trigger"
}
},
{
"name": "Process Request",
"type": "n8n-nodes-base.code",
"position": [460, 300],
"parameters": {
"jsCode": "// Process and route to agent"
}
}
]
}
/n8n-workflow listListe alle Workflows in n8n/workflows/.
/n8n-workflow syncSynchronisiere Workflows mit n8n Instance.
Workflow startet Agent-Ausführung.
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Schedule │ ─► │ Prepare │ ─► │ Call │ ─► │ Process │
│ Trigger │ │ Context │ │ Mastra │ │ Result │
└──────────┘ └──────────┘ │ Agent │ └──────────┘
└──────────┘
Use Cases:
Agent delegiert Aufgabe an Workflow.
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Mastra │ ─► │ n8n │ ─► │ External │
│ Agent │ │ Workflow │ │ Systems │
└──────────┘ └──────────┘ └──────────┘
Use Cases:
End-to-end Request Processing.
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Webhook │ ─► │ Mastra │ ─► │ n8n │ ─► │ Response │
│ Request │ │ Agent │ │ Actions │ │ Webhook │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
Use Cases:
{
"name": "Daily Report Agent",
"nodes": [
{
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": { "interval": [{ "field": "hours", "hoursInterval": 24 }] }
}
},
{
"name": "Fetch Data",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "={{$env.API_URL}}/metrics"
}
},
{
"name": "Call Agent",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "={{$env.MASTRA_URL}}/agents/report-generator/run",
"body": "={{ JSON.stringify($json) }}"
}
},
{
"name": "Send Report",
"type": "n8n-nodes-base.slack",
"parameters": {
"channel": "#reports",
"text": "={{ $json.report }}"
}
}
]
}
{
"name": "Agent Router",
"nodes": [
{
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"parameters": {
"httpMethod": "POST",
"path": "agent-router"
}
},
{
"name": "Route Decision",
"type": "n8n-nodes-base.switch",
"parameters": {
"rules": {
"rules": [
{ "value": "support", "output": 0 },
{ "value": "sales", "output": 1 }
]
}
}
},
{
"name": "Support Agent",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "={{$env.MASTRA_URL}}/agents/support/run"
}
},
{
"name": "Sales Agent",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "={{$env.MASTRA_URL}}/agents/sales/run"
}
}
]
}
n8n/
├── workflows/
│ ├── templates/ # Wiederverwendbare Templates
│ │ ├── daily-report.json
│ │ ├── webhook-router.json
│ │ └── notification.json
│ │
│ └── agents/ # Agent-spezifische Workflows
│ ├── support-agent.json
│ └── sales-agent.json
│
└── README.md
❌ Agent macht HTTP Calls direkt
✅ Agent entscheidet → Workflow führt aus
❌ Workflow verändert State ohne Check
✅ Workflow prüft vor Aktion
{
"name": "Error Handler",
"type": "n8n-nodes-base.errorTrigger"
}
❌ API Keys in Workflow JSON
✅ n8n Credentials verwenden
# n8n Instance
N8N_HOST=https://n8n.example.com
N8N_API_KEY=your-api-key
# Mastra (für Callbacks)
MASTRA_URL=https://app.example.com/api/mastra
development
Deploy invoice-accounting-assistant to HQ server. Runs tests first (TDD), then builds and deploys. Use when ready to push changes to staging/production.
testing
Visual UI verification with agent-browser. Use after implementing UI components to take screenshots, verify interactions, and self-check your work. FASTER than E2E tests.
documentation
Update README with current project status and features. Use after completing features.
tools
--- name: time-report description: Cross-project time report. Aggregates all session data from ~/.claude-time/sessions/. Use to see how much time was spent across all projects. disable-model-invocation: true allowed-tools: Bash, Read argument-hint: [all | this-week | this-month | last-month | {project-name}] --- # Time Report: Cross-Project Session Overview ## Objective Read ALL session files from `~/.claude-time/sessions/*.json` and produce an aggregated time report. Supports filtering by pe