routeros-command-tree
RouterOS command tree introspection via /console/inspect API. Use when: building tools that parse RouterOS commands, generating API schemas from RouterOS, working with /console/inspect, mapping CLI commands to REST verbs, traversing the RouterOS command hierarchy, or when the user mentions inspect, command tree, RAML, or OpenAPI generation for RouterOS.
What this skill does
# RouterOS Command Tree & /console/inspect
## Overview
RouterOS organizes all configuration and commands in a **hierarchical tree**. Every path in the CLI
(like `/ip/address/add`) corresponds to a node in this tree. The `/console/inspect` REST endpoint
lets you **programmatically explore the entire tree** — this is how tools like `restraml` (RAML/OpenAPI
schema generator) and `rosetta` (MCP command lookup) build their databases.
## The Command Tree Structure
RouterOS's command hierarchy has four node types:
| Node Type | Meaning | Example |
|---|---|---|
| `dir` | Directory — contains child paths | `/ip`, `/system` |
| `path` | Path — a navigable level (often has commands) | `/ip/address`, `/interface/bridge` |
| `cmd` | Command — an executable action | `add`, `set`, `print`, `remove`, `get`, `export` |
| `arg` | Argument — a parameter to a command | `address=`, `interface=`, `disabled=` |
### Tree Example
```
/ (root dir)
├── ip/ (dir)
│ ├── address/ (path)
│ │ ├── add (cmd)
│ │ │ ├── address (arg) — "IP address"
│ │ │ ├── interface (arg) — "Interface name"
│ │ │ └── disabled (arg) — "yes | no"
│ │ ├── set (cmd)
│ │ ├── remove (cmd)
│ │ ├── get (cmd)
│ │ ├── print (cmd)
│ │ └── export (cmd)
│ ├── route/ (path)
│ │ └── ...
│ └── dns/ (path)
│ ├── set (cmd)
│ ├── cache/ (path)
│ │ ├── print (cmd)
│ │ └── flush (cmd)
│ └── ...
├── interface/ (dir)
│ └── ...
├── system/ (dir)
│ └── ...
└── ...
```
## /console/inspect API
### Endpoint
```
POST /rest/console/inspect
```
Requires basic authentication. Available on all RouterOS 7.x versions.
### Request Types
| Request | Purpose | Returns |
|---|---|---|
| `child` | List children of a path | Array of `{type: "child", name, "node-type"}` |
| `syntax` | Get help text for a node | Array of `{type: "syntax", text}` |
| `highlight` | Syntax highlighting data | Tokenized output (rarely used) |
| `completion` | Tab-completion suggestions | Completion candidates |
### Listing Children
```typescript
// List children of /ip
const children = await fetch(`${base}/console/inspect`, {
method: "POST",
headers: { ...authHeaders, "Content-Type": "application/json" },
body: JSON.stringify({
request: "child",
path: "ip",
}),
}).then(r => r.json());
// Response:
// [
// { "type": "child", "name": "address", "node-type": "path" },
// { "type": "child", "name": "arp", "node-type": "path" },
// { "type": "child", "name": "cloud", "node-type": "path" },
// { "type": "child", "name": "dhcp-client", "node-type": "path" },
// { "type": "child", "name": "dns", "node-type": "path" },
// { "type": "child", "name": "route", "node-type": "path" },
// ...
// ]
```
### Getting Syntax Help
```typescript
// Get description for /ip/address/add → address argument
const syntax = await fetch(`${base}/console/inspect`, {
method: "POST",
headers: { ...authHeaders, "Content-Type": "application/json" },
body: JSON.stringify({
request: "syntax",
path: "ip,address,add,address", // comma-separated path
}),
}).then(r => r.json());
// Response:
// [{ "type": "syntax", "text": "IP address" }]
```
### Path Format
The `path` field uses **comma-separated** segments (not slashes):
- Root: `""` (empty string)
- `/ip`: `"ip"`
- `/ip/address`: `"ip,address"`
- `/ip/address/add`: `"ip,address,add"`
- `/ip/address/add → address arg`: `"ip,address,add,address"`
When using the JavaScript `Array.toString()` method, this comma-separated format is produced
naturally from an array: `["ip", "address", "add"].toString()` → `"ip,address,add"`.
## Tree Traversal Pattern
To walk the entire tree recursively:
```typescript
async function walkTree(path = [], tree = {}) {
const children = await fetchInspect("child", path.toString());
for (const child of children) {
if (child.type !== "child") continue;
const childPath = [...path, child.name];
tree[child.name] = { _type: child["node-type"] };
// For args, fetch the syntax description — but NOT inside dangerous subtrees
if (child["node-type"] === "arg") {
if (DANGEROUS_PATHS.some(p => childPath.includes(p))) continue;
const syntax = await fetchInspect("syntax", childPath.toString());
if (syntax.length === 1 && syntax[0].text.length > 0) {
tree[child.name].desc = syntax[0].text;
}
}
// Recurse into this child (child enumeration is safe even in dangerous subtrees)
await walkTree(childPath, tree[child.name]);
}
return tree;
}
```
### Dangerous Paths — Must Skip
These path segments **crash the RouterOS REST server** when their `arg` nodes are queried
for syntax via `/console/inspect`. Always skip syntax lookups for args inside subtrees
containing any of these names:
```
where, do, else, rule, command, on-error
```
These are RouterOS scripting constructs. Specifically, **`fetchSyntax()` on `arg` node-types**
within these subtrees terminates the HTTP server process. Enumerating children (`child` request)
is safe even inside these paths — only the syntax/description lookup for arguments crashes.
The conservative approach (used in the example above) skips the entire arg when any ancestor
matches a dangerous path. The actual `rest2raml.js` implementation matches this pattern.
```typescript
const DANGEROUS_PATHS = ["where", "do", "else", "rule", "command", "on-error"];
```
## CLI Command → REST Verb Mapping
RouterOS CLI commands map to HTTP verbs in the REST API:
| CLI Command | HTTP Verb | REST URL Pattern | Notes |
|---|---|---|---|
| `get` (print) | `GET` | `/rest/ip/address` | Returns array of all entries |
| `get` (single) | `GET` | `/rest/ip/address/*1` | Single entry by ID |
| `add` | `PUT` | `/rest/ip/address` | **Creates** new entry (not POST!) |
| `set` | `PATCH` | `/rest/ip/address/*1` | Updates existing entry |
| `remove` | `DELETE` | `/rest/ip/address/*1` | Deletes entry by ID |
| `print` | `POST` | `/rest/ip/address/print` | Action-style (also works as GET) |
| Other commands | `POST` | `/rest/path/command` | Action — reboot, flush, etc. |
**Key insight:** REST `PUT` = create, `PATCH` = update. This is the **opposite** of many REST API conventions where PUT is idempotent update and POST is create.
### RAML/OpenAPI Schema Generation
When generating API schemas from the command tree:
1. Walk the tree to collect all paths, commands, and arguments
2. For each `cmd` node:
- `get` → generates both `GET /path` (list) and `GET /path/{id}` (single)
- `add` → generates `PUT /path` with arg-based request body
- `set` → generates `PATCH /path/{id}` with arg-based request body
- `remove` → generates `DELETE /path/{id}`
- Other commands → `POST /path/command`
3. For each `arg` under a command, generate request body properties or query parameters
4. The `desc` field from syntax lookups becomes the description
### The .proplist and .query Parameters
All POST-based command endpoints accept two special parameters:
- `.proplist` — selects which properties to return (like SQL SELECT)
- `.query` — filter expression array (like SQL WHERE)
These are RouterOS REST API conventions, not standard REST patterns.
## Output Formats
The inspect tree can be converted to multiple schema formats:
### inspect.json (Raw Output)
The raw tree as returned by recursive `/console/inspect` calls. Each node has:
```json
{
"address": {
"_type": "path",
"add": {
"_type": "cmd",
"address": { "_type": "arg", "desc": "IP address" },
"interface": { "_type": "arg", "desc": "Interface name" }
},
"set": { "_type": "cmd", ... },
"print": { "_type": "cmd", ... }
}
}
```
### RAML 1.0 (schema.raml)
Converted to RAML 1.0 resource/method notation:
```yaml
/ip:
/address:
get:
queryParameters: ...
responses: ...
put:
body:
application/json:
properties:
address: { type: any, description:Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.