mikrotik-routeros
Skill0 starsChanged 10 months agoMITView on GitHub
Use when answering questions about MikroTik RouterOS configuration, scripting, network setup, firewall rules, routing protocols, or connecting to RouterOS via SSH/API. Use when user mentions MikroTik, RouterOS, or RouterBOARD devices.
- Reads credentials
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- JoshFinlayAU/mikrotik-drifttheir own version, first seen Aug 17, 2026
- bastos/skillstheir own version, first seen Jan 30, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- bastos/skills★ 7same name
- JoshFinlayAU/mikrotik-drift★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- surge-referenceSkill
- ui-ux-pro-maxSkill
- unifi-network-managementSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Use this skill when:
- Very specific: line 157
Scripts: Use : for variables, ; for line continuation
- Distinctive: line 180
Always reference official documentation: - Don't infer behavior
- Distinctive: line 183
Verify CLI syntax: - Use official command reference
- Distinctive: line 184
Security first: - Follow MikroTik security best practices
- Distinctive: line 209
When answering RouterOS questions:
- Distinctive: line 234
Always check and mention version requirements:
- Distinctive: line 246
Use SSH keys instead of passwords
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MikroTik RouterOS Reference
Overview
MikroTik RouterOS has official documentation as the authoritative source. Always consult official docs before inferring behavior or suggesting third-party solutions.
Documentation Sources
| Source | URL | Use For |
| RouterOS Manual | https://help.mikrotik.com/docs/spaces/ROS/overview | Official configuration reference, all RouterOS features |
| MikroTik Wiki | https://wiki.mikrotik.com/ | Legacy documentation, community guides, older versions |
| MikroTik Forum | https://forum.mikrotik.com/ | Community discussions, troubleshooting (not authoritative) |
Priority: RouterOS Manual > Wiki > Forum
When to Use This Skill
Use this skill when:
- Configuring RouterOS features (VLAN, routing, firewall, etc.)
- Writing RouterOS scripts
- Connecting to RouterOS via SSH or API
- Troubleshooting RouterOS issues
- Questions about RouterOS CLI commands
- Setting up network protocols (OSPF, BGP, VLAN, etc.)
Do NOT use when:
- Question is about general networking concepts (not RouterOS-specific)
- User asks about other router brands (Cisco, Ubiquiti, etc.)
Connection Methods
1. SSH Connection
Official Documentation: https://help.mikrotik.com/docs/spaces/ROS/pages/132350014/SSH
Default Configuration:
- Protocol: SSH v2
- Port: TCP 22 (default, can be changed)
- Status: Enabled by default
Basic SSH Connection:
# Standard SSH
ssh admin@192.168.88.1
# With specific port
ssh -p 2222 admin@192.168.88.1
# Execute single command (ssh-exec)
ssh admin@192.168.88.1 "/interface print"SSH Key Authentication:
# On RouterOS, import public key
/user ssh-keys import user=admin public-key-file=id_rsa.pub
# Connect from client
ssh -i ~/.ssh/id_rsa admin@192.168.88.1Supported Key Types: RSA, Ed25519, Ed25519-sk (PEM, PKCS#8, or OpenSSH format)
2. API Connection
Official Documentation: https://help.mikrotik.com/docs/spaces/ROS/pages/47579160/API
Connection Details:
- Standard API: TCP 8728
- Secure API (API-SSL): TCP 8729
- Protocol: Sentence-based communication
Enable API Service:
/ip service
set api disabled=no
set api-ssl disabled=no certificate=autoAPI Command Structure:
- Commands start with
/, spaces replaced by/ - Attributes:
=name=value - Queries:
?prefix (for print commands) - Sentences terminated by zero-length word
Python Connection (Official Protocol):
# Using official API protocol
import socket
# Connect to API
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('192.168.88.1', 8728))
# Login and execute commands
# (See official API documentation for full implementation)Python Libraries (Third-party):
# Popular libraries
pip install librouteros
pip install routeros-apiExample with librouteros:
import librouteros
api = librouteros.connect(
host='192.168.88.1',
username='admin',
password='password',
port=8728 # or 8729 for SSL
)
# Execute commands
interfaces = api.path('/interface')
print(list(interfaces))
api.close()3. WinBox / WebFig
GUI Access (not for automation):
- WinBox: Native Windows/Wine application
- WebFig: Web interface (HTTP/HTTPS)
CLI Syntax Rules
Official Reference: https://help.mikrotik.com/docs/spaces/ROS/pages/328059/RouterOS
- Command Structure:
/category/subcategory/action/interface ethernet print /ip address add address=192.168.1.1/24 interface=ether1 - Parameters:
parameter=value/ip firewall filter add chain=forward action=accept protocol=tcp dst-port=80 - Comments: Lines starting with
## This is a comment /system identity set name=Router1 - Scripts: Use
:for variables,;for line continuation:local myVar "value" :put $myVar
Common Use Cases
Quick Reference Table
| Task | Command Path | Documentation |
| IP Address | /ip address | https://help.mikrotik.com/docs/spaces/ROS/pages/103841891/IP+Address |
| Firewall | /ip firewall filter | https://help.mikrotik.com/docs/spaces/ROS/pages/56459276/Filter |
| NAT | /ip firewall nat | https://help.mikrotik.com/docs/spaces/ROS/pages/56459267/NAT |
| DHCP Server | /ip dhcp-server | https://help.mikrotik.com/docs/spaces/ROS/pages/26476614/DHCP |
| Routing | /routing | https://help.mikrotik.com/docs/spaces/ROS/pages/130711553/Routing |
| Bridge/VLAN | /interface bridge | https://help.mikrotik.com/docs/spaces/ROS/pages/103841808/Bridging+and+Switching |
| Wireless | /interface wireless | https://help.mikrotik.com/docs/spaces/ROS/pages/103841999/Wireless |
| VPN | /interface wireguard, /ppp | https://help.mikrotik.com/docs/spaces/ROS/pages/42205224/WireGuard |
Key Principles
- Always reference official documentation - Don't infer behavior
- Check RouterOS version - Features vary by version
- Cite Manual URLs - Include specific documentation links
- Verify CLI syntax - Use official command reference
- Security first - Follow MikroTik security best practices
Red Flags - STOP and Check Official Docs
These thoughts mean you're about to violate the skill:
- "RouterOS probably works like Cisco..."
- "I remember from a forum post..."
- "Based on other routers, it should..."
- "A third-party tutorial suggested..."
- "It's similar to Linux, so..."
All of these mean: Stop. Check RouterOS Manual. If not documented, say so.
Common Mistakes
| Mistake | Fix |
| Using Cisco/Linux syntax | Check RouterOS CLI syntax in official docs |
| Mixing Wiki and Manual info | Manual takes priority (Wiki may be outdated) |
| Assuming features from other routers | Verify in RouterOS documentation |
| Using outdated forum solutions | Check Manual for current best practices |
| Skipping version requirements | Always note RouterOS version requirements |
Answer Template
When answering RouterOS questions:
[Clear explanation based on official documentation]
**Configuration Example:**
```routeros
[Actual RouterOS CLI commands]Official Reference:
- Manual: [relevant Manual URL]
- Additional: [Wiki URL if applicable]
Version Requirements:
- RouterOS version: [if applicable]
Notes:
- [Security considerations]
- [Performance considerations]
- [Caveats or limitations]
## Version-Specific Features
Always check and mention version requirements:
- **RouterOS 7.x**: New features, breaking changes from 6.x
- **RouterOS 6.x**: Stable, long-term support
- **SwOS**: For CRS switches only
**Find version**: `/system resource print`
## Security Best Practices
**From Official Docs**:
1. Change default admin password
2. Disable unused services (`/ip service`)
3. Use SSH keys instead of passwords
4. Restrict API access by IP (`/ip service set api address=trusted-ip`)
5. Enable firewall rules
6. Keep RouterOS updated
**Security Documentation**: https://help.mikrotik.com/docs/spaces/ROS/pages/8978504/User
## Real-World Impact
**Without this skill:**
- Agents mix forum posts with official docs
- Outdated or incorrect CLI syntax
- Third-party libraries suggested without official API reference
- No version awareness
**With this skill:**
- Authoritative answers from RouterOS Manual
- Correct CLI syntax and commands
- Official API documentation first, libraries as alternatives
- Version requirements clearly stated
- Security best practices includedDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

