MASTER‑ROUTING.md and routing.md in reverse‑skill: Complete Routing Mechanism Guide
MASTER‑ROUTING.md and routing.md constitute the dual‑layer routing system that maps security and reverse‑engineering task hints to the correct skill modules, with MASTER‑ROUTING.md serving as the primary fast path and routing.md providing a three‑axis disambiguation matrix for resolving ambiguous requests.
The reverse‑skill repository implements a modular architecture where specialized capabilities are isolated into individual skill directories. At the core of this design, MASTER‑ROUTING.md and routing.md in the skills/ directory define the routing protocols that ensure every task hint—whether "APK decompile" or "JS signature analysis"—is systematically directed to the appropriate SKILL.md implementation without executing unrelated or unsafe actions.
The Primary Routing Contract in MASTER‑ROUTING.md
MASTER‑ROUTING.md serves as the authoritative source for primary routing decisions. Described in the source as the "PRIMARY 快路径" (fast path), this document contains the execution contract that the master‑route scripts (skills/scripts/master‑route.ps1 and skills/scripts/master‑route.sh) must obey strictly.
The file specifies the priority order for route resolution, governs the required pre‑routing steps, and defines fallback behavior when a hint lacks a clear mapping. According to lines 8‑13 of MASTER‑ROUTING.md, the protocol guarantees that routing occurs before any action is taken and mandates that the appropriate skill's SKILL.md is read prior to execution. This prevents accidental invocation of incorrect tooling.
Integration with Routing Scripts
The Windows and Unix entry points implement the logic dictated by MASTER‑ROUTING.md. These scripts first consult config/routing.json to obtain the PRIMARY skill path for a given hint. If the JSON entry is unambiguous, the router immediately opens the corresponding SKILL.md file.
The Three‑Axis Disambiguation Matrix in routing.md
When config/routing.json cannot resolve a user intent uniquely, the system falls back to the detailed lookup table defined in routing.md. This document provides a three‑axis view that disambiguates requests by correlating Target Type ↔ User Intent ↔ Toolchain.
The matrix enumerates concrete mappings such as:
APK→apk‑reverse/JS→js‑reverse/
Each entry includes logic for handling ambiguous or novel requests. Lines 7‑13 of routing.md formalize the "Routing Execution Protocol" that ensures systematic verification before execution. When the primary JSON mapping points to multiple candidates (e.g., R4 for DSL VM tasks), the router consults the matrix row—such as line 75 in routing.md—to select the precise skill path based on the detected toolchain (e.g., anything‑analyzer MCP).
Route Not Matched Handling
Lines 79‑86 of routing.md mandate specific behavior for unmatched hints. Rather than forcing a poor fit, the router must propose creating a new skill module when no matrix row matches the request. This preserves the repository's integrity by preventing execution of inappropriate reverse‑engineering workflows.
How the Routing Workflow Executes
The routing mechanism operates through a four‑step pipeline:
-
Initialize via master‑route – The user invokes
master‑route.ps1(Windows) ormaster‑route.sh(Linux/macOS/Kali) with a<Hint>parameter describing the task. -
Primary JSON lookup – The script reads
config/routing.jsonto retrieve the PRIMARY skill path. If the entry is clear and singular, execution proceeds directly to that skill'sSKILL.md. -
Matrix disambiguation – If the JSON entry is ambiguous (multiple skills match the hint), the script falls back to the three‑axis matrix in
routing.md. The router matches the target type, user intent, and specified toolchain to select the correct module. -
Unmatched handling – When no matrix row corresponds to the hint, the router follows the "Route Not Matched – Handling" procedure and suggests generating a new skill directory rather than selecting an incorrect existing one.
Practical Code Examples
Primary Routing on Windows
Execute the master‑route script with a task hint to trigger the primary fast path:
powershell -File skills\scripts\master-route.ps1 -Hint "APK decompile"
The script queries config/routing.json, identifies the primary entry apk‑reverse/, and opens apk‑reverse/SKILL.md for execution.
Primary Routing on Linux and macOS
For Unix‑based systems, use the Bash equivalent:
bash skills/scripts/master-route.sh --hint "JS signature analysis"
If the JSON entry for "JS" is ambiguous, the script automatically consults routing.md to decide between js‑reverse/ or js‑reverse/jshookmcp based on the detected toolchain context.
Fallback Disambiguation with the Matrix
When the hint requires toolchain‑specific resolution, the router uses the three‑axis matrix. For example, a "DSL VM reverse" task with a specific toolchain selection:
bash skills/scripts/master-route.sh --hint "DSL VM reverse" --toolchain "anything-analyzer"
The router reads the matrix row (line 75 in routing.md) and selects reverse‑engineering/dsl‑vm‑reverse/SKILL.md instead of the generic mapping.
Handling Unmatched Hints
For novel tasks without existing mappings, the system proposes skill creation:
bash skills/scripts/master-route.sh --hint "Quantum-resistant crypto analysis"
Following the protocol in routing.md (lines 79‑86), the output indicates: "No matching skill found. Propose a new skill: quantum‑crypto‑reverse/".
Verifying Routing Coherence
After editing the routing tables, validate that the matrix and JSON remain synchronized:
powershell -File skills\scripts\verify-routing-coherence.ps1
Summary
MASTER‑ROUTING.mddefines the primary fast path and execution contract thatmaster‑route.ps1andmaster‑route.shmust follow, ensuring routing precedes all actions.routing.mdprovides the three‑axis disambiguation matrix (Target Type ↔ User Intent ↔ Toolchain) for resolving ambiguous hints whenconfig/routing.jsonyields multiple candidates.- The Routing Execution Protocol (lines 7‑13 of
routing.mdand lines 8‑13 ofMASTER‑ROUTING.md) mandates reading the targetSKILL.mdbefore execution to prevent unsafe operations. - When no match exists, the system follows the Route Not Matched procedure (lines 79‑86) to propose new skill creation rather than forcing incorrect matches.
- Use
verify‑routing‑coherence.ps1to validate routing integrity after modifyingconfig/routing.jsonorrouting.md.
Frequently Asked Questions
What is the difference between MASTER‑ROUTING.md and routing.md in reverse‑skill?
MASTER‑ROUTING.md serves as the primary routing contract and fast path, defining how master‑route.ps1 and master‑route.sh must interpret config/routing.json and execute the priority‑ordered routing logic. In contrast, routing.md functions as a secondary disambiguation layer containing the three‑axis matrix used only when the primary JSON mapping cannot uniquely resolve the user intent.
How does the routing system handle ambiguous task hints?
When config/routing.json returns multiple candidate skills for a hint, the routing scripts fall back to the three‑axis matrix in routing.md. This matrix evaluates the intersection of Target Type, User Intent, and Toolchain to select the precise skill module, such as choosing between js‑reverse/ and js‑reverse/jshookmcp based on the detected analysis environment.
What happens when no skill matches the task hint?
If neither the primary JSON nor the three‑axis matrix contains a matching entry, the router invokes the "Route Not Matched – Handling" protocol defined in lines 79‑86 of routing.md. Rather than executing an incorrect skill, the system outputs a proposal to create a new skill directory (e.g., suggesting quantum‑crypto‑reverse/ for novel cryptographic analysis tasks).
How can I verify routing coherence after modifications?
Run the skills/scripts/verify‑routing‑coherence.ps1 script (or its Unix equivalent if available) to ensure that changes to config/routing.json remain synchronized with the disambiguation rules in routing.md and the execution contracts in MASTER‑ROUTING.md. This verification prevents routing failures caused by mismatched primary and secondary routing layers.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →