n8n-errors-expressions

n8n-errors-expressions is a skill for Claude Code, Codex from Impertio-Studio/n8n-Claude-Skill-Package. It costs 119 tokens per session (2,762 once invoked), scanned A, original, MIT.

A troubleshooting guide for expressions in n8n workflows. Expressions are small formulas used to read and transform data while a workflow runs, and this guide explains which values are available in each context.

In plain words
What is it for?
Use it to diagnose references such as $json, $itemIndex, $secrets, and $response, and to choose valid alternatives or safer access patterns.
Why use it?
It helps fix errors caused by missing fields, null values, unavailable variables, wrong data types, and broken links between workflow items.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to diagnose references such as $json, $itemIndex, $secrets, and $response, and to choose valid alternatives or safer access patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/impertio-studio/n8n-claude-skill-package/n8n-errors-expressions
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 Impertio-Studio/n8n-Claude-Skill-Package --skill n8n-errors-expressions
Clone the repo
git clone --depth 1 https://github.com/Impertio-Studio/n8n-Claude-Skill-Package

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-errors-expressions

README.md
[![agentmods](https://agentmods.dev/badge/skills/impertio-studio/n8n-claude-skill-package/n8n-errors-expressions/github.svg)](https://agentmods.dev/skills/impertio-studio/n8n-claude-skill-package/n8n-errors-expressions)
Your own site
<a href="https://agentmods.dev/skills/impertio-studio/n8n-claude-skill-package/n8n-errors-expressions"><img src="https://agentmods.dev/badge/skills/impertio-studio/n8n-claude-skill-package/n8n-errors-expressions/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-errors-expressions

Your own site · 80×15
<a href="https://agentmods.dev/skills/impertio-studio/n8n-claude-skill-package/n8n-errors-expressions"><img src="https://agentmods.dev/badge/skills/impertio-studio/n8n-claude-skill-package/n8n-errors-expressions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 119 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,762 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.00119 $0.02762
Opus 5 $0.00060 $0.01381
Sonnet 5 $0.00024 $0.00552
Haiku 4.5 $0.00012 $0.00276

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

Security

Grade A, and why

n8n-errors-expressions 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/source/n8n-errors/n8n-errors-expressions/SKILL.md · 237 lines

How it starts

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

n8n Expression Error Diagnosis

Diagnose and fix expression evaluation failures in n8n v1.x workflows. For error type details see references/methods.md. For before/after fixes see references/examples.md. For anti-patterns see references/anti-patterns.md.


Quick Diagnostic Table

Symptom Cause Fix
undefined when accessing $json.field Field does not exist on current item Check field name spelling; use $json?.field or $ifEmpty($json.field, fallback)
TypeError: Cannot read properties of undefined Accessing nested field on null/undefined parent Chain optional access: $json.parent?.child?.value
$itemIndex is not defined in Code node $itemIndex is NOT available in Code node Use items.indexOf(item) or loop index variable instead
$secrets is not defined in Code node $secrets is NOT available in Code node Use $env.SECRET_NAME or pass secret via preceding Set node
$response is not defined $response used outside HTTP Request node ONLY use $response in HTTP Request node parameter fields
Paired item not found Item linking broken between nodes Use $("<Node>").first() or $("<Node>").all()[index] instead of .item
JMESPath returns unexpected result Parameter order swapped ALWAYS use $jmespath(object, searchString) — object first, search second
Expression returns empty string Field exists but value is null, "", or undefined Use $ifEmpty($json.field, "default") to provide fallback
$getWorkflowStaticData returns empty Static data not available during manual test ALWAYS test static data with active workflow (webhook/trigger), NEVER manual execution
TypeError: X is not a function Calling n8n extension method on wrong type Verify data type: .extractEmail() requires string, .average() requires array
$("<Node>").item returns wrong data Expression evaluated in non-matching context Use $("<Node>").itemMatching(index) in Code node; use .first() or .all() for explicit access
Python AttributeError on item access Using dot notation in Python Code node ALWAYS use bracket notation: item["json"]["field"]
$pageCount is not defined Used outside HTTP Request node pagination $pageCount is ONLY available in HTTP Request node
Number treated as string in comparison n8n expression returned string type Explicitly convert: Number($json.price) or use parseInt()/parseFloat()
Date comparison fails Comparing string dates instead of DateTime Convert with .toDateTime() then compare with .diffTo() or .isBetween()

Read the full file on GitHub · 237 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 237 lines · 119 tokens per session scan A 6e402c804e37

Subscribe to this mod's changes

n8n-errors-expressions is a skill published in the GitHub repository Impertio-Studio/n8n-Claude-Skill-Package (3 stars, last pushed 2mo ago), licensed MIT. It adds 119 tokens to every session and 2,762 once invoked, about $0.0006 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

qgis-errors-data-loading

Use when diagnosing data loading failures, invalid layers, or provider connection errors. Prevents silent failures from unchecked layer validity and incorrect URI formats. Covers invalid layer detection, URI format errors, encoding issues, GeoPackage locking, connection failures, and performance. Keywords: invalid…

Impertio-Studio/QGIS-Claude-Skill-Package · 92 tokens

qgis-errors-projections

Use when diagnosing CRS/projection errors, coordinate mismatches, or datum transformation issues. Prevents silent data corruption from wrong CRS assignment and coordinate order confusion. Covers wrong EPSG selection, lat/lon vs lon/lat, datum warnings, on-the-fly reprojection pitfalls, and fix patterns. Keywords: CRS…

Impertio-Studio/QGIS-Claude-Skill-Package · 99 tokens

threejs-errors-performance

Use when a Three.js scene has performance problems: low FPS, memory leaks, too many draw calls, or high GPU memory usage. Prevents the common mistake of forgetting dispose(), creating objects in the render loop, or not using InstancedMesh for repeated objects. Covers disposal patterns, draw call optimization…

Impertio-Studio/Three.js-Claude-Skill-Package · 127 tokens

threejs-errors-rendering

Use when a Three.js scene renders incorrectly: black screen, invisible objects, wrong colors, z-fighting, or broken shadows. Prevents the common mistake of wrong color space, missing material.side, or forgetting updateProjectionMatrix. Covers all common rendering errors with diagnosis steps and fix patterns. Keywords…

Impertio-Studio/Three.js-Claude-Skill-Package · 104 tokens

n8n-validation-expert

Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator structure issues, or need help understanding validation results. Also use when asking about validation profiles, error types, the validation loop process, or auto-fix capabilities.…

czlonkowski/n8n-mcp · 91 tokens

n8n-error-handling

Wire n8n error handling so failures are loud, structured, and recoverable. Use when building any webhook/API workflow, a scheduled or unattended workflow, or any path where a silent failure would drop user-visible work — and whenever the user mentions error handling, onError, continueErrorOutput, error…

czlonkowski/n8n-mcp · 128 tokens