شعار Routeros Syntax Inspection

Routeros Syntax Inspection

مؤسسة
tikoci
routeros-syntax-inspection

Inspecting and validating RouterOS command/script syntax against a live device via /console/inspect (highlight, completion, syntax, child) and :parse IL. Use when: validating RouterOS commands before execution, explaining or linting RouterOS scripts, building syntax-aware tooling (LSP servers, validators, agent explain/check commands), interpreting highlight token streams or :parse intermediate language, discovering enum values or argument schemas, or when the user mentions console/inspect, highlight tokens, parseIL, or RouterOS script validation.

Add to TypingMind

نظرة عامة

الناشرtikoci
المستودعrouteros-skills
اسم المهارةrouteros-syntax-inspection
النجوم
85
التفريعات
18
الملفات المرفقة
4
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 4

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها tikoci على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Routeros Syntax Inspection في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/tikoci/routeros-skills/tree/main/routeros-syntax-inspection
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tikoci/routeros-skills.git /tmp/routeros-skills
mkdir -p .claude/skills
cp -r /tmp/routeros-skills/routeros-syntax-inspection .claude/skills/routeros-syntax-inspection
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Routeros Syntax Inspection في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Routeros Syntax Inspection تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Routeros Syntax Inspection بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

RouterOS Syntax Inspection

Overview

RouterOS exposes its own parser over the REST API: /console/inspect classifies every byte of console input (highlight), proposes continuations (completion), returns structured help (syntax), and enumerates the command tree (child); the :parse scripting command returns the intermediate language (IL) the engine actually executes. Together these are the ground truth for "is this valid RouterOS?" — version-exact, package-exact, and even runtime-state-exact, which no static grammar can be.

This skill is a probe-selection and wire-format guide: which surface answers which question, how to read each response, and which claims the responses do and do not support. It is grounded in full-corpus captures (913 scripts × multiple RouterOS versions) published in tikoci/lsp-routeros-ts — the docs/ references there carry the full evidence 1.

"Parse RouterOS" is not one operation. Pick the probe for the question:

QuestionProbeWhat it cannot establish
Which span is a command, argument, variable, comment, live-state marker?request=highlightNested structure; value validity; anything after the first hard error
Is the script structurally valid; what blocks/expressions result?:parseSource ranges; partial IL on error; path/argument split without schema data
What is valid at this cursor position? Enum values?request=completionRequiredness; exhaustiveness of candidate lists; runtime acceptance
What paths, commands, arguments exist on this device?request=child + request=syntaxEnum values (those come from completion); required arguments
Which arguments are required?Execute-error probe (add with no args)Conditional requirements past the first discriminator

Details per surface: references/highlight.md, references/parseil.md, references/command-schema.md, references/validation.md.

For crawling the full command hierarchy (child traversal, schema/RAML/OpenAPI generation), see the routeros-command-tree skill — this skill covers the syntax/validity surfaces of the same /console/inspect endpoint.

Request shape

REST (basic auth, any RouterOS 7.x):

text
POST /rest/console/inspect
{"request": "highlight" | "completion" | "syntax" | "child",
 "input": "<console input>",     // optional
 "path":  "ip,address,add"}      // optional comma-joined menu tokens

Native API — the same four modes as =request= / =path= words:

text
/console/inspect
  =request=child
  =path=ip,address

path takes comma-joined menu tokens, never a slash command. Only the comma form walks the menu: system,license returns that menu's nodes, while system/license and /system/license return nothing on both transports, and a JSON array body ({"path":["system","license"]}) silently returns the root listing — a wrong answer that looks like a successful one. Measured on 7.23.7; the comma form was independently confirmed on 7.23.1 2.

Every successful response is a JSON array of flat all-string objects (REST) or one !re sentence per item (native). highlight, completion and syntax rows carry a type field naming the request type; request=child instead spends type on the row's role (self/child) and reports the node class in node-type. Beyond that, the four response shapes share nothing — treat them as four APIs behind one endpoint.

Version baseline and safety

  • Baseline: RouterOS 7.20.8 — a long-term-channel release, used here as the recommended floor: the parseIL and crash-path behavior below was captured on it 13. REST itself exists since 7.1beta4 (HTTPS-only at first 4); behavior below 7.20.8 is best-effort (7.9.2 was measured but harsher — see references/highlight.md), and RouterOS v6 has no REST API at all.
  • Always set a per-request timeout (a few seconds). Old versions can hang the whole REST server on specific inspect calls; a hung server also makes subsequent unrelated probes appear broken.
  • Known hazards (all measured, see 1 and 3):
HazardVersionsRule
request=syntax/completion at bare path do deadlocks the REST server≤ 7.20.8 (fixed by 7.21.4) 3Skip scripting-keyword paths (where, do, else, rule, command, on-error) on old/unknown versions; it is a conservative skip policy, not a timeless six-path crash rule
request=syntax with input, or command-level syntax, stalls ~60 sobserved on 7.9.2Query syntax by path only; feature-detect command-level lookups with a short timeout
input beyond 32,767 bytes rejectedallRoute oversized input to :parse (no cap) or reject it — never highlight a truncated copy and present it as validating the whole script
Highlight latency cliff near 28 KBobserved 7.23.xPrefer a :parse pre-check for big scripts (no such cliff, no 32 KB cap)
  • Distinguish [], timeout, and transport failure. An empty array is a real answer (nonexistent path); a timeout is not. Conflating them corrupts any cached conclusion.

Reading results — rules that prevent wrong claims

These are the measured behaviors that most often get summarized wrongly:

  1. Offsets and tokens are byte-based. RouterOS strings are single-byte data — the console has no Unicode awareness. Highlight emits exactly one token per input byte, and completion offset counts bytes as received on the wire (UTF-8 over REST, so non-ASCII characters occupy 2+ bytes and desynchronize byte offsets from UTF-16/JS string indexes). ASCII-normalize input first — replacing each char > 127 with one ASCII byte (?) keeps editor character positions aligned to RouterOS byte positions.
  2. One hard error, then silence. Both highlight and :parse stop at the first hard error. Highlight marks exactly one error byte and leaves the rest unclassified (none); :parse returns a message with line/column and no partial IL. Neither gives multi-error diagnostics in one call. Soft markers (obj-*, variable-undefined, syntax-obsolete) do not stop classification.
  3. none means unclassified, not "valid literal." Highlight accepts an obviously bad IP as none. Value validation is a different layer.
  4. obj-inactive / obj-disabled / obj-dynamic are live-state classifications, not grammar errors. A disabled service or dynamic route table is a perfectly valid reference. Diagnostic severity is the consumer's policy decision — do not hard-code these as "invalid syntax."
  5. An undeclared $name is usually not an error. It classifies as variable-parameter (it may be supplied at call time). The "probably a typo" signal is variable-undefined — a bare unresolvable identifier in expression position.
  6. Completion candidates are observed suggestions, not proven-closed enums. Preserve "observed candidates" provenance unless independent evidence proves closure.
  7. Results are stateful. Token classes and candidates depend on the RouterOS version, installed packages, and current object flags. Record version + package manifest with any captured result; a snapshot from one router is only approximately valid for another.

Validating a command via completion

The grounded mechanics of "check before you run" (full detail: references/command-schema.md):

  • Probe with the cursor immediately after the word under test — before =, whitespace, or the next token. Completion verdicts are cursor-local: advancing past an invalid word can hide its sentinel.
  • Sentinel rows (preference:"-20", empty completion, text:"unknown command"/"unknown parameter") classify the word at their offset — and also appear prospectively at the end of valid input, so presence alone is not a verdict. Decision rule (7.21+): sentinel with no completing candidate → unknown name; sentinel plus candidates at the same offset → ambiguous prefix; candidates only → valid partial; a nonexistent path returns [] outright.
  • Feature-detect on old versions: 7.9.2 emits the unknown-command sentinel but returns bare [] for an unknown typed argument.
  • Passing inspect validation is necessary, not sufficient. There is a measured inspect-vs-runtime gap: /console/inspect accepts forms the device rejects at execution (e.g. blackhole=yes on a route, where the runtime wants the bare blackhole flag) 5. Only execution on an appropriate target proves runtime acceptance.

Minimum pipeline for a syntax "explain"

  1. Segment input statically (find command boundaries; preserve offsets).
  2. highlight the ASCII-normalized input → lexical spans + first error.
  3. :parse only when structure or an error message is needed → nested IL or line/column message. Align its error with highlight's error byte.
  4. child/syntax/completion (or a same-version schema snapshot) → split IL's fused path/argument forms, enumerate arguments, fetch enums.
  5. Enrich with docs/changelog prose — but the live device wins for what its inspect surface exposes; only execution proves runtime acceptance.

Steps 1–2 suffice for a lightweight explain; block/scope analysis needs 3; rich command help needs 4–5. Execution probes (required-args discovery, /rest/execute) mutate state — run them only on explicit request against an appropriate target.

Whatever the depth, keep provenance with every derived fact: source probe, RouterOS version + packages, path context, whether the claim is a direct response or derived, normalization applied, truncation, and outcome (ok / empty / timeout / transport-error).

References

Footnotes

  1. Full format references with capture artifacts: highlight-format.md, parseil-format.md, inspect-shapes.md in tikoci/lsp-routeros-ts — 913-script corpus swept on 7.9.2/7.23.2/7.24rc2 (highlight, inspect shapes) and 7.20.8/7.22.1/7.23rc1 (parseIL). ↩ ↩2 ↩3

  2. tikoci/centrs commands/api/AGENTS.md — CHR 7.23.1 grounding spikes for the comma path form and for /execute as-string on both transports. ↩

  3. MikroTik support case SUP-127641; per-version probe data in tikoci/restraml (deep-inspect.ts CRASH_PATHS notes and docs/<version>/deep-inspect.json crashPathsCrashed): bare do hangs syntax/completion on 7.20.8 at both 128 MB and 512 MB RAM; all six paths return instantly on 7.21.4+. ↩ ↩2 ↩3

  4. MikroTik REST API introduction in 7.1beta4: https://help.mikrotik.com/docs/spaces/ROS/pages/47579162/REST+API. ↩

  5. tikoci/bench-routeros-tools REPORT.md — the blackhole=yes inspect-vs-runtime case. ↩

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Routeros Syntax Inspection؟

Inspecting and validating RouterOS command/script syntax against a live device via /console/inspect (highlight, completion, syntax, child) and :parse IL. Use when: validating RouterOS commands before execution, explaining or linting RouterOS scripts, building syntax-aware tooling (LSP servers, validators, agent explain/check commands), interpreting highlight token streams or :parse intermediate language, discovering enum values or argument schemas, or when the user mentions console/inspect, highlight tokens, parseIL, or RouterOS script validation.

لماذا تستخدم Routeros Syntax Inspection على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Routeros Syntax Inspection عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Routeros Syntax Inspection في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/tikoci/routeros-skills/tree/main/routeros-syntax-inspection. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Routeros Syntax Inspection؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Routeros Syntax Inspection؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Routeros Syntax Inspection معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Routeros Syntax Inspection مجانية؟

نعم. نشرها tikoci على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل
شعار affaan-m

Brand Voice

affaan-m
المجتمعشائع

أنشئ ملفًا لأسلوب الكتابة مستمدًا من مصادر حقيقية، مثل المنشورات والمقالات وملاحظات الإطلاق والوثائق ونصوص المواقع، ثم أعد استخدامه في المحتوى والتواصل الخارجي وسير عمل الشبكات الاجتماعية. استخدمها عندما يريد المستخدم…

40.4K
270.2K
الملفات: 2
عرض
شعار affaan-m

Competitive Platform Analysis

affaan-m
المجتمعشائع

استخدمها عند تحديد نطاق المشهد التنافسي — أي تحديد المنافسين وتصنيفهم وفرزهم حسب النتائج قبل بدء أي مقارنة معيارية. تحدد من يُعد منافسًا، والفئة التي ينتمي إليها…

40.4K
270.2K
الملفات: 1
عرض
شعار affaan-m

Content Engine

affaan-m
المجتمعشائع

أنشئ أنظمة محتوى ملائمة لكل منصة على X وLinkedIn وTikTok وYouTube والنشرات البريدية، وحملات متعددة المنصات يعاد توظيف محتواها. استخدمها عندما تريد منشورات أو سلاسل منشورات أو نصوصًا أو تقاويم محتوى…

40.4K
270.2K
الملفات: 1
عرض
شعار mattpocock

Domain Modeling

mattpocock
المجتمعشائع

أنشئ النموذجَ النطاقي للمشروع وحسّنه. استخدمها عند مناقشة مصطلحات قاعدة الكود، أو كتابة ملف CONTEXT.md أو تعديله، أو تسجيل ADR أو تعديله.

22.3K
264.4K
الملفات: 3
عرض

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇