/mikrotik-config-gen:mikrotik-config-genfrom mikrotik-config-gen
Generate secure MikroTik RouterOS v7 configurations from a plain-language description, or review and harden an existing /export. Use when the user asks to write, generate, build, audit, or harden a MikroTik / RouterOS config, firewall, NAT, PPPoE + RADIUS BNG, site-to-site WireGuard, hotspot captive portal, or ISP edge router. Always applies a security-hardening baseline, takes per-model port and interface names from devices/, and never invents IPs or secrets — it emits clearly marked placeholders plus a fill-in checklist.
Ships in mikrotik-config-gen. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turn a plain-language network description into a deployable RouterOS v7
script, or review an existing /export and harden it. This skill encodes the
security baseline, the canonical firewall structure, four ready presets, and a
per-model hardware reference so you assemble a correct config instead of
guessing interface names or leaving management ports open.
Scope: RouterOS v7 only (native WireGuard, the new /routing stack, /ip
menu layout). If the user is on v6, say so and stop — the syntax differs.
/export..rsc script the user will paste into Winbox
terminal or SSH.| Mode | Trigger | What you produce |
|---|---|---|
| Generate | a description of the network | a full .rsc from scratch, hardened |
| Review | a pasted /export (or .rsc) | findings list + a corrected/hardened .rsc |
Follow this order every time. Details live in references/.
/export to review, or a
description to build from? If both, review then extend.# model = header). Look it up in devices/ to get real interface names
(ether1..N, sfp-sfpplus1, wlan1/wlan2, PoE-out ports, switch grouping).
If the model is unknown, say so and use generic etherN names, and flag it
in the fill-in checklist.references/workflow.md for the question set per
preset. Never invent IPs, passwords, PSKs, ASNs, or ISP details — use
explicit placeholders (<WAN_IP>, <LAN_SUBNET>, <ADMIN_PASSWORD>,
<WG_PEER_PUBKEY>) and collect every one into a "Fill these in" list at the
end. This is the site's "Review Gaps" step.presets/, and adapt it. Presets
already include the hardening baseline.references/workflow.md):
identity → users & service hardening → interface lists → bridges/VLANs →
addressing → DHCP/DNS → firewall (raw → filter → NAT) → routing → the target
feature (PPPoE/WireGuard/hotspot/…) → SNMP/logging/NTP.references/hardening.md, even
in Generate mode with a terse prompt. It is not optional.python3 scripts/validate.py out.rsc.
Fix every ERROR, review every WARN. The validator is a heuristic linter,
not a substitute for a device — see its caveats below..rsc in a fenced block, followed by:
/system safe-mode (press F4 in
terminal / the toggle in Winbox) so a bad rule auto-reverts.Full list and rationale in references/hardening.md. Every config must:
chain=input and chain=forward, with
accept established,related and drop invalid first.winbox, ssh) to a management subnet via /ip service set address=.allow-remote-requests reachable
from the internet; disable MAC-server, MAC-winbox and neighbor discovery on
the WAN interface list.invalid/bad TCP in /ip firewall raw.admin password (placeholder), disable or rename the default user,
set /system clock timezone and NTP, and set /system note/identity.Adapt these; do not paste verbatim without filling placeholders. See presets/.
| Preset | File | Use when |
|---|---|---|
| ISP edge router | presets/isp-edge.md | single WAN uplink + NAT'd LAN, hardened border |
| PPPoE + RADIUS (BNG) | presets/pppoe-radius-bng.md | subscriber termination with RADIUS AAA |
| Site-to-site WireGuard | presets/wireguard-s2s.md | two routers, encrypted tunnel between LANs |
| Hotspot captive portal | presets/hotspot.md | guest Wi-Fi / captive login |
devices/ holds per-model port and interface data (Ethernet count, SFP/SFP+,
wireless bands, PoE-in/out, USB, switch-chip grouping, default WAN port). Read
the relevant file to get real interface names before writing the config.
Start at devices/README.md. If a model is not listed, use generic names and
note it in the checklist — do not guess PoE-out or SFP+ port numbers.
/ip/address/add …)
or the classic /ip address add … form consistently; comment every section..rsc in a single fenced block, ordered as in step 5.<PLACEHOLDER>; list them all.# --- WAN ---) so the user can read and trust it.python3 scripts/validate.py path/to/config.rsc # human report
python3 scripts/validate.py --json path/to/config.rsc
It flags: missing input/forward default-drop, services open to 0.0.0.0/0,
unpinned winbox/ssh, DNS allow-remote-requests without a WAN drop, missing
IPv6 firewall when IPv6 is present, leftover <PLACEHOLDER> tokens, and basic
syntax problems (unbalanced quotes/braces). Exit code is non-zero if any
ERROR is found.
Caveat: RouterOS has no official offline validator. This is a static
heuristic; a clean report is not proof of correctness. The only real test is
applying the script on the device under /system safe-mode.
winbox/api/www reachable from WAN — the #1 way boxes get owned.chain=forward default-drop (only dropping input)./routing).devices/.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
mikrotik-config-gen@rpa-skills is listed by evilfreelancer/rpa-skills — review the source before installing
npx claudepluginhub evilfreelancer/rpa-skills --plugin mikrotik-config-gen