routeros-fundamentals
掌握 MikroTik RouterOS v7 配置与脚本编写
手动配置 MikroTik 路由器会浪费数小时在重复性任务上。本技能为 AI 智能体提供 RouterOS v7 知识,使其能够在首次尝试时就编写出正确的 CLI 命令、REST API 调用和自动化脚本。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“routeros-fundamentals”。 如何在 RouterOS v7 上通过网关 10.0.0.1 添加一条到 192.168.10.0/24 的静态路由?
预期结果:
- 使用 /ip route add 命令:
- /ip route add dst-address=192.168.10.0/24 gateway=10.0.0.1
- 与 Linux 的关键差异:RouterOS 使用 dst-address 而非 -net/-host,语法为 dst-address=<network> gateway=<gateway-ip>。
正在使用“routeros-fundamentals”。 编写一个 REST API 调用来列出 RouterOS 上的所有防火墙规则
预期结果:
- GET /rest/ip/firewall/rule
- 请求头:Content-Type: application/json, Accept: application/json, Authorization: Bearer <token>
- 身份验证需要通过 /rest/login 生成令牌或使用 SSL 证书。
安全审计
安全Security scan detected 1898 potential issues, but all are false positives. The skill consists entirely of markdown documentation files containing RouterOS v7 reference material. The static scanner misidentified markdown code fences (backticks around code blocks) as Ruby shell execution, API documentation examples as code implementation, and common networking terminology as command-and-control indicators. No executable code, no credential exfiltration, no network access, and no malicious patterns exist. This is legitimate educational documentation for MikroTik RouterOS administrators.
风险因素
⚙️ 外部命令 (14)
🌐 网络访问 (11)
质量评分
你能构建什么
网络管理员自动化路由器配置
管理多个 MikroTik 设备的 IT 管理员使用本技能生成 RouterOS CLI 命令和 REST API 脚本,以便在其基础设施中进行批量配置更改。
DevOps 工程师构建网络自动化
DevOps 团队将 RouterOS 自动化集成到其基础设施即代码流水线中,使用本技能生成用于路由器配置的正确 API 调用和脚本。
开发者排查 RouterOS 错误
与 MikroTik 路由器构建集成的开发者使用本技能来理解为什么 Linux 命令在 RouterOS 上会失败,以及如何为 RouterOS v7 调整代码。
试试这些提示
如何在 RouterOS v7 上配置 [feature]?编写 CLI 命令以完成 [specific task]。
生成用于 RouterOS v7 上 [endpoint] 执行 [operation] 的 REST API 调用。包含身份验证头。
编写一个 RouterOS 脚本,使用脚本语言语法完成 [description of automation task]。
为什么 Linux 命令 [command] 在 RouterOS 上会失败?RouterOS 的等效命令是什么?
最佳实践
- 始终明确指定 RouterOS v7,以避免建议使用 v6 命令语法
- 在生产环境自动化中使用带 SSL 证书的 REST API,而非纯 HTTP
- 先在实验环境中测试 CLI 命令,因为 RouterOS 的语法与 Linux 不同
避免
- 不要假设 Linux 命令可以直接在 RouterOS 上运行而不检查语法差异
- 不要将 RouterOS v6 文档用于 v7 配置,因为命令结构不同
- 在脚本中使用 REST API 时不要跳过身份验证配置