Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

n8n-subworkflows

Skill by czlonkowski

Teaches an AI assistant how to build reusable n8n sub-workflows with typed inputs, clear return contracts, and correct all-vs-each execution. Aimed at people building n8n automations who want shared, modular logic.

  • Score 94
  • 23k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install n8n-subworkflows

Built from the published package, never by AI.

git clone --depth 1 https://github.com/czlonkowski/n8n-mcp /tmp/n8n-mcp && mkdir -p ~/.claude/skills && cp -r /tmp/n8n-mcp/data/skills/n8n-subworkflows ~/.claude/skills/n8n-subworkflows

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install n8n-subworkflows in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This agent skill is a guide for building reusable sub-workflows in n8n. It explains that a sub-workflow works like a function: an Execute Workflow Trigger declares typed inputs, the body does the work, and the last node returns the output. It covers when to extract logic into a sub-workflow, how to search for existing ones before building new ones, and how to use the Define Below input mode with typed fields.

The skill also covers stateless versus stateful design, the contract rules for inputs and outputs, and the mode settings (all versus each) and waitForSubWorkflow on the Execute Workflow node. It recommends verb-first naming so workflows can be found later. It is written for n8n builders who want modular workflows, and it refers to other skills and files for related patterns.

Written from the project's SKILL.md and checked against it.

What it can do

  • Decide when to extractGuides whether logic should become a sub-workflow based on reuse, size and coupling.
  • Define typed inputsSets up the Execute Workflow Trigger with Define Below typed fields such as string, number, boolean, array and object.
  • Choose all or each modeExplains when an Execute Workflow call should run once with all items or once per item.
  • Design return contractsDescribes returning consistent output shapes and returning errors for expected failures.
  • Name for discoveryRecommends verb-first workflow names so they can be found by search before rebuilding.
  • Split by input shapeDescribes separating sub-workflows whose input paths have genuinely different contracts.

What you need

  • n8n with Execute Workflow nodes
  • n8n MCP access token for testing pinned sub-workflows

Try asking

  • Extract this date parsing logic into a reusable n8n sub-workflow
  • Check whether a sub-workflow already exists before I build this step
  • Should I run this Execute Workflow node in all mode or each mode?

Good to know

  • Define Below requires at least one input field, so no-argument operations need passthrough
  • Typed input fields are JSON only, so binary data needs passthrough
  • The community MCP cannot filter workflows by tag

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: data/skills/n8n-subworkflows/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • NAMING_AND_DISCOVERY.md6 KB
  • README.md8 KB
  • SKILL.md20 KB
  • SUBWORKFLOW_PATTERNS.md9 KB

Alternatives to n8n-subworkflows

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

n8n-subworkflows: common questions

When should I use an n8n sub-workflow?

Use one when logic could be needed in another workflow, such as auth, retry, parsing or formatting. The source advises against extracting a single HTTP call with no logic around it.

What is the difference between mode all and mode each in n8n?

With all, the sub-workflow runs once with all items. With each, it runs once per item, which suits bodies that assume a single item.

Why should sub-workflow inputs use Define Below?

Define Below gives callers a typed schema, which lets an AI agent fill values through $fromAI and lets structured callers map fields cleanly.

How do I install n8n-subworkflows?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is n8n-subworkflows free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is n8n-subworkflows safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to n8n-subworkflows?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

n8n-subworkflows Install

Add to stack

Loading.