Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

n8n-subworkflows-official

БесплатноБез исполняемых скриптовНе проверен

Use when building anything multi-step, anything that looks repeatable, anything the user mentions reusing, or any workflow with more than ~10 nodes. Triggers…

n8n-ioот n8n-io★ 644 звезды на GitHub

Об этом скилле

n8n Sub-workflows

Sub-workflows are reusable functions. The Execute Workflow Trigger declares input parameters, the body does work, the last node returns output. Callers invoke it like any other node.

That framing opens up the function-shaped wins: encapsulation, reuse, testability, replaceability. It's the primary reuse mechanism in n8n, and unfortunately underused.

Without sub-workflows, the same logic gets duplicated across workflows. Bug fixes happen in multiple places, one gets missed, and "identical" copies drift.

Non-negotiables

  1. Search before you build. Before writing logic that handles a generic problem, check if a sub-workflow already exists. Filter by tag (search_workflows({ tags: ['subworkflow'] }), a domain tag) and/or keyword (query: '<keyword>'). Tags are the discovery mechanism (n8n 2.27.0+).
  2. Execute Workflow Trigger uses "Define Below" with typed fields, not passthrough. Define Below is the only mode that lets agent tools (fromAi) and structured callers pass values in. Two exceptions: (a) the sub-workflow specifically needs to receive binary (then it can't be wired as an agent tool directly), or (b) the sub-workflow takes no inputs at all (Define Below requires at least one field). See "Sub-workflow inputs and outputs" below.

Strong defaults

  • Anything reusable becomes a sub-workflow. If a logical chunk could plausibly be needed elsewhere, extract it. Exception: trivial wrappers (one HTTP call, no logic) and tightly-coupled-to-this-caller chunks.
  • Default to stateless for pure logic (input → output, no external state). For state-touching logic, build deliberately stateful sub-workflows that abstract the operation behind a clean contract (the ORM / repository pattern). What to avoid is accidental state: a "validate" sub-workflow that quietly writes to a log table.
  • Tag for discovery: every sub-workflow gets subworkflow, a domain tag (customer), and/or tool. Tags are what search_workflows({ tags }) filters on; names stay plain and descriptive (Parse RFC2822 date). See references/NAMING_AND_DISCOVERY.md.
  • Description carries keywords. Input/output shape + representative terms, so varied queries surface it.
  • Split when input contracts genuinely differ (binary vs JSON, sync vs async, divergent auth schemes). Don't fit divergent contracts under one trigger via passthrough + internal branching. See references/SUBWORKFLOW_PATTERNS.md "Splitting by input shape".

Decision tree: should this be a sub-workflow?

About to write a chunk of logic?
├── Could this plausibly be needed in another workflow?
│   ├── Yes → extract to sub-workflow
│   └── No → keep inline
│
├── Is this chunk >5 nodes and conceptually one thing?
│   └── Extract if you want testability, isolation, or reuse; if it's only for a cleaner canvas, group it inline instead (see below).
│
├── Is this chunk dealing with a generic concern (auth, retry, parsing, formatting)?
│   └── Almost certainly extract. These are the canonical reusable sub-workflows.
│
└── Is this chunk doing one HTTP call with no logic around it?
    └── Don't extract. Extra workflow boundary for nothing.

When the only motivation is a cleaner canvas (not reuse, isolation, testability, or an agent tool), a canvas node group is the tool for readability-only sectioning: faster (no sub-execution per call) and simpler (no input/output contract), with the logic staying inline. Group it where the section is connected, trigger-free, and faces outward at no more than one member in each direction (n8n-workflow-lifecycle-official references/NODE_GROUPS.md); split a too-branchy section into smaller valid slices rather than leaving the whole stage ungrouped (a sticky note annotates, it doesn't group). Extract to a sub-workflow only when you genuinely need reuse, isolation, independent testing, or an agent tool. See n8n-workflow-lifecycle-official Readability.

Stateless vs. stateful sub-workflows

Both are first-class. The choice is about intent and encapsulation.

Stateless

Takes input, returns output. No I/O outside the inputs/outputs. Default for pure logic.

Examples:

  • Parse RFC2822 date (tag subworkflow). Input: date string. Output: ISO date or error.
  • Compute MRR from subscription (tag subworkflow). Input: subscription object. Output: MRR number.
  • Format invoice as HTML (tag subworkflow). Input: invoice data. Output: HTML string.

When you need the logic again, call it without worrying about side effects firing.

Stateful (deliberate)

Reads or writes external state behind a clean input/output contract. Comparable to a repository pattern: the sub-workflow abstracts the state operation so callers think in domain terms, not implementation.

Examples:

  • Get customer by id (tag customer). Input: id. Output: customer object or { ok: false, error: 'not_found' }. Reads the DB.
  • Write customer billing record (tags customer, billing). Input: rec
Полный SKILL.md на GitHub

Установить n8n-subworkflows-official в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/NAMING_AND_DISCOVERY.mdreferences/SUBWORKFLOW_PATTERNS.md

FAQ

Что делает скилл n8n-subworkflows-official?

Use when building anything multi-step, anything that looks repeatable, anything the user mentions reusing, or any workflow with more than ~10 nodes. Triggers on "reuse", "I do this in another workflow", "extract", "modular", "shared logic", "subworkflow", multi-step builds, or any task that mentions logic the user has built before.

Как установить скилл n8n-subworkflows-official?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл n8n-subworkflows-official запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить n8n-subworkflows-official с