How the Master Routing System Prioritizes Reverse Engineering Tasks
The master routing system employs a deterministic cascade that first matches requests against a ranked primary shortcut table (R1–R40) in MASTER-ROUTING.md, then falls back to a comprehensive three-axis matrix in routing.md to select the optimal skill module based on target type, user intent, and toolchain.
The reverse-skill repository by zhaoxuya520 automates the selection of reverse-engineering workflows through a hierarchical decision engine. By evaluating every request across three orthogonal dimensions, the master routing system guarantees that the most specific skill module—whether for Android APK analysis or Windows binary decompilation—handles the task without manual intervention.
Three Dimensions of Prioritization
The routing engine evaluates every incoming task against three distinct axes defined in the source documentation:
- Target Type – The file format or platform (e.g., APK, ELF, .NET binary, iOS IPA)
- User Intent – The analytical goal (e.g., "decompile," "unpack," "remove anti-debug," "dynamic instrumentation")
- Toolchain – The preferred or required toolset (e.g., IDA Pro, radare2, Frida, Ghidra)
These dimensions are encoded in two core configuration files. The primary priority list resides in [skills/MASTER-ROUTING.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/MASTER-ROUTING.md), which contains a ranked table (R1 → R40) that assigns immediate skills to obvious signals. For example, an APK extension triggers apk-reverse/, while a .NET binary triggers dotnet-reverse/. If the primary shortcut fails to match, the system consults [skills/routing.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing.md), which enumerates every target type against user intent and optional toolchain to locate the exact skill path.
Step-by-Step Prioritization Flow
The routing algorithm follows a strict five-phase cascade implemented in skills/scripts/master-route.ps1:
-
Extract Signals – The parser scans the user’s hint for keywords including file extensions, binary signatures, and action phrases like "decompile," "Frida," or "OLLVM."
-
Primary Shortcut Evaluation – The engine scans the priority table in
MASTER-ROUTING.md(section "优先级(高 → 低)"). The first row whose condition matches the hint determines the PRIMARY skill. For instance, the hint "APK / Android" immediately routes toapk-reverse/. -
Fallback Matrix Lookup – If no primary rule matches, the system loads
routing.mdand performs a three-axis lookup:- Selects the target type row (e.g., Binary exe/dll/so/elf)
- Selects the user intent column (e.g., "decompile / IDA analyze")
- Optionally narrows by toolchain (e.g., IDA vs. radare2)
-
Tool Availability Verification – The system checks [
skills/tool-index.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/tool-index.md) to verify required tools are installed. Missing tools trigger the bootstrap flow (bootstrap-reverse.ps1orbootstrap-reverse.sh) before execution proceeds. -
Skill Execution – The selected skill’s
SKILL.mdis opened and its workflow runs, automatically creating a case workspace atwork/<case>/scope.md.
Architecture Overview
The system architecture visualized in [docs/ARCHITECTURE.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/docs/ARCHITECTURE.md) illustrates this deterministic routing layer:
flowchart LR
SKILL[SKILL.md] --> Routing[routing.md]
Routing --> Primary[Primary shortcut table]
Routing --> Matrix[Full three‑axis matrix]
Primary -->|match| SkillModule[Selected skill]
Matrix -->|match| SkillModule
SkillModule --> ToolCheck[tool-index.md]
ToolCheck -->|missing| Bootstrap[bootstrap‑reverse]
ToolCheck -->|available| Execute[Run skill workflow]
SKILL.md serves as the entry point that loads routing rules. The Primary shortcut provides a fast path for common tasks, while the Full matrix guarantees coverage for edge cases. The bootstrap subsystem ensures cross-platform execution regardless of whether the host runs Windows or Kali Linux.
Practical Usage Examples
Analysts interact with the routing engine through PowerShell commands. The engine handles the prioritization logic automatically:
# Primary shortcut match for Android analysis
powershell -File skills\scripts\master-route.ps1 -Hint "apk unpack and decompile"
# Expected output:
# PRIMARY: apk-reverse/
# Reason: R1 condition "APK / Android app" matched the hint.
# → Opening apk-reverse/SKILL.md …
When hints are ambiguous, the system falls back to the matrix:
# Fallback matrix lookup for anti-debug removal
powershell -File skills\scripts\master-route.ps1 -Hint "remove anti-debug checks in a Linux ELF"
# Expected output:
# PRIMARY: reverse-engineering/
# Reason: No primary shortcut matched; matrix lookup:
# Target Type = Binary exe/dll/so/elf
# User Intent = "remove anti-debug / anti-detection"
# → routed to reverse-engineering/anti-analysis.md
The following Python-style pseudocode mirrors the deterministic logic implemented in master-route.ps1:
def route_task(hint: str) -> str:
# Phase 1: Primary shortcut lookup
for rank, cond, skill in PRIMARY_TABLE:
if matches(cond, hint):
return skill
# Phase 2: Full matrix lookup
target = infer_target_type(hint)
intent = infer_user_intent(hint)
return MATRIX[target][intent] or "reverse-engineering/"
def ensure_tools(skill: str):
needed = read_tool_requirements(skill)
missing = [t for t in needed if not tool_available(t)]
if missing:
bootstrap(missing)
refresh_tool_index()
Summary
- The master routing system prioritizes tasks using a ranked primary table (R1–R40) in
MASTER-ROUTING.mdbefore falling back to a three-axis matrix inrouting.md. - Three dimensions determine routing: target type, user intent, and toolchain.
- Tool verification occurs via
tool-index.md, with automatic bootstrapping for missing dependencies. - The deterministic cascade guarantees the most specific skill handles the request, ensuring APKs route to
apk-reverse/while ambiguous binary tasks consult the full matrix.
Frequently Asked Questions
What happens if no primary rule matches the task?
If no primary shortcut matches, the routing engine loads routing.md and performs a comprehensive matrix lookup across target type and user intent dimensions. This fallback mechanism ensures coverage for specialized or edge-case scenarios that lack dedicated R1–R40 shortcuts.
How does the system handle missing tools or dependencies?
After selecting a skill, the engine consults tool-index.md to verify required tools are installed. If tools are missing, the system executes bootstrap-reverse.ps1 (Windows) or bootstrap-reverse.sh (Linux) to install dependencies, refreshes the tool index, and then proceeds with skill execution.
What is the difference between MASTER-ROUTING.md and routing.md?
MASTER-ROUTING.md contains the primary priority list—a fast-path table of 40 ranked rules for common signals like APK or .NET binaries. routing.md contains the full routing matrix, an exhaustive three-dimensional lookup table that covers every combination of target type, user intent, and toolchain for cases not handled by the primary shortcuts.
Can analysts override the automatic routing decision?
While the system is designed to operate deterministically, analysts can influence routing by crafting specific hints that trigger higher-ranked primary rules or by manually specifying target types and intents that map to precise matrix coordinates in routing.md.
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 →