winbox-native-dev

A development guide for extending WinBoxNative, a C# transport that communicates with MikroTik's WinBox protocol. It covers structured data operations, field encoding, actions, and streaming monitors.

In plain words
What is it for?
Use it to add or fix handler mappings, field encoders and decoders, list or singleton fields, action commands, and streaming monitors.
Why use it?
It reduces the risk of guessing how protocol values are represented or mapped to the C# code.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/danikf/tik4net/winbox-native-dev
Any agent
npx skills add danikf/tik4net --skill winbox-native-dev
Clone the repo
git clone --depth 1 https://github.com/danikf/tik4net

Made for: Claude Code, Codex.

Per session 211 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,160 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00211 $0.05160
Opus 5 $0.00105 $0.02580
Sonnet 5 $0.00042 $0.01032
Haiku 4.5 $0.00021 $0.00516

Measured 2d ago against content hash 9569f9b2ca40, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

winbox-native-dev scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/winbox-native-dev/SKILL.md · 242 lines

How it starts

The opening of the file, as written. The whole thing — 242 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WinBoxNative (M2) feature development

The native transport speaks the webfig /jsproxy M2 protocol (TCP 8291, EC-SRP5 + AES) — structured getall/get-singleton/set/add/… , NOT a terminal. To add or fix anything here you triangulate three sources of truth and map them onto the C# layer. Never guess a wire encoding — read it from master*.js ([[feedback_winbox_encoding_from_js]]).

The three sources of truth

1. .jg catalog — handler paths, field keys, wire types, window kind

A .jg is a tolerant JS object literal describing every WinBox window. It is the version-volatile source for handler numbers + field keys/types. Format reference: Docs/jg-catalog-format.md.

  • path:[a,b] → M2 handler (SYS_TO 0xFF0001). type:'map' = list (getall), 'item' = singleton (get-singleton), 'query'/'action'+pollcmd = streaming monitor, 'doit'/'action'+cmd = action verb.
  • id:'<prefix><hex>' → a field: prefix letter = wire type (u=u32, U=u32[], s=string, S=string[], b=bool, r=raw, m=addr, x=u64; uppercase = array), hex = the M2 key.
  • type:'<uitype>' on the node = the UI-semantic type that drives typed encoding (ipaddr, network, macaddr, enm, set, multinumberrange, numberrangelist, addr, …) — more specific than the wire type.
  • Wrappers: opt(present-flag bool) / not(negation bool) wrap a value leaf; maskid = the netmask/ range-end sibling key; values:{type:'dynamic',path:[…]} = a reference dropdown; values:{map:…} = a static enum; nameval:'…' = which field is the record's display name; pred:{type:'board',…} = board gating (a menu can have several windows for the same path, one per board class — see Gotchas).

Where the .jg lives

The catalog is MikroTik's file, version-volatile and not redistributed with this repository — so there is no fixed path to it. Obtain it one of these ways, in order of preference:

  • Library runtime cache — what WinboxNativeConnection actually parses, under %TEMP%/tik4net/<jgVersion>/*.jg. The version subdirectory is the catalog's own version, not the RouterOS version; list the directory to find it rather than assuming. Delete a version directory to force a re-fetch.
  • Dump one from a live router with WinboxDumpCatalogTest in the integration test project.
  • Fetch from webfig over plain HTTP: GET /webfig/<name>.jg with Accept-Encoding: gzip (without it the router answers HTTP 406).

Read the full file on GitHub · 242 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 242 lines · 211 tokens per session scan A 9569f9b2ca40

Subscribe to this mod's changes

winbox-native-dev is a skill published in the GitHub repository danikf/tik4net (197 stars, last pushed 2d ago), licensed Apache-2.0. It adds 211 tokens to every session and 5,160 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dpg-migration

Migration logic for Azure SDK for .NET data-plane libraries migrating from AutoRest/Swagger to TypeSpec-based generation. Uses MCP tools from the generator-agent server for automated deterministic fixes.

Azure/azure-sdk-for-net · 41 tokens

csharp-azure-spector-coverage-gaps

Discovers and implements gaps in Spector test coverage for the Azure C# HTTP client emitter. Use when asked to find missing Spector scenarios, add Spector test coverage, or implement a specific Spector spec for the Azure C# emitter. Can also compare coverage between the Azure dashboard and the Standard (TypeSpec core)…

Azure/azure-sdk-for-net · 78 tokens

mgmt-review-comment-resolution

Resolve review comments on Azure management-plane .NET SDK PRs. Handles renaming types/properties, changing property types, and other API surface adjustments by updating TypeSpec client.tsp and regenerating.

Azure/azure-sdk-for-net · 46 tokens

mpg-migration

Handles Azure SDK for .NET management-plane migrations from AutoRest/Swagger to TypeSpec; use for MPG, mgmt migration, or Azure.ResourceManager. migration requests.

Azure/azure-sdk-for-net · 39 tokens

generate-code-cs

Generate the code from typespec for C#. Parameter: C# SDK repository root location .

Azure/azure-sdk-for-net · 26 tokens

bump-mgmt-base-version

Bump the http-client-csharp base dependency version in http-client-csharp-mgmt. Updates emitter (npm) and generator (NuGet) references, rebuilds, and regenerates test projects.

Azure/azure-sdk-for-net · 47 tokens