🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Mikrotik RouterOS

by @drodecker

Manage MikroTik RouterOS devices via API to view status, firewall, network config, logs, users, backups, and run custom commands across multiple devices.

Versionv2026.3.30
Downloads489
Stars⭐ 1
TERMINAL
clawhub install mikrotik-routeros

πŸ“– About This Skill

MikroTik RouterOS Skill

description: Connect and manage MikroTik RouterOS devices via API. Supports viewing device status, firewall rules, network configuration, and executing custom RouterOS commands.

Connect and manage MikroTik RouterOS devices via API.

Features

  • View device status (system info, CPU, memory, storage)
  • View firewall rules (filter, NAT, mangle)
  • View network configuration (interfaces, IP addresses, routes, DNS)
  • Execute custom RouterOS commands
  • Support for multi-device connection
  • Configuration

    Option 1: TOOLS.md (Recommended)

    Add device info in ~/.openclaw/workspace/TOOLS.md:

    MikroTik Devices

  • office: 192.168.88.1, admin, empty password
  • Password format:

  • Empty password: write empty password, no password, none, or leave blank
  • With password: write the password string directly
  • Option 2: Environment Variables

    export MIKROTIK_HOST=192.168.88.1
    export MIKROTIK_USER=admin
    export MIKROTIK_PASS=        # empty password
    

    or

    export MIKROTIK_PASS=yourpassword # with password

    Priority: Environment Variables > TOOLS.md > Defaults

    Usage

    πŸ“Š Device Status

  • Show mikrotik device status
  • Check office mikrotik status
  • Check router health
  • πŸ”₯ Firewall

  • Show firewall rules
  • mikrotik firewall configuration
  • Show NAT rules
  • Check office firewall
  • πŸ”Œ Network Interfaces

  • Show network interfaces
  • mikrotik interface list
  • Show IP address configuration
  • πŸ“‹ DHCP

  • Show DHCP configuration
  • Show DHCP leases
  • πŸ“‘ ARP Table

  • Show ARP table
  • Show ARP cache
  • πŸ” WireGuard

  • Show WireGuard configuration
  • Show VPN peers
  • πŸ‘€ Users

  • Show user configuration
  • Show PPP users
  • πŸ“ Logs

  • Show system logs
  • Show recent logs
  • πŸ”§ Services

  • Show system services
  • Show API/SSH ports
  • πŸ’Ύ Backup Configuration

  • Backup configuration
  • Backup router configuration
  • 🧹 Clean Storage

  • Clean storage
  • Check for deletable files
  • πŸ” API Configuration

  • Configure API access
  • Show API service configuration
  • πŸ“ˆ Traffic Statistics

  • Show interface traffic
  • Show traffic statistics
  • πŸ”Œ Interface Details

  • Show interface details
  • Show ether1 details
  • 🏷️ VLAN

  • Show VLAN configuration
  • Show VLAN list
  • πŸŒ‰ Bridge

  • Show bridge configuration
  • Show bridge ports
  • πŸ“Š Queues/Bandwidth

  • Show queue configuration
  • Show bandwidth limits
  • Show rate limit rules
  • 🌐 Routing

  • Show routing configuration
  • Show OSPF status
  • Show BGP peers
  • 🌑️ System Health

  • Show system health
  • Show temperature/voltage/fan
  • πŸ“… Scheduled Tasks

  • Show scheduled tasks
  • Show cron jobs
  • πŸ“‘ Neighbor Discovery

  • Show neighbor devices
  • Show network device discovery
  • πŸ”— Active Connections

  • Show active connections
  • Show connection statistics
  • πŸ“ Ping Test

  • ping 8.8.8.8 on mikrotik
  • πŸ“‘ Network Scan

  • Scan local network
  • Scan 192.168.1.0/24
  • Find MikroTik devices
  • 🎯 Custom Commands

  • execute /system/resource/print on mikrotik
  • run routeros command /ip/address/print
  • execute /interface/print on office device
  • πŸ–₯️ Multi-device Support

    If multiple devices are configured, you can specify the device name in the command:
  • Show server-room mikrotik status
  • Show home firewall rules
  • Dependencies

  • Device API enabled (default port 8728)
  • Network reachable
  • File Structure

    β”œβ”€β”€ SKILL.md # Skill description (this file) β”œβ”€β”€ handler.py # Command processor └── mikrotik-api/ # API client library β”œβ”€β”€ __init__.py β”œβ”€β”€ client.py # API client β”œβ”€β”€ commands.py # Command wrappers β”œβ”€β”€ cli.py # CLI tool └── scanner.py # Network scanner

    Notes

    ⚠️ Security Warnings

    1. Network Scan Risks - mikrotik scan actively scans the local subnet, generating network discovery traffic. - May trigger security alerts in production networks. - Recommendation: Run in isolated/test networks or obtain permission from the network administrator first.

    2. Credential Security - ❌ DO NOT save router admin passwords in plaintext in public or unencrypted TOOLS.md. - βœ… Recommended: Use environment variables (MIKROTIK_HOST/MIKROTIK_USER/MIKROTIK_PASS). - βœ… Recommended: Use temporary credentials for short-term sessions and delete after use.

    3. Local Commands and Permissions - scanner.py uses subprocess to call system commands (ip/hostname). - Requires opening UDP sockets for network scanning. - Ensure: The environment allows these operations.

    Changelog

    v1.8.6 (2026-03-30)

  • Translated entire skill to English (Original by Xiage).
  • Updated attribution and maintainer info.
  • v1.8.5 (2026-03-09)

  • πŸ” Refactored network scanning - Switched to API port scanning.
  • πŸ“Š Optimized scan results.
  • πŸ”§ Updated scanner.py.
  • v1.8.4 (2026-03-08)

  • πŸ’Ύ New backup configuration feature.
  • 🧹 New storage cleanup feature.
  • πŸ” New API configuration view.
  • v1.8.2 (2026-03-06)

  • πŸ”§ Fixed firmware display bug.
  • πŸ“‹ Added device model and serial number.
  • πŸ“Ά New wireless client query (CAPsMAN).
  • 🎯 Onboarding optimization for new users.
  • πŸ” Optimized network scanning.
  • πŸ†• Added network scanning (Winbox-like).
  • πŸ’‘ Examples

    πŸ“Š Device Status

  • Show mikrotik device status
  • Check office mikrotik status
  • Check router health
  • πŸ”₯ Firewall

  • Show firewall rules
  • mikrotik firewall configuration
  • Show NAT rules
  • Check office firewall
  • πŸ”Œ Network Interfaces

  • Show network interfaces
  • mikrotik interface list
  • Show IP address configuration
  • πŸ“‹ DHCP

  • Show DHCP configuration
  • Show DHCP leases
  • πŸ“‘ ARP Table

  • Show ARP table
  • Show ARP cache
  • πŸ” WireGuard

  • Show WireGuard configuration
  • Show VPN peers
  • πŸ‘€ Users

  • Show user configuration
  • Show PPP users
  • πŸ“ Logs

  • Show system logs
  • Show recent logs
  • πŸ”§ Services

  • Show system services
  • Show API/SSH ports
  • πŸ’Ύ Backup Configuration

  • Backup configuration
  • Backup router configuration
  • 🧹 Clean Storage

  • Clean storage
  • Check for deletable files
  • πŸ” API Configuration

  • Configure API access
  • Show API service configuration
  • πŸ“ˆ Traffic Statistics

  • Show interface traffic
  • Show traffic statistics
  • πŸ”Œ Interface Details

  • Show interface details
  • Show ether1 details
  • 🏷️ VLAN

  • Show VLAN configuration
  • Show VLAN list
  • πŸŒ‰ Bridge

  • Show bridge configuration
  • Show bridge ports
  • πŸ“Š Queues/Bandwidth

  • Show queue configuration
  • Show bandwidth limits
  • Show rate limit rules
  • 🌐 Routing

  • Show routing configuration
  • Show OSPF status
  • Show BGP peers
  • 🌑️ System Health

  • Show system health
  • Show temperature/voltage/fan
  • πŸ“… Scheduled Tasks

  • Show scheduled tasks
  • Show cron jobs
  • πŸ“‘ Neighbor Discovery

  • Show neighbor devices
  • Show network device discovery
  • πŸ”— Active Connections

  • Show active connections
  • Show connection statistics
  • πŸ“ Ping Test

  • ping 8.8.8.8 on mikrotik
  • πŸ“‘ Network Scan

  • Scan local network
  • Scan 192.168.1.0/24
  • Find MikroTik devices
  • 🎯 Custom Commands

  • execute /system/resource/print on mikrotik
  • run routeros command /ip/address/print
  • execute /interface/print on office device
  • πŸ–₯️ Multi-device Support

    If multiple devices are configured, you can specify the device name in the command:
  • Show server-room mikrotik status
  • Show home firewall rules
  • βš™οΈ Configuration

    Option 1: TOOLS.md (Recommended)

    Add device info in ~/.openclaw/workspace/TOOLS.md:

    MikroTik Devices

  • office: 192.168.88.1, admin, empty password
  • Password format:

  • Empty password: write empty password, no password, none, or leave blank
  • With password: write the password string directly
  • Option 2: Environment Variables

    export MIKROTIK_HOST=192.168.88.1
    export MIKROTIK_USER=admin
    export MIKROTIK_PASS=        # empty password
    

    or

    export MIKROTIK_PASS=yourpassword # with password

    Priority: Environment Variables > TOOLS.md > Defaults

    πŸ“‹ Tips & Best Practices

    ⚠️ Security Warnings

    1. Network Scan Risks - mikrotik scan actively scans the local subnet, generating network discovery traffic. - May trigger security alerts in production networks. - Recommendation: Run in isolated/test networks or obtain permission from the network administrator first.

    2. Credential Security - ❌ DO NOT save router admin passwords in plaintext in public or unencrypted TOOLS.md. - βœ… Recommended: Use environment variables (MIKROTIK_HOST/MIKROTIK_USER/MIKROTIK_PASS). - βœ… Recommended: Use temporary credentials for short-term sessions and delete after use.

    3. Local Commands and Permissions - scanner.py uses subprocess to call system commands (ip/hostname). - Requires opening UDP sockets for network scanning. - Ensure: The environment allows these operations.