n8n-patterns

n8n-patterns is a skill for Claude Code, Codex from anatolykoptev/n8n-mcp-agent. It costs 34 tokens per session (2,199 once invoked), scanned A, original, MIT.

A collection of reusable design patterns for n8n workflows, which automate steps between services. The patterns cover routing, parallel work, batching, error handling, data processing, and integrations.

In plain words
What is it for?
Use it to design conditional or multi-way branches, process data in batches, run independent tasks in parallel, merge results, and handle workflow errors.
Why use it?
It provides established workflow structures for common situations, reducing the need to invent the control flow each time.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design conditional or multi-way branches, process data in batches, run independent tasks in parallel, merge results, and handle workflow errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anatolykoptev/n8n-mcp-agent/n8n-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add anatolykoptev/n8n-mcp-agent --skill n8n-patterns
Clone the repo
git clone --depth 1 https://github.com/anatolykoptev/n8n-mcp-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for n8n-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/anatolykoptev/n8n-mcp-agent/n8n-patterns/github.svg)](https://agentmods.dev/skills/anatolykoptev/n8n-mcp-agent/n8n-patterns)
Your own site
<a href="https://agentmods.dev/skills/anatolykoptev/n8n-mcp-agent/n8n-patterns"><img src="https://agentmods.dev/badge/skills/anatolykoptev/n8n-mcp-agent/n8n-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for n8n-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/anatolykoptev/n8n-mcp-agent/n8n-patterns"><img src="https://agentmods.dev/badge/skills/anatolykoptev/n8n-mcp-agent/n8n-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,199 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.02199
Opus 5 $0.00017 $0.01099
Sonnet 5 $0.00007 $0.00440
Haiku 4.5 $0.00003 $0.00220

Measured 11d ago against content hash 6f5851ebdb07, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

n8n-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/n8n-patterns/SKILL.md · 398 lines

How it starts

The opening of the file, as written. The whole thing — 398 lines — stays where its author put it; the contents beside it link to each section on GitHub.

n8n Patterns Skill

This skill provides reusable patterns for common n8n workflow scenarios.

Flow Control Patterns

1. Conditional Branching (IF Node)

Trigger → IF (condition) → True Path
                       ↘ → False Path

Use for:

  • Route based on data values
  • Filter valid/invalid items
  • A/B testing logic

2. Multi-Way Branching (Switch Node)

Trigger → Switch (status) → "pending" → Process Pending
                        → "active"  → Process Active
                        → "closed"  → Process Closed
                        → default   → Handle Unknown

Use for:

  • Multiple condition routing
  • Status-based processing
  • Type-based handlers

3. Parallel Processing

Trigger → Branch A ↘
       → Branch B  → Merge → Continue
       → Branch C ↗

Use for:

  • Independent API calls
  • Multi-system updates
  • Parallel data fetching

Data Processing Patterns

4. Batch Processing (Loop Over Items)

{
  "nodes": [
    {
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "parameters": {
        "batchSize": 10
      }
    }
  ]
}

Pattern:

Fetch All → Loop Over Items → Process Batch → Wait → Loop Back
                           ↘ Done → Continue

Use for:

  • API rate limit handling
  • Large dataset processing
  • Memory-efficient operations

5. Data Merging

{
  "nodes": [
    {
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "parameters": {
        "mode": "combine",
        "mergeByFields": {
          "values": [{"field1": "id", "field2": "id"}]
        }
      }
    }
  ]
}

Merge Modes:

Mode Description
Append Combine all items
Combine Match by fields
Choose Branch Pick one input
Multiplex Create all combinations

6. Data Transformation (Code Node)

// Transform array of items
return $input.all().map(item => ({
  json: {
    id: item.json.id,
    fullName: `${item.json.firstName} ${item.json.lastName}`,
    email: item.json.email.toLowerCase(),
    createdAt: new Date().toISOString()
  }
}));

Read the full file on GitHub · 398 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 398 lines · 34 tokens per session scan A 6f5851ebdb07

Subscribe to this mod's changes

n8n-patterns is a skill published in the GitHub repository anatolykoptev/n8n-mcp-agent (0 stars, last pushed 6mo ago), licensed MIT. It adds 34 tokens to every session and 2,199 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

n8n-code-tool

Write JavaScript or Python for the n8n Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode) — the AI-agent-callable tool, NOT the workflow Code node. Use when building a Code Tool attached to an AI Agent, writing code that an LLM will invoke, parsing the query input, returning a string result, defining an input schema…

czlonkowski/n8n-mcp · 221 tokens

n8n-expression-syntax

Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, mapping data between nodes, or referencing webhook data in workflows. Use this skill whenever configuring node fields that reference data from…

czlonkowski/n8n-mcp · 104 tokens

n8n-node-configuration

Operation-aware node configuration guidance. Use when configuring nodes, understanding property dependencies, determining required fields, choosing between getnode detail levels, or learning common configuration patterns by node type. Always use this skill when setting up node parameters — it explains which fields are…

czlonkowski/n8n-mcp · 84 tokens

n8n-subworkflows

Build reusable, composable n8n sub-workflows. Use when extracting shared logic, building anything multi-step or reused across workflows, or any workflow over 10 nodes — and whenever the user mentions sub-workflows, Execute Workflow, reuse, shared/common logic, modular workflows, "Define Below" inputs…

czlonkowski/n8n-mcp · 121 tokens

n8n-workflow-patterns

Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, batch processing, or scheduled…

czlonkowski/n8n-mcp · 144 tokens

n8n-workflow-patterns

Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, batch processing, or scheduled…

czlonkowski/n8n-skills · 144 tokens