agentleFS
nichwang88nichwang88/claude-skills/mikrotik-routeros/SKILL.md

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

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. bastos/skills★ 7same name
    2. 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.

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
  1. Distinctive:

    Use this skill when:

    line 24
  2. Very specific:

    Scripts: Use : for variables, ; for line continuation

    line 157
  3. Distinctive:

    Always reference official documentation: - Don't infer behavior

    line 180
  4. Distinctive:

    Verify CLI syntax: - Use official command reference

    line 183
  5. Distinctive:

    Security first: - Follow MikroTik security best practices

    line 184
  6. Distinctive:

    When answering RouterOS questions:

    line 209
  7. Distinctive:

    Always check and mention version requirements:

    line 234
  8. Distinctive:

    Use SSH keys instead of passwords

    line 246

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

SourceURLUse For
RouterOS Manualhttps://help.mikrotik.com/docs/spaces/ROS/overviewOfficial configuration reference, all RouterOS features
MikroTik Wikihttps://wiki.mikrotik.com/Legacy documentation, community guides, older versions
MikroTik Forumhttps://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.1

Supported 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=auto

API 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-api

Example 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

  1. Command Structure: /category/subcategory/action
    /interface ethernet print
    /ip address add address=192.168.1.1/24 interface=ether1
  2. Parameters: parameter=value
    /ip firewall filter add chain=forward action=accept protocol=tcp dst-port=80
  3. Comments: Lines starting with #
    # This is a comment
    /system identity set name=Router1
  4. Scripts: Use : for variables, ; for line continuation
    :local myVar "value"
    :put $myVar

Common Use Cases

Quick Reference Table

Key Principles

  1. Always reference official documentation - Don't infer behavior
  2. Check RouterOS version - Features vary by version
  3. Cite Manual URLs - Include specific documentation links
  4. Verify CLI syntax - Use official command reference
  5. 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

MistakeFix
Using Cisco/Linux syntaxCheck RouterOS CLI syntax in official docs
Mixing Wiki and Manual infoManual takes priority (Wiki may be outdated)
Assuming features from other routersVerify in RouterOS documentation
Using outdated forum solutionsCheck Manual for current best practices
Skipping version requirementsAlways 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 included

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.