routeros-scripting
Installation
SKILL.md
RouterOS Scripting & CLI Config
RouterOS scripts (.rsc, /system/script, scheduler on-event, Netwatch hooks, and
interactive CLI snippets) use RouterOS's own language. It is not shell, Lua, Python,
or Tcl. For the syntax baseline, see references/syntax.md.
This skill focuses on the traps that LLMs are likely to confidently get wrong.
Do Not Use Interactive Row Numbers in Scripts
Interactive print output shows temporary row numbers (0, 1, 2...) for the
current console buffer. They are not stable object IDs and are not usable inside
scripts.
# WRONG in scripts — "1" is only an interactive print-buffer row number
/ip/route/set 1 gateway=3.3.3.3
# Better — internal IDs have a * prefix, but can change if objects are removed/re-added
/ip/route/set *1 gateway=3.3.3.3