跳到正文
cccskills
免费在 GitHub 公开

mikrotik-routeros

Configures and automates MikroTik RouterOS routers through the terminal, command line interface, .rsc imports, /system script repository, Scheduler, Netwatch, firewall, NAT, DHCP, DNS, bridge, VLAN, routing, VPN, device-mode, backup/export, and RouterOS scripting. Use this skill whenever the user mentions MikroTik, Mikrotik, RouterOS, WinBox terminal, router CLI, router scripts, .rsc files, or configuring MikroTik services from the command line.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(6)

  • SKILL.md5.2 KB
  • references/config-change-workflows.md4.3 KB
  • references/official-docs.md2.4 KB
  • references/recipes.md4.1 KB
  • references/routeros-cli.md4.0 KB
  • references/routeros-scripting.md4.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

MikroTik RouterOS CLI and Scripting

Use this skill to generate, review, or troubleshoot RouterOS command-line configuration and scripts. Target RouterOS v7 unless the user gives a different version.

Reference Loading

Read the smallest relevant reference before producing commands:

  • references/official-docs.md - source map for official MikroTik documentation and version notes.
  • references/routeros-cli.md - terminal syntax, paths, item targeting, quoting, and SSH execution.
  • references/routeros-scripting.md - RouterOS script structure, variables, functions, error handling, and script repository behavior.
  • references/config-change-workflows.md - backups, exports, safe mode, imports, resets, and rollback planning.
  • references/recipes.md - reusable command patterns for common configuration tasks.

Operating Model

  1. Determine whether the user wants live execution, a command plan, a reusable .rsc file, or a /system script entry.
  2. Gather only the facts needed to avoid an unsafe or wrong config: RouterOS version, model, management IP/interface, WAN/LAN interface names, bridge/VLAN design, and existing rule order.
  3. Prefer commands that are safe to paste into a RouterOS terminal. Use absolute menu paths such as /ip/firewall/filter instead of relying on the current menu.
  4. Use stable identifiers: item names, comments, default-name values, or [find ...] filters. Avoid numeric item IDs in generated scripts because CLI numbers are session-local.
  5. Make commands idempotent where practical. Check for existing objects with [find ...] before adding duplicates.
  6. Separate preflight, changes, verification, and rollback. Router configuration mistakes can cut off management access.

Safety Defaults

  • For remote network, firewall, route, bridge, VLAN, or address changes, recommend an export and either safe mode or a staged rollback path before making changes.
  • Never guess credentials, public IPs, interface roles, or firewall rule order. Use placeholders or ask for the missing value if it is a blocker.
  • Do not include real passwords, private keys, shared secrets, or show-sensitive output unless the user explicitly asks and understands the exposure.
  • Prefer SSH or local terminal examples. Do not recommend Telnet except for an explicitly isolated recovery scenario.
  • Flag commands that reboot, reset, disable management services, remove addresses/routes, or alter input firewall policy.
  • If the user asks for a destructive reset, include the exact consequence and a backup/export step first.

Answer Shape

For configuration changes, use this structure:

## Preflight
<read-only commands to inspect state and save config>

## Commands
<RouterOS commands, grouped by subsystem>

## Verify
<commands to prove the intended state and connectivity>

## Rollback
<minimal commands or restore path>

For scripts, use this structure:

## Script
<source code or /system script add/set command>

## Install
<commands to add the script and required policy>

## Test
<manual run, logs, dry-run behavior if applicable>

## Schedule or Trigger
<scheduler/netwatch/button hook only if requested>

RouterOS Command Style

  • Write commands in slash-separated form: /ip/address/print, /system/script/add, /interface/bridge/vlan/add.
  • Keep param=value tight; RouterOS does not allow spaces around =.
  • Quote strings with spaces or special characters: comment="managed by routeros-script".
  • Use comments as durable anchors for generated rules and scheduled jobs.
  • Use print terse or print detail for state capture, and print where ... for targeted checks.
  • Use export terse for portable command output; use binary /system backup only for same-device restore scenarios.

Idempotent Pattern

Use this pattern when adding an object that should exist at most once:

:if ([:len [/ip/firewall/address-list/find list="mgmt-allow" address="203.0.113.10"]] = 0) do={
    /ip/firewall/address-list/add list="mgmt-allow" address="203.0.113.10" comment="managed: admin workstation"
}

For existing objects, use set [find ...] ... only when the find expression is expected to match exactly one item. If multiple matches are possible, print and ask the user to choose or narrow the filter.

Validation Checklist

Before handing off commands, check:

  • Interface names match the user's device, or are clearly placeholders.
  • Firewall rules are placed before broad drop/reject rules.
  • Management allow rules are added before any restrictive input policy.
  • Scripts declare variables before use and use local scope unless persistence is intentional.
  • Import files use RouterOS syntax, not Bash.
  • Version-sensitive features are labelled and linked to official docs when needed.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Primary accessibility skill for VS Code. REQUIRED for new feature and contribution work, and also applies to updates of existing UI. Covers accessibility help dialogs, accessible views, verbosity settings, signals, ARIA announcements, keyboard navigation, and ARIA labels/roles.

中文简介正在准备中。当前显示原文说明。

jcasnellie69/homelab-config22026年10月16日 更新

Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.

中文简介正在准备中。当前显示原文说明。

jcasnellie69/homelab-config22026年10月16日 更新

Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

中文简介正在准备中。当前显示原文说明。

jcasnellie69/homelab-config22026年10月16日 更新

Add educational comments to the file specified, or prompt asking for file to comment if one is not provided.

中文简介正在准备中。当前显示原文说明。

jcasnellie69/homelab-config22026年10月16日 更新

Use when adding, modifying, or reviewing VS Code configuration policies. Covers the full policy lifecycle from registration to export to platform-specific artifacts. Run on ANY change that adds a `policy:` field to a configuration property.

中文简介正在准备中。当前显示原文说明。

jcasnellie69/homelab-config22026年10月16日 更新

Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when: - Building AI agents that call external tools (APIs, databases, file systems) - Implementing policy-based access controls for agent tool usage - Adding semantic intent classification to detect dangerous prompts - Creating trust scoring systems for multi-agent workflows - Building audit trails for agent actions and decisions - Enforcing rate limits, content filters, or tool restrictions on agents - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)

中文简介正在准备中。当前显示原文说明。

jcasnellie69/homelab-config22026年10月16日 更新

查看 jcasnellie69 的全部技能

报告此技能的问题