offline-loop

Offline commands for checking and running n8n workflow code without contacting a live n8n instance. n8n is a tool for building workflows from connected nodes, and fixtures are controlled test inputs.

In plain words
What is it for?
Running static checks, type checks, node code with fake inputs, and occasional local workflow simulations.
Why use it?
They provide a safe edit-and-check loop that does not need credentials or a network connection, while still catching layout, type, and execution problems.

Agent

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.

agentmods
npx agentmods add agents/buttjer/n8n-decanter/offline-loop
Clone the repo
git clone --depth 1 https://github.com/buttjer/n8n-decanter
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,012 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00015 $0.01012
Opus 5 $0.00008 $0.00506
Sonnet 5 $0.00003 $0.00202
Haiku 4.5 $0.00002 $0.00101

Measured yesterday against content hash 2ad008b4450a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

offline-loop 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 yesterday.

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.

docs/agents/offline-loop.md · 76 lines

What it actually says

Several verbs are fully offline — no credentials, no network, no live n8n — which makes them safe for agents to run without supervision:

  • preflight --offline — the static tier on its own: the layout-compliance guard (layout) plus the typecheck (types, the same wrapper that maps top-level-return node bodies back to real line numbers). --offline drops the instance tier, so nothing is read from n8n. Run it after editing any code file; treat a not ready verdict as a blocker. Every violation is listed in the failing check's indented details — the one-line message is only the summary.
  • node run — executes a node's body against a faked n8n context and prints the items it returns. With a fixture, $input, $('Node Name'), env, and static data are all controllable — real execution feedback without touching the instance.

Adding --simulate (preflight --offline --simulate) keeps the loop credential-free and still never contacts n8n, but it boots a throwaway local engine to really run the workflow — Docker, and minutes rather than milliseconds. An occasional deeper pass, not the per-edit one.

The first check of a task is the one exception — run it online. A bare preflight before your first edit reports whether someone changed that code on the instance meanwhile (driftpull and carry on; CONFLICT → show the user diff first). --offline cannot answer that — it drops the instance tier by definition — so the credential-free loop below is what you run per edit, not what you open with.

A typical agent iteration:

# orient first: read-only, and the only check that sees the instance's side
n8n-decanter preflight order-sync

# after editing code/parse-order.ts and workflow.json
n8n-decanter node run workflows/order-sync/code/parse-order.ts fixture.json
n8n-decanter preflight --offline
# both green -> push: the draft is where the work lands, and code that only
# exists in this folder is not done
n8n-decanter push order-sync
# now the draft holds your code -> grade it on the instance. This step leaves
# the offline loop: `test` grades the DRAFT on n8n, so it only means anything
# once you have pushed (before a push it would grade the old code). Bare, it is
# a static check and executes nothing; add --scenario/--execution for a real run.
n8n-decanter test order-sync
# going LIVE (`publish` / `push --publish`) stays the user's call

Adding a Code node from scratch is a structure act — it happens in n8n (the editor, or an addNode MCP op through the guard with no jsCode), then pull lands it as an empty code/ file with its placeholder and state entry (the node lands disconnected; wire it in n8n). Write the code in the file, verify with node run + preflight --offline, and the first push seeds the node's source. The sync layout page shows the shapes.

Because verification routes through the CLI, n8n-decanter must be on the sync dir's PATH — see Installation.

Exit codes: one gate, one view

preflight is the gate — exit 1 when the verdict is not ready (any check failed), 0 otherwise; --fail-on=warn makes a caution fail too. That is the exit code to branch on, offline or online.

diff is the view — the per-node line diff between your files and the n8n draft — and it always exits 0, like git diff. Never read a clean diff exit as a passing check. (It is also not offline: it reads the draft from the instance.)

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. yesterday First seen · 76 lines · 15 tokens per session scan A 2ad008b4450a

Subscribe to this mod's changes

offline-loop is an agent published in the GitHub repository buttjer/n8n-decanter (2 stars, last pushed yesterday), licensed MIT. It adds 15 tokens to every session and 1,012 once invoked, about $0.0001 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 agents, from other repositories

linear-issue-triager

Use this agent proactively when a Linear issue is created, updated, or needs comprehensive analysis. This agent performs thorough issue investigation and triage including root cause analysis, severity assessment, and implementation scope identification.

n8n-io/n8n · 47 tokens

AGENTS

Conventions for the @n8n/agents package.

n8n-io/n8n · 0 tokens

developer

Use this agent for any n8n development task - frontend (Vue 3), backend (Node.js/TypeScript), workflow engine, node creation, or full-stack features. The agent automatically applies n8n conventions and best practices. Examples: user: 'Add a new button to the workflow editor' assistant: 'I'll use the developer agent to…

n8n-io/n8n · 0 tokens

form

FORM — Design. Visual system, UI architecture, motion, accessibility, design PRDs. Use when a human will see the work, when a landing page or product UI is requested, or when Forge is about to invent a look. Use proactively for any user-facing surface.

jmenzies722/shua-labs · 57 tokens

aria

ARIA — AI engineering. New agents, skills, evals, MCP wiring, department growth. Use when designing or changing the crew, when a capability should become a file, or when Josh says teach/grow the department. Use proactively when a one-off prompt is about to become a standing job.

jmenzies722/shua-labs · 62 tokens

axis

AXIS — Architecture. System design, ADRs, irreversible calls, architectural review. Use when the shape of the system is unset, when a shortcut would lock us in, or before Forge writes a feature that spans boundaries. Use proactively for any new product or service.

jmenzies722/shua-labs · 56 tokens