[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F0ZQVWVHRD2843VFMB2V6D":3,"skill-same:01M6F0ZQVWVHRD2843VFMB2V6D":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6F0ZQVWVHRD2843VFMB2V6D","routeros-command-tree",null,"RouterOS command tree introspection via \u002Fconsole\u002Finspect API. Use when: building tools that parse RouterOS commands, generating API schemas from RouterOS, working with \u002Fconsole\u002Finspect, 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.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Ftikoci\u002Frouteros-command-tree\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"command","routeros command tree","cli","console","REST","Tools","openapi","introspection","api","user","use","commands","generation","mapping","via","with","2026-11-10 10:12:30",false,"---\nname: routeros-command-tree\ndescription: \"RouterOS command tree introspection via \u002Fconsole\u002Finspect API. Use when: building tools that parse RouterOS commands, generating API schemas from RouterOS, working with \u002Fconsole\u002Finspect, 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.\"\n---\n\n# RouterOS Command Tree & \u002Fconsole\u002Finspect\n\n## Overview\n\nRouterOS organizes all configuration and commands in a **hierarchical tree**. Every path in the CLI\n(like `\u002Fip\u002Faddress\u002Fadd`) corresponds to a node in this tree. The `\u002Fconsole\u002Finspect` REST endpoint\nlets you **programmatically explore the entire tree** — this is how tools like `restraml` (RAML\u002FOpenAPI\nschema generator) and `rosetta` (MCP command lookup) build their databases.\n\n## The Command Tree Structure\n\nRouterOS's command hierarchy has four node types:\n\n| Node Type | Meaning | Example |\n|---|---|---|\n| `dir` | Directory — contains child paths | `\u002Fip`, `\u002Fsystem` |\n| `path` | Path — a navigable level (often has commands) | `\u002Fip\u002Faddress`, `\u002Finterface\u002Fbridge` |\n| `cmd` | Command — an executable action | `add`, `set`, `print`, `remove`, `get`, `export` |\n| `arg` | Argument — a parameter to a command | `address=`, `interface=`, `disabled=` |\n\n### Tree Example\n\n```\n\u002F (root dir)\n├── ip\u002F (dir)\n│   ├── address\u002F (path)\n│   │   ├── add (cmd)\n│   │   │   ├── address (arg) — \"IP address\"\n│   │   │   ├── interface (arg) — \"Interface name\"\n│   │   │   └── disabled (arg) — \"yes | no\"\n│   │   ├── set (cmd)\n│   │   ├── remove (cmd)\n│   │   ├── get (cmd)\n│   │   ├── print (cmd)\n│   │   └── export (cmd)\n│   ├── route\u002F (path)\n│   │   └── ...\n│   └── dns\u002F (path)\n│       ├── set (cmd)\n│       ├── cache\u002F (path)\n│       │   ├── print (cmd)\n│       │   └── flush (cmd)\n│       └── ...\n├── interface\u002F (dir)\n│   └── ...\n├── system\u002F (dir)\n│   └── ...\n└── ...\n```\n\n## \u002Fconsole\u002Finspect API\n\n### Endpoint\n\n```\nPOST \u002Frest\u002Fconsole\u002Finspect\n```\n\nRequires basic authentication. Available on all RouterOS 7.x versions.\n\n### Request Types\n\n| Request | Purpose | Returns |\n|---|---|---|\n| `child` | List children of a path | Array of `{type: \"child\", name, \"node-type\"}` |\n| `syntax` | Get help text for a node | Array of `{type: \"syntax\", text}` |\n| `highlight` | Syntax highlighting data | Tokenized output (rarely used) |\n| `completion` | Tab-completion suggestions | Completion candidates |\n\n### Listing Children\n\n```typescript\n\u002F\u002F List children of \u002Fip\nconst children = await fetch(`${base}\u002Fconsole\u002Finspect`, {\n  method: \"POST\",\n  headers: { ...authHeaders, \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({\n    request: \"child\",\n    path: \"ip\",\n  }),\n}).then(r => r.json());\n\n\u002F\u002F Response:\n\u002F\u002F [\n\u002F\u002F   { \"type\": \"child\", \"name\": \"address\",    \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"arp\",        \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"cloud\",      \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"dhcp-client\", \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"dns\",        \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"route\",      \"node-type\": \"path\" },\n\u002F\u002F   ...\n\u002F\u002F ]\n```\n\n### Getting Syntax Help\n\n```typescript\n\u002F\u002F Get description for \u002Fip\u002Faddress\u002Fadd → address argument\nconst syntax = await fetch(`${base}\u002Fconsole\u002Finspect`, {\n  method: \"POST\",\n  headers: { ...authHeaders, \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({\n    request: \"syntax\",\n    path: \"ip,address,add,address\",   \u002F\u002F comma-separated path\n  }),\n}).then(r => r.json());\n\n\u002F\u002F Response:\n\u002F\u002F [{ \"type\": \"syntax\", \"text\": \"IP address\" }]\n```\n\n### Path Format\n\nThe `path` field uses **comma-separated** segments (not slashes):\n- Root: `\"\"` (empty string)\n- `\u002Fip`: `\"ip\"`\n- `\u002Fip\u002Faddress`: `\"ip,address\"`\n- `\u002Fip\u002Faddress\u002Fadd`: `\"ip,address,add\"`\n- `\u002Fip\u002Faddress\u002Fadd → address arg`: `\"ip,address,add,address\"`\n\nWhen using the JavaScript `Array.toString()` method, this comma-separated format is produced\nnaturally from an array: `[\"ip\", \"address\", \"add\"].toString()` → `\"ip,address,add\"`.\n\n## Tree Traversal Pattern\n\nTo walk the entire tree recursively:\n\n```typescript\nasync function walkTree(path = [], tree = {}) {\n  const children = await fetchInspect(\"child\", path.toString());\n\n  for (const child of children) {\n    if (child.type !== \"child\") continue;\n\n    const childPath = [...path, child.name];\n    tree[child.name] = { _type: child[\"node-type\"] };\n\n    \u002F\u002F For args, fetch the syntax description — but NOT inside dangerous subtrees\n    if (child[\"node-type\"] === \"arg\") {\n      if (DANGEROUS_PATHS.some(p => childPath.includes(p))) continue;\n\n      const syntax = await fetchInspect(\"syntax\", childPath.toString());\n      if (syntax.length === 1 && syntax[0].text.length > 0) {\n        tree[child.name].desc = syntax[0].text;\n      }\n    }\n\n    \u002F\u002F Recurse into this child (child enumeration is safe even in dangerous subtrees)\n    await walkTree(childPath, tree[child.name]);\n  }\n\n  return tree;\n}\n```\n\n### Dangerous Paths — Must Skip\n\nThese path segments **crash the RouterOS REST server** when their `arg` nodes are queried\nfor syntax via `\u002Fconsole\u002Finspect`. Always skip syntax lookups for args inside subtrees\ncontaining any of these names:\n\n```\nwhere, do, else, rule, command, on-error\n```\n\nThese are RouterOS scripting constructs. Specifically, **`fetchSyntax()` on `arg` node-types**\nwithin these subtrees terminates the HTTP server process. Enumerating children (`child` request)\nis safe even inside these paths — only the syntax\u002Fdescription lookup for arguments crashes.\n\nThe conservative approach (used in the example above) skips the entire arg when any ancestor\nmatches a dangerous path. The actual `rest2raml.js` implementation matches this pattern.\n\n```typescript\nconst DANGEROUS_PATHS = [\"where\", \"do\", \"else\", \"rule\", \"command\", \"on-error\"];\n```\n\n## CLI Command → REST Verb Mapping\n\nRouterOS CLI commands map to HTTP verbs in the REST API:\n\n| CLI Command | HTTP Verb | REST URL Pattern | Notes |\n|---|---|---|---|\n| `get` (print) | `GET` | `\u002Frest\u002Fip\u002Faddress` | Returns array of all entries |\n| `get` (single) | `GET` | `\u002Frest\u002Fip\u002Faddress\u002F*1` | Single entry by ID |\n| `add` | `PUT` | `\u002Frest\u002Fip\u002Faddress` | **Creates** new entry (not POST!) |\n| `set` | `PATCH` | `\u002Frest\u002Fip\u002Faddress\u002F*1` | Updates existing entry |\n| `remove` | `DELETE` | `\u002Frest\u002Fip\u002Faddress\u002F*1` | Deletes entry by ID |\n| `print` | `POST` | `\u002Frest\u002Fip\u002Faddress\u002Fprint` | Action-style (also works as GET) |\n| Other commands | `POST` | `\u002Frest\u002Fpath\u002Fcommand` | Action — reboot, flush, etc. |\n\n**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.\n\n### RAML\u002FOpenAPI Schema Generation\n\nWhen generating API schemas from the command tree:\n\n1. Walk the tree to collect all paths, commands, and arguments\n2. For each `cmd` node:\n   - `get` → generates both `GET \u002Fpath` (list) and `GET \u002Fpath\u002F{id}` (single)\n   - `add` → generates `PUT \u002Fpath` with arg-based request body\n   - `set` → generates `PATCH \u002Fpath\u002F{id}` with arg-based request body\n   - `remove` → generates `DELETE \u002Fpath\u002F{id}`\n   - Other commands → `POST \u002Fpath\u002Fcommand`\n3. For each `arg` under a command, generate request body properties or query parameters\n4. The `desc` field from syntax lookups becomes the description\n\n### The .proplist and .query Parameters\n\nAll POST-based command endpoints accept two special parameters:\n- `.proplist` — selects which properties to return (like SQL SELECT)\n- `.query` — filter expression array (like SQL WHERE)\n\nThese are RouterOS REST API conventions, not standard REST patterns.\n\n## Output Formats\n\nThe inspect tree can be converted to multiple schema formats:\n\n### inspect.json (Raw Output)\n\nThe raw tree as returned by recursive `\u002Fconsole\u002Finspect` calls. Each node has:\n```json\n{\n  \"address\": {\n    \"_type\": \"path\",\n    \"add\": {\n      \"_type\": \"cmd\",\n      \"address\": { \"_type\": \"arg\", \"desc\": \"IP address\" },\n      \"interface\": { \"_type\": \"arg\", \"desc\": \"Interface name\" }\n    },\n    \"set\": { \"_type\": \"cmd\", ... },\n    \"print\": { \"_type\": \"cmd\", ... }\n  }\n}\n```\n\n### RAML 1.0 (schema.raml)\n\nConverted to RAML 1.0 resource\u002Fmethod notation:\n```yaml\n\u002Fip:\n  \u002Faddress:\n    get:\n      queryParameters: ...\n      responses: ...\n    put:\n      body:\n        application\u002Fjson:\n          properties:\n            address: { type: any, description: \"IP address\" }\n    \u002F{id}:\n      get: ...\n      patch: ...\n      delete: ...\n```\n\n### OpenAPI 3.0 (openapi.json)\n\nStandard OpenAPI 3.0 schema generated from the same inspect tree (7.21.1+).\n\n## The inspect.json Data Model\n\nEach version's `inspect.json` is the **canonical source of truth** for that RouterOS version's\ncommand tree. It captures:\n\n- Every navigable path in the CLI hierarchy\n- Every executable command at each path level\n- Every argument (parameter) for each command\n- Syntax descriptions for arguments\n\nTools can parse `inspect.json` offline without needing a live router — set `INSPECTFILE` env var\nand the schema generator will use the cached file instead of querying a router.\n\n## Common Patterns for Working with the Tree\n\n### Finding Commands at a Path\n\n```typescript\n\u002F\u002F Given an inspect.json node for \u002Fip\u002Faddress\nconst node = inspectData.ip.address;\n\n\u002F\u002F Commands are children with _type === \"cmd\"\nconst commands = Object.entries(node)\n  .filter(([key, val]) => val._type === \"cmd\")\n  .map(([key]) => key);\n\u002F\u002F → [\"add\", \"set\", \"remove\", \"get\", \"print\", \"export\", ...]\n```\n\n### Finding Arguments for a Command\n\n```typescript\n\u002F\u002F Arguments of \u002Fip\u002Faddress\u002Fadd\nconst addCmd = inspectData.ip.address.add;\nconst args = Object.entries(addCmd)\n  .filter(([key, val]) => val._type === \"arg\")\n  .map(([key, val]) => ({ name: key, description: val.desc }));\n\u002F\u002F → [{name: \"address\", description: \"IP address\"}, ...]\n```\n\n### Traversing Directories\n\n```typescript\n\u002F\u002F Directories and paths (navigable children)\nconst children = Object.entries(node)\n  .filter(([key, val]) => val._type === \"dir\" || val._type === \"path\")\n  .map(([key]) => key);\n```\n\n## Performance Notes\n\n- **Full tree traversal takes many minutes** against a live router (thousands of HTTP requests,\n  each a separate POST to `\u002Fconsole\u002Finspect`). With KVM acceleration the CHR responds quickly,\n  but the sheer number of sequential requests adds up.\n- Each `\u002Fconsole\u002Finspect` call is a separate HTTP request — no batch API\n- Use `INSPECTFILE` for development\u002Ftesting to avoid repeated live queries\n- The tree is version-specific — different RouterOS versions have different command sets\n- Extra packages (container, iot, zerotier, etc.) add additional command tree branches\n\n## Additional Resources\n\n- For REST API details: see `routeros-fundamentals` skill → [REST API patterns](..\u002Frouteros-fundamentals\u002Freferences\u002Frest-api-patterns.md)\n- For running a CHR to query: see the `routeros-qemu-chr` skill\n- For \u002Fapp YAML format (a feature visible in the tree under 7.22+): see the `routeros-app-yaml` skill\n","# RouterOS Command Tree & \u002Fconsole\u002Finspect\n\n## Overview\n\nRouterOS organizes all configuration and commands in a **hierarchical tree**. Every path in the CLI\n(like `\u002Fip\u002Faddress\u002Fadd`) corresponds to a node in this tree. The `\u002Fconsole\u002Finspect` REST endpoint\nlets you **programmatically explore the entire tree** — this is how tools like `restraml` (RAML\u002FOpenAPI\nschema generator) and `rosetta` (MCP command lookup) build their databases.\n\n## The Command Tree Structure\n\nRouterOS's command hierarchy has four node types:\n\n| Node Type | Meaning | Example |\n|---|---|---|\n| `dir` | Directory — contains child paths | `\u002Fip`, `\u002Fsystem` |\n| `path` | Path — a navigable level (often has commands) | `\u002Fip\u002Faddress`, `\u002Finterface\u002Fbridge` |\n| `cmd` | Command — an executable action | `add`, `set`, `print`, `remove`, `get`, `export` |\n| `arg` | Argument — a parameter to a command | `address=`, `interface=`, `disabled=` |\n\n### Tree Example\n\n```\n\u002F (root dir)\n├── ip\u002F (dir)\n│   ├── address\u002F (path)\n│   │   ├── add (cmd)\n│   │   │   ├── address (arg) — \"IP address\"\n│   │   │   ├── interface (arg) — \"Interface name\"\n│   │   │   └── disabled (arg) — \"yes | no\"\n│   │   ├── set (cmd)\n│   │   ├── remove (cmd)\n│   │   ├── get (cmd)\n│   │   ├── print (cmd)\n│   │   └── export (cmd)\n│   ├── route\u002F (path)\n│   │   └── ...\n│   └── dns\u002F (path)\n│       ├── set (cmd)\n│       ├── cache\u002F (path)\n│       │   ├── print (cmd)\n│       │   └── flush (cmd)\n│       └── ...\n├── interface\u002F (dir)\n│   └── ...\n├── system\u002F (dir)\n│   └── ...\n└── ...\n```\n\n## \u002Fconsole\u002Finspect API\n\n### Endpoint\n\n```\nPOST \u002Frest\u002Fconsole\u002Finspect\n```\n\nRequires basic authentication. Available on all RouterOS 7.x versions.\n\n### Request Types\n\n| Request | Purpose | Returns |\n|---|---|---|\n| `child` | List children of a path | Array of `{type: \"child\", name, \"node-type\"}` |\n| `syntax` | Get help text for a node | Array of `{type: \"syntax\", text}` |\n| `highlight` | Syntax highlighting data | Tokenized output (rarely used) |\n| `completion` | Tab-completion suggestions | Completion candidates |\n\n### Listing Children\n\n```typescript\n\u002F\u002F List children of \u002Fip\nconst children = await fetch(`${base}\u002Fconsole\u002Finspect`, {\n  method: \"POST\",\n  headers: { ...authHeaders, \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({\n    request: \"child\",\n    path: \"ip\",\n  }),\n}).then(r => r.json());\n\n\u002F\u002F Response:\n\u002F\u002F [\n\u002F\u002F   { \"type\": \"child\", \"name\": \"address\",    \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"arp\",        \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"cloud\",      \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"dhcp-client\", \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"dns\",        \"node-type\": \"path\" },\n\u002F\u002F   { \"type\": \"child\", \"name\": \"route\",      \"node-type\": \"path\" },\n\u002F\u002F   ...\n\u002F\u002F ]\n```\n\n### Getting Syntax Help\n\n```typescript\n\u002F\u002F Get description for \u002Fip\u002Faddress\u002Fadd → address argument\nconst syntax = await fetch(`${base}\u002Fconsole\u002Finspect`, {\n  method: \"POST\",\n  headers: { ...authHeaders, \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({\n    request: \"syntax\",\n    path: \"ip,address,add,address\",   \u002F\u002F comma-separated path\n  }),\n}).then(r => r.json());\n\n\u002F\u002F Response:\n\u002F\u002F [{ \"type\": \"syntax\", \"text\": \"IP address\" }]\n```\n\n### Path Format\n\nThe `path` field uses **comma-separated** segments (not slashes):\n- Root: `\"\"` (empty string)\n- `\u002Fip`: `\"ip\"`\n- `\u002Fip\u002Faddress`: `\"ip,address\"`\n- `\u002Fip\u002Faddress\u002Fadd`: `\"ip,address,add\"`\n- `\u002Fip\u002Faddress\u002Fadd → address arg`: `\"ip,address,add,address\"`\n\nWhen using the JavaScript `Array.toString()` method, this comma-separated format is produced\nnaturally from an array: `[\"ip\", \"address\", \"add\"].toString()` → `\"ip,address,add\"`.\n\n## Tree Traversal Pattern\n\nTo walk the entire tree recursively:\n\n```typescript\nasync function walkTree(path = [], tree = {}) {\n  const children = await fetchInspect(\"child\", path.toString());\n\n  for (const child of children) {\n    if (child.type !== \"child\") continue;\n\n    const childPath = [...path, child.name];\n    tree[child.name] = { _type: child[\"node-type\"] };\n\n    \u002F\u002F For args, fetch the syntax description — but NOT inside dangerous subtrees\n    if (child[\"node-type\"] === \"arg\") {\n      if (DANGEROUS_PATHS.some(p => childPath.includes(p))) continue;\n\n      const syntax = await fetchInspect(\"syntax\", childPath.toString());\n      if (syntax.length === 1 && syntax[0].text.length > 0) {\n        tree[child.name].desc = syntax[0].text;\n      }\n    }\n\n    \u002F\u002F Recurse into this child (child enumeration is safe even in dangerous subtrees)\n    await walkTree(childPath, tree[child.name]);\n  }\n\n  return tree;\n}\n```\n\n### Dangerous Paths — Must Skip\n\nThese path segments **crash the RouterOS REST server** when their `arg` nodes are queried\nfor syntax via `\u002Fconsole\u002Finspect`. Always skip syntax lookups for args inside subtrees\ncontaining any of these names:\n\n```\nwhere, do, else, rule, command, on-error\n```\n\nThese are RouterOS scripting constructs. Specifically, **`fetchSyntax()` on `arg` node-types**\nwithin these subtrees terminates the HTTP server process. Enumerating children (`child` request)\nis safe even inside these paths — only the syntax\u002Fdescription lookup for arguments crashes.\n\nThe conservative approach (used in the example above) skips the entire arg when any ancestor\nmatches a dangerous path. The actual `rest2raml.js` implementation matches this pattern.\n\n```typescript\nconst DANGEROUS_PATHS = [\"where\", \"do\", \"else\", \"rule\", \"command\", \"on-error\"];\n```\n\n## CLI Command → REST Verb Mapping\n\nRouterOS CLI commands map to HTTP verbs in the REST API:\n\n| CLI Command | HTTP Verb | REST URL Pattern | Notes |\n|---|---|---|---|\n| `get` (print) | `GET` | `\u002Frest\u002Fip\u002Faddress` | Returns array of all entries |\n| `get` (single) | `GET` | `\u002Frest\u002Fip\u002Faddress\u002F*1` | Single entry by ID |\n| `add` | `PUT` | `\u002Frest\u002Fip\u002Faddress` | **Creates** new entry (not POST!) |\n| `set` | `PATCH` | `\u002Frest\u002Fip\u002Faddress\u002F*1` | Updates existing entry |\n| `remove` | `DELETE` | `\u002Frest\u002Fip\u002Faddress\u002F*1` | Deletes entry by ID |\n| `print` | `POST` | `\u002Frest\u002Fip\u002Faddress\u002Fprint` | Action-style (also works as GET) |\n| Other commands | `POST` | `\u002Frest\u002Fpath\u002Fcommand` | Action — reboot, flush, etc. |\n\n**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.\n\n### RAML\u002FOpenAPI Schema Generation\n\nWhen generating API schemas from the command tree:\n\n1. Walk the tree to collect all paths, commands, and arguments\n2. For each `cmd` node:\n   - `get` → generates both `GET \u002Fpath` (list) and `GET \u002Fpath\u002F{id}` (single)\n   - `add` → generates `PUT \u002Fpath` with arg-based request body\n   - `set` → generates `PATCH \u002Fpath\u002F{id}` with arg-based request body\n   - `remove` → generates `DELETE \u002Fpath\u002F{id}`\n   - Other commands → `POST \u002Fpath\u002Fcommand`\n3. For each `arg` under a command, generate request body properties or query parameters\n4. The `desc` field from syntax lookups becomes the description\n\n### The .proplist and .query Parameters\n\nAll POST-based command endpoints accept two special parameters:\n- `.proplist` — selects which properties to return (like SQL SELECT)\n- `.query` — filter expression array (like SQL WHERE)\n\nThese are RouterOS REST API conventions, not standard REST patterns.\n\n## Output Formats\n\nThe inspect tree can be converted to multiple schema formats:\n\n### inspect.json (Raw Output)\n\nThe raw tree as returned by recursive `\u002Fconsole\u002Finspect` calls. Each node has:\n```json\n{\n  \"address\": {\n    \"_type\": \"path\",\n    \"add\": {\n      \"_type\": \"cmd\",\n      \"address\": { \"_type\": \"arg\", \"desc\": \"IP address\" },\n      \"interface\": { \"_type\": \"arg\", \"desc\": \"Interface name\" }\n    },\n    \"set\": { \"_type\": \"cmd\", ... },\n    \"print\": { \"_type\": \"cmd\", ... }\n  }\n}\n```\n\n### RAML 1.0 (schema.raml)\n\nConverted to RAML 1.0 resource\u002Fmethod notation:\n```yaml\n\u002Fip:\n  \u002Faddress:\n    get:\n      queryParameters: ...\n      responses: ...\n    put:\n      body:\n        application\u002Fjson:\n          properties:\n            address: { type: any, description: \"IP address\" }\n    \u002F{id}:\n      get: ...\n      patch: ...\n      delete: ...\n```\n\n### OpenAPI 3.0 (openapi.json)\n\nStandard OpenAPI 3.0 schema generated from the same inspect tree (7.21.1+).\n\n## The inspect.json Data Model\n\nEach version's `inspect.json` is the **canonical source of truth** for that RouterOS version's\ncommand tree. It captures:\n\n- Every navigable path in the CLI hierarchy\n- Every executable command at each path level\n- Every argument (parameter) for each command\n- Syntax descriptions for arguments\n\nTools can parse `inspect.json` offline without needing a live router — set `INSPECTFILE` env var\nand the schema generator will use the cached file instead of querying a router.\n\n## Common Patterns for Working with the Tree\n\n### Finding Commands at a Path\n\n```typescript\n\u002F\u002F Given an inspect.json node for \u002Fip\u002Faddress\nconst node = inspectData.ip.address;\n\n\u002F\u002F Commands are children with _type === \"cmd\"\nconst commands = Object.entries(node)\n  .filter(([key, val]) => val._type === \"cmd\")\n  .map(([key]) => key);\n\u002F\u002F → [\"add\", \"set\", \"remove\", \"get\", \"print\", \"export\", ...]\n```\n\n### Finding Arguments for a Command\n\n```typescript\n\u002F\u002F Arguments of \u002Fip\u002Faddress\u002Fadd\nconst addCmd = inspectData.ip.address.add;\nconst args = Object.entries(addCmd)\n  .filter(([key, val]) => val._type === \"arg\")\n  .map(([key, val]) => ({ name: key, description: val.desc }));\n\u002F\u002F → [{name: \"address\", description: \"IP address\"}, ...]\n```\n\n### Traversing Directories\n\n```typescript\n\u002F\u002F Directories and paths (navigable children)\nconst children = Object.entries(node)\n  .filter(([key, val]) => val._type === \"dir\" || val._type === \"path\")\n  .map(([key]) => key);\n```\n\n## Performance Notes\n\n- **Full tree traversal takes many minutes** against a live router (thousands of HTTP requests,\n  each a separate POST to `\u002Fconsole\u002Finspect`). With KVM acceleration the CHR responds quickly,\n  but the sheer number of sequential requests adds up.\n- Each `\u002Fconsole\u002Finspect` call is a separate HTTP request — no batch API\n- Use `INSPECTFILE` for development\u002Ftesting to avoid repeated live queries\n- The tree is version-specific — different RouterOS versions have different command sets\n- Extra packages (container, iot, zerotier, etc.) add additional command tree branches\n\n## Additional Resources\n\n- For REST API details: see `routeros-fundamentals` skill → [REST API patterns](..\u002Frouteros-fundamentals\u002Freferences\u002Frest-api-patterns.md)\n- For running a CHR to query: see the `routeros-qemu-chr` skill\n- For \u002Fapp YAML format (a feature visible in the tree under 7.22+): see the `routeros-app-yaml` skill\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Ftikoci\u002Frouteros-command-tree",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill routeros-command-tree",{"tool":55,"command":56},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill routeros-command-tree",{"tool":58,"command":59},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill routeros-command-tree","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Ftikoci\u002Frouteros-command-tree\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"skill-report.json","REFERENCE","参考文档",10037,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Ftikoci\u002Frouteros-command-tree\u002Fskill-report.json",[70,79,88,97,103,109],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":35},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[76,77,78],"model","model hierarchy","model hierarchy skill",{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":35},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[85,86,87],"MCP","zoom","zoom mcp",{"skillNo":89,"name":90,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":35},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[94,95,96,86],"sdk","zoom apps sdk","apps",{"skillNo":98,"name":99,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":35},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[99],{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":35},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[105],{"skillNo":110,"name":111,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":35},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[111]]