How the PRIMARY Routing System Works in reverse-skill: A 3-Step Guide
The PRIMARY routing system in reverse-skill is a fast-track triage mechanism that matches task hints against a curated keyword table to return a single skill path, ensuring only the necessary PRIMARY skill is loaded to prevent "skill-stack overload."
The reverse-skill framework uses a lightweight routing pipeline to determine which skill module should execute for a given reverse engineering or security task. At the heart of this system is the PRIMARY routing mechanism, a deliberate three-step process defined in skills/MASTER-ROUTING.md and implemented via skills/scripts/master-route.ps1. This architecture guarantees a single-hop, reproducible entry point for every analysis case while maintaining strict isolation between unrelated skill sets.
The 3-Step PRIMARY Routing Process
The PRIMARY routing mechanism operates as a deterministic pipeline that moves from task intake to execution without loading unnecessary modules.
Step 1: Triage the Task with master-route.ps1
The process begins by identifying the correct skill module for your objective. You can either open skills/MASTER-ROUTING.md manually or run the helper script skills/scripts/master-route.ps1 with a hint that describes your target.
The PowerShell script parses the hint, matches it against the curated keyword table in MASTER-ROUTING.md, and outputs a single PRIMARY path. This eliminates manual searching through the skill hierarchy.
# 1️⃣ Quick triage – obtain the PRIMARY skill path
.\skills\scripts\master-route.ps1 -Hint "dump Windows NTLM hashes from LSASS"
# Expected output (example)
# PRIMARY = skills/windows-ad/
# Reason = “Credential Dumping – LSASS”
If you run the script without providing a hint, it automatically falls back to the full three-axis matrix in skills/routing.md for manual selection.
Step 2: Open the PRIMARY Skill and Execute ACTION REQUIRED
Once the script returns the path—such as skills/ida-reverse/, skills/windows-ad/, or the multi-stage attack-chain/ directory—the framework opens that skill’s SKILL.md file. According to the workflow mandates in RULES.md and README.md, the system immediately runs the ACTION REQUIRED block specified in that document.
# 2️⃣ Immediately open the skill and run its ACTION block
# (the framework does this automatically; in a manual flow you can:)
code .\skills\windows-ad\SKILL.md # open the markdown
# Follow the ACTION REQUIRED instructions in the file
This step ensures that execution begins instantly with the correct contextual instructions, rather than requiring the analyst to navigate multiple documentation layers.
Step 3: Handle Ambiguity with the Fallback Matrix
When the hint does not match any strong keyword in the routing table, MASTER-ROUTING.md triggers a deterministic fallback. The system assigns PRIMARY=R0 and directs you to consult the comprehensive three-axis matrix in skills/routing.md for manual disambiguation.
This fallback corresponds to the "未命中强关键词" (missed strong keywords) row in MASTER-ROUTING.md, ensuring that ambiguous tasks still resolve to a valid entry point rather than failing silently.
Key Files Behind the PRIMARY Routing System
The routing logic is distributed across several authoritative source files that define the triage logic, role assignments, and identity models:
skills/MASTER-ROUTING.md– Contains the primary fast-track table and one-shot script instructions that map keywords to skill paths.skills/scripts/master-route.ps1– The PowerShell implementation that executes the triage logic and returns the PRIMARY path string.skills/routing.md– The full three-axis matrix used when hints are ambiguous or when manual override is required.skills/ops/role-map.md– Defines how the PRIMARY skill is assigned to the lead role, who then distributes secondary tasks to other team members.skills/ops/IDENTITY.md– Documents the three-axis identity model (target type / intent / toolchain) that underpins the routing decisions.RULES.mdandREADME.md– Establish the high-level workflow requirements that mandate PRIMARY routing for all engagements.
Why the PRIMARY Routing System Uses a Lightweight Design
The reverse-skill framework deliberately restricts loading behavior to maintain performance and clarity. By design, only the PRIMARY skill and any explicitly required secondary helpers are loaded into the execution context. This prevents "skill-stack overload," a condition documented in community-security-skills.md where extraneous modules clutter the analysis environment and introduce conflicting dependencies.
Role assignments from skills/ops/role-map.md reinforce this isolation. The lead role receives the PRIMARY path and maintains responsibility for invoking secondary skills, ensuring that each analysis context remains bounded and reproducible. The three-axis identity model in IDENTITY.md further refines this by categorizing tasks across target type, intent, and toolchain axes before the PRIMARY fast-path finalizes the selection.
Summary
- The PRIMARY routing system uses
skills/scripts/master-route.ps1to match task hints againstskills/MASTER-ROUTING.mdand return a single skill path. - Valid PRIMARY paths point to concrete directories like
skills/windows-ad/orattack-chain/, where theSKILL.mdACTION REQUIRED block executes immediately. - Ambiguous hints trigger a fallback to
PRIMARY=R0and redirect analysis to the full matrix inskills/routing.md. - The architecture prevents skill-stack overload by loading only the PRIMARY skill and necessary helpers, with role distribution managed via
skills/ops/role-map.md.
Frequently Asked Questions
What happens if the hint doesn't match any keywords in the PRIMARY routing system?
The system falls back to a default PRIMARY=R0 assignment and prompts you to consult the full three-axis matrix in skills/routing.md for manual disambiguation. This corresponds to the "未命中强关键词" row in skills/MASTER-ROUTING.md, ensuring you still reach a valid skill entry point rather than encountering an error.
How does the PRIMARY routing system prevent skill-stack overload?
According to the framework documentation in community-security-skills.md, the system loads only the PRIMARY skill and any explicitly required secondary helpers. By avoiding the simultaneous loading of all available skill modules, the framework maintains a clean execution environment free from dependency conflicts or cognitive clutter.
What is the three-axis identity model in reverse-skill?
The three-axis identity model, defined in skills/ops/IDENTITY.md, categorizes every task across three dimensions: target type, intent, and toolchain. This model provides the categorical foundation for the PRIMARY routing table, while the fast-path mechanism in master-route.ps1 streamlines the selection into a single PRIMARY assignment.
Can I manually override the PRIMARY routing decision?
Yes. You can bypass the automated triage by directly editing skills/MASTER-ROUTING.md or by opening skills/routing.md to manually select from the full three-axis matrix. In manual mode, you specify the PRIMARY path yourself before opening the corresponding SKILL.md and executing the ACTION REQUIRED block.
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 →