n8n authoring skill

Guidance for authoring, validating, running, and verifying independent n8n-style workflows with LMScript, LMCode, the Go lmflow-host binary, and lmmock.

Purpose

Help author, validate, and execute linear n8n-style JSON workflows and neutral connector specifications using src/validate.lms, src/run.lms, and the lmcode-go based lmflow-host runtime, verified deterministically against lmmock without upstream n8n code or live secrets.

When to use it

Use this tool when building or testing declarative n8n-style linear workflow graphs (starting from n8n-nodes-base.manualTrigger through connector nodes such as n8n-nodes-base.telegram), propagating scalar JSON fields via whole-field ={{ $json.path.to.value }} expressions, or adding neutral JSON POST connector operations backed by bounded Go HTTP transport.

Install

Install Node.js 24.15 or newer and Go 1.26 or newer on Linux or macOS, clone the repository, install the pinned npm toolchain (@lmctl-ai/lmctl 0.2.454 and @lmctl-ai/lmmock 0.1.117) with npm ci --ignore-scripts --no-audit --no-fund, and compile the Go host to ./build/lmflow-host with npm run build.

Commands

npm ci --ignore-scripts --no-audit --no-fund
npm run build
npm run demo
npm test
npm run check
go test ./...
./build/lmflow-host --lmcode-schema --json
./build/lmflow-host --lmcode-signatures
lmscript src/run.lms examples/telegram.workflow.json connectors/telegram.json tests/fixtures/credentials.json

Inputs and outputs

Safety rules

Worked examples

# Build lmflow-host and run the Telegram sendMessage -> getChat workflow against lmmock
npm run demo

# Validate a workflow and connector directly in LMScript before running lmflow-host
import "./src/validate.lms";
let wf = read_json("examples/telegram.workflow.json");
let conn = read_json("connectors/telegram.json");
flow.validate_all(wf, conn);

Errors and exit codes

Exit 0 indicates that structural validation, LMCode graph traversal, HTTP status checks (200..299), and provider success-envelope checks (such as ok: true) all succeeded. When src/run.lms fails pre-flight validation or require(result.ok), lmscript exits nonzero (1) with a diagnostic on stderr. The Go host ./build/lmflow-host exits 0 on success, 2 on CLI flag errors (--lmcode, --workflow, --connector, --credentials required), 3 on bytecode load, config/credential load, or runtime workflow_fail / HTTP errors, and 4 on stdout write or application failures.

How to verify

  1. Run ./build/lmflow-host --lmcode-schema --json and ./build/lmflow-host --lmcode-signatures and confirm exact byte and signature parity with internal/host/schema.json and lmscript --lmcode-signatures.
  2. Run npm test to execute lmscript static syntax checks, Go unit tests, and all 63 LMScript integration scenarios (32 structural validation cases, 26 runtime cases, and 5 lifecycle/parity checks).
  3. Run npm run check:memory to verify durable-memory index and formatting integrity.