debug-workflow

debug-workflow is a skill for Claude Code, Codex from masteranime/n8n-claude-skills. It costs 145 tokens per session (1,819 once invoked), scanned A, original, MIT.

A troubleshooting guide for failed n8n workflows. n8n is a tool for connecting services and automating tasks with visual workflow steps called nodes.

In plain words
What is it for?
Use it to investigate broken n8n expressions, node connections, pinned data, sub-workflows, credentials, rate limits, and workflows that finish without producing the expected result.
Why use it?
It helps distinguish expression mistakes, wrong data types, authentication failures, rate limits, and other causes instead of treating every failure the same way.

Skill for Claude CodeCodex

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

Good fit Use it to investigate broken n8n expressions, node connections, pinned data, sub-workflows, credentials, rate limits, and workflows that finish without producing the expected result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/masteranime/n8n-claude-skills/debug-workflow
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 masteranime/n8n-claude-skills --skill debug-workflow
Clone the repo
git clone --depth 1 https://github.com/masteranime/n8n-claude-skills

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 debug-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/masteranime/n8n-claude-skills/debug-workflow.svg)](https://agentmods.dev/skills/masteranime/n8n-claude-skills/debug-workflow)
Your own site
<a href="https://agentmods.dev/skills/masteranime/n8n-claude-skills/debug-workflow"><img src="https://agentmods.dev/badge/skills/masteranime/n8n-claude-skills/debug-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,819 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.00145 $0.01819
Opus 5 $0.00072 $0.00910
Sonnet 5 $0.00029 $0.00364
Haiku 4.5 $0.00015 $0.00182

Measured 8d ago against content hash c4370fec5e20, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

debug-workflow 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 8d 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/debug-workflow/SKILL.md · 138 lines

How it starts

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

n8n Workflow Debugging

Fix n8n workflows the way a senior engineer does — systematically, not by guessing.

Triage: identify the failure class first

Ask the user (or infer from error text) which class:

Class Symptom Common root causes
Expression error Cannot read property X of undefined, red node badge Wrong expression syntax, missing = prefix, accessing undefined fields
Type mismatch Expected string, got array, downstream weirdness Item Lists vs single item confusion, Split In Batches output shape
Silent empty Workflow runs green but no output/side effect Filter condition wrong, pinned stale data, credential scope
Auth failure 401, 403, Invalid API key Wrong credential selected, expired token, OAuth refresh not configured
Rate limit Intermittent 429, works manually, fails in batch No backoff, batch too large, shared credential across workflows
Sub-workflow Execute Workflow returns nothing or errors Parameters not passed, return value not set, wrong workflow ID

Expression errors

The single biggest footgun: ={{ $json.field }} vs {{ $json.field }}. The leading = makes the field an expression. Without it, the literal string {{ $json.field }} is sent.

Check:

  1. Click the field — does it show the "expression" toggle (fx icon) highlighted? If not, it's literal mode.
  2. In code-view JSON, the value should start with =: "value": "={{ $json.id }}"

Accessing undefined paths: $json.customer.email throws if customer is null. Use optional chaining: $json.customer?.email ?? 'unknown'.

Referencing earlier nodes: Use $('Node Name').item.json.field, NOT $node['Node Name'].json.field (deprecated). Quote exact node name including spaces.

Common expression patterns:

// Array access
{{ $json.items[0].name }}
{{ $json.items?.[0]?.name ?? 'empty' }}

// Previous node output
{{ $('Webhook').item.json.body.email }}

// All items from previous node (for loops)
{{ $('Split In Batches').all().map(i => i.json.id) }}

// Conditional
{{ $json.amount > 100 ? 'high' : 'low' }}

// Date formatting (n8n uses Luxon)
{{ $now.toISO() }}
{{ $now.minus({ days: 7 }).toFormat('yyyy-MM-dd') }}

// Environment vars (self-hosted)
{{ $env.MY_SECRET }}

Read the full file on GitHub · 138 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. 8d ago First seen · 138 lines · 145 tokens per session scan A c4370fec5e20

Subscribe to this mod's changes

debug-workflow is a skill published in the GitHub repository masteranime/n8n-claude-skills (31 stars, last pushed 4mo ago), licensed MIT. It adds 145 tokens to every session and 1,819 once invoked, about $0.0007 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-30.