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.
npx agentmods add skills/neurawork-git/n8n-autopilot/n8n-code-javascriptnpx skills add neurawork-git/n8n-autopilot --skill n8n-code-javascriptgit clone --depth 1 https://github.com/neurawork-git/n8n-autopilotWrote 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.
[](https://agentmods.dev/skills/neurawork-git/n8n-autopilot/n8n-code-javascript)<a href="https://agentmods.dev/skills/neurawork-git/n8n-autopilot/n8n-code-javascript"><img src="https://agentmods.dev/badge/skills/neurawork-git/n8n-autopilot/n8n-code-javascript.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00063 | $0.01571 |
| Opus 5 | $0.00032 | $0.00785 |
| Sonnet 5 | $0.00013 | $0.00314 |
| Haiku 4.5 | $0.00006 | $0.00157 |
Grade A, and why
n8n-code-javascript 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JavaScript Code Node
Expert guidance for writing JavaScript code in n8n Code nodes.
Quick Start
// Basic template for Code nodes
const items = $input.all();
// Process data
const processed = items.map(item => ({
json: {
...item.json,
processed: true,
timestamp: new Date().toISOString()
}
}));
return processed;
Essential Rules
- Choose "Run Once for All Items" mode (recommended for most use cases)
- Access data:
$input.all(),$input.first(), or$input.item - CRITICAL: Must return
[{json: {...}}]format - CRITICAL: Webhook data is under
$json.body(not$jsondirectly) - Built-ins available: $helpers.httpRequest(), DateTime (Luxon), $jmespath()
When NOT to use a Code node (native-first)
Reach for a native node before writing JavaScript — Code nodes are harder to read, review, and they run V8 in-process (OOM risk on large data, see below). In a real production audit, Code nodes outnumbered native conditional nodes ~2.5:1 — much of it avoidable:
| If you are doing… | Use this native node, NOT Code |
|---|---|
| Branching on a condition | IF (2 branches) / Switch (n branches) |
| Dropping items by a rule | Filter |
| Setting / renaming / mapping fields | Set (Edit Fields) |
| Merging / combining streams | Merge |
| Aggregating into one item | Aggregate / Summarize |
| Looping over large batches | Loop Over Items (SplitInBatches) |
Memory / OOM (real production incident): a Code node that loads or iterates a large dataset — especially a full DB result set (>~10k rows), binary, or file contents — can spike the V8 heap (~3 GB cap) and crash the n8n pod (OOM). For large data: page/limit at the source, process in
SplitInBatches, or push the work into the database/native node instead of materializing it all in JS.
Use a Code node when the logic genuinely has no native equivalent (custom parsing, multi-field computation, shaping a bespoke payload).
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.
- 4d ago First seen · 232 lines · 63 tokens per session scan A 3fa2574c1d6e
n8n-code-javascript is a skill published in the GitHub repository neurawork-git/n8n-autopilot (18 stars, last pushed 1mo ago), licensed MIT. It adds 63 tokens to every session and 1,571 once invoked, about $0.0003 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.
Other skills, from other repositories
n8n-agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain. AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output…
n8n-mcp-tools-expert
Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, organizing workflows into folders, managing credentials, auditing instance security, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats…
n8n-subworkflows
Build reusable, composable n8n sub-workflows. Use when extracting shared logic, building anything multi-step or reused across workflows, or any workflow over 10 nodes — and whenever the user mentions sub-workflows, Execute Workflow, reuse, shared/common logic, modular workflows, "Define Below" inputs…
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.…
n8n-workflow-patterns
Proven workflow architectural patterns from real n8n workflows. Use when building new workflows, designing workflow structure, choosing workflow patterns, planning workflow architecture, or asking about webhook processing, HTTP API integration, database operations, AI agent workflows, batch processing, or scheduled…
n8n-binary-and-data
Handle files and binary data in n8n correctly. Use when working with files, images, PDFs, attachments, uploads or downloads, base64, vision/multimodal input, or when an AI agent needs a file as tool input or output — and whenever the user mentions $binary, binaryPropertyName, "read the PDF", "attach the file", "send…