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-pythonnpx skills add neurawork-git/n8n-autopilot --skill n8n-code-pythongit clone --depth 1 https://github.com/neurawork-git/n8n-autopilotWhat 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.00052 | $0.01349 |
| Opus 5 | $0.00026 | $0.00674 |
| Sonnet 5 | $0.00010 | $0.00270 |
| Haiku 4.5 | $0.00005 | $0.00135 |
Grade A, and why
n8n-code-python scanned grade A with 1 finding 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 3d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
import urllib.parse How it starts
The opening of the file, as written. The whole thing — 224 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Python Code Node (Beta)
Expert guidance for writing Python code in n8n Code nodes.
JavaScript First
Use JavaScript for 95% of use cases. Only use Python when:
- You need specific Python standard library functions (e.g.
statistics) - You're significantly more comfortable with Python syntax
- You're doing data transformations better suited to Python
JavaScript has $helpers.httpRequest(), Luxon DateTime, and better n8n docs.
Quick Start
# Basic template for Python Code nodes
items = _input.all()
processed = []
for item in items:
processed.append({
"json": {
**item["json"],
"processed": True,
"timestamp": datetime.now().isoformat()
}
})
return processed
Essential Rules
- Consider JavaScript first
- Access data:
_input.all(),_input.first(),_input.item - CRITICAL: Return
[{"json": {...}}]format - CRITICAL: Webhook data is under
_json["body"] - CRITICAL LIMITATION: No external libraries — no requests, pandas, numpy
CRITICAL: No External Libraries
# ❌ NOT AVAILABLE
import requests # ModuleNotFoundError
import pandas # ModuleNotFoundError
# ✅ AVAILABLE (standard library only)
import json
import datetime
import re
import base64
import hashlib
import urllib.parse
import math
import random
import statistics
Workarounds:
- Need HTTP requests? → Use HTTP Request node before Code node (or switch to JavaScript)
- Need pandas? → Use
statisticsmodule for basic stats, or switch to JavaScript
Data Access
# All items
all_items = _input.all()
# First item
first_item = _input.first()
data = first_item["json"]
# Each item mode
current_item = _input.item
# Other nodes
webhook_data = _node["Webhook"]["json"]
http_data = _node["HTTP Request"]["json"]
CRITICAL: Webhook Data
# ❌ WRONG
name = _json["name"] # KeyError!
# ✅ CORRECT
name = _json["body"]["name"]
# ✅ SAFER
name = _json.get("body", {}).get("name", "Unknown")
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.
- 3d ago First seen · 224 lines · 52 tokens per session scan A 237e194803dd
n8n-code-python is a skill published in the GitHub repository neurawork-git/n8n-autopilot (18 stars, last pushed 1mo ago), licensed MIT. It adds 52 tokens to every session and 1,349 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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-code-tool
Write JavaScript or Python for the n8n Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode) — the AI-agent-callable tool, NOT the workflow Code node. Use when building a Code Tool attached to an AI Agent, writing code that an LLM will invoke, parsing the query input, returning a string result, defining an input schema…
n8n-code-python
Write Python code in n8n Code nodes. Use when writing Python in n8n, using input/json/node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes. Use this skill when the user specifically requests Python for an n8n Code node. Note — JavaScript is recommended for 95% of use…
n8n-code-python
Write Python code in n8n Code nodes. Use when writing Python in n8n, using input/json/node syntax, working with standard library, or need to understand Python limitations in n8n Code nodes. Use this skill when the user specifically requests Python for an n8n Code node. Note — JavaScript is recommended for 95% of use…
n8n-code-python
Write correct Python for n8n Code nodes. Use Python when you need libraries or prefer Python syntax.
bump-dependency
Bumps a Python package dependency across Home Assistant Core integrations, regenerates core requirement files, runs verification tests and prek lint, and prepares a pull request with proper release/compare links.
biopython
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use…