How reverse-skill Routes Tasks to the Correct Skill Module: A Three-Axis Routing System

reverse-skill employs a deterministic three-axis routing algorithm that evaluates target type, user intent, and toolchain requirements against prioritized routing matrices to select the appropriate skill module.

The zhaoxuya520/reverse-skill repository implements a structured routing system for reverse engineering automation. Understanding how reverse-skill route tasks to their destinations requires analyzing the interplay between the primary routing contract and the comprehensive three-dimensional matching matrix.

The Three-Axis Routing Matrix

The routing decision relies on three orthogonal dimensions defined in skills/routing.md.

Target Type Classification

The router first identifies the artifact category—such as APK, binary, firmware, or Active Directory dumps—using the "By Target Type" table. This dimension filters eligible skills based on the file format or system being analyzed.

User Intent Recognition

Next, the system parses the natural language request to determine the analytical goal. The "By User Intent" table maps phrases like "analyze suspicious APK" or "decode custom protobuf" to specific skill capabilities.

Toolchain Specification

Finally, the router checks the "By Toolchain" table to ensure the selected skill supports the required analysis tools. This axis guarantees compatibility with specific disassemblers, decompilers, or protocol analyzers.

Primary vs. Secondary Routing

The routing process follows a two-tier lookup strategy.

MASTER-ROUTING.md Priority List

The entry point skills/MASTER-ROUTING.md defines the primary routing contract containing a priority list of skill IDs (R1 → R0). When multiple skills match the three-axis criteria, the router selects the highest priority candidate from this ordered list.

Fallback to the Full Matrix

If the primary matrix yields no match, the router consults the comprehensive matrix in skills/routing.md. This secondary lookup spans lines 88-125 and provides more granular routing rules for edge cases.

Routing Execution Flow

The skills/scripts/master-route.ps1 PowerShell script implements the routing algorithm. The execution follows these steps:

  1. Parse the user hint into target type, intent, and toolchain components
  2. Scan the MASTER-ROUTING.md priority list for initial candidates
  3. Match candidates against the three-axis criteria from routing.md
  4. Select the first skill satisfying all dimensions
  5. Load the module's SKILL.md file for workflow execution

Example: Routing an APK Analysis Task


# Execute the primary router with a natural language hint

powershell -File skills\scripts\master-route.ps1 -Hint "Analyze suspicious APK and extract embedded .so"

This command generates work/master-route-<timestamp>/route-scope.md containing the selected skill (apk-reverse/) and justification. The router then automatically opens skills/apk-reverse/SKILL.md for the next ACTION step.

Example: Fallback Routing for Custom Protocols


# Invoke secondary matrix when primary routing cannot decide

powershell -File skills\scripts\master-route.ps1 -Hint "I need to decode a custom protobuf stream"

The script evaluates the "By Target Type" entry for Custom protocol / Protobufprotocol-reverse/ and confirms the match against the user intent.

Operational Contract Enforcement

Before executing any ACTION, the router validates operational contracts defined in ops/scope-contract.md and ops/role-map.md. As specified in skills/MASTER-ROUTING.md lines 31-34, this enforcement ensures proper authorization, evidence collection protocols, and timeline tracking are in place before skill execution begins.

Handling Unmatched Tasks

When no existing skill satisfies the three-axis criteria, the router does not force-fit the task. Instead, it initiates the contribution workflow defined in CONTRIBUTING.md. This process proposes a new skill definition, ensuring the routing system remains accurate and extensible.

Summary

  • Three-axis routing: reverse-skill matches tasks using Target Type, User Intent, and Toolchain criteria defined in skills/routing.md.
  • Priority-based selection: The MASTER-ROUTING.md file provides the primary routing contract with an R1→R0 priority list for conflict resolution.
  • Automated execution: The skills/scripts/master-route.ps1 script implements the routing logic and automatically loads the selected module's SKILL.md.
  • Contract enforcement: Operational contracts from ops/scope-contract.md and ops/role-map.md are validated before any skill activation.
  • Graceful degradation: Unmatched tasks trigger the contribution workflow rather than incorrect routing.

Frequently Asked Questions

What file defines the routing priority in reverse-skill?

The skills/MASTER-ROUTING.md file defines the primary routing contract and priority list (R1 → R0). This file serves as the entry point for all routing decisions, establishing the order in which eligible skills are evaluated.

How does reverse-skill handle ambiguous routing decisions?

When multiple skills match the three-axis criteria, the router consults the priority list in MASTER-ROUTING.md. The skill with the highest priority (lowest R-number) wins. If ambiguity persists, the system falls back to the comprehensive matrix in skills/routing.md for more specific matching.

What happens if no skill module matches the task requirements?

The router refuses to force-fit the task. Instead, it proposes a new skill definition following the workflow in CONTRIBUTING.md. This ensures the routing system maintains accuracy and only routes to capabilities that explicitly support the required target type, intent, and toolchain.

Where is the routing automation script located?

The primary routing automation is implemented in skills/scripts/master-route.ps1. This PowerShell script parses user hints, evaluates the three-axis criteria, generates routing scope documentation, and automatically opens the selected skill's SKILL.md file.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →