Core Configuration File for Reverse-Skill's Routing Rules: Location, Structure, and Usage
The core configuration file for reverse-skill's routing rules is skills/config/routing.json, a centralized JSON document that maps user intents, platforms, and skill categories to their corresponding PowerShell or Bash execution scripts.
The reverse-skill framework delegates all routing decisions to this single declarative file. Located at skills/config/routing.json in the repository root, this configuration serves as the authoritative source that determines which platform-specific script handles each incoming task across Windows, Linux, macOS, and Kali systems.
Architecture of the Routing System
The routing architecture separates configuration from implementation logic. Instead of hardcoding dispatch paths, the framework relies on routing.json to resolve tasks dynamically at runtime.
Primary Configuration File Structure
The skills/config/routing.json file contains a nested object structure where top-level keys represent operating systems (windows, linux, macos, kali) and second-level keys represent skill categories (e.g., reverse-engineering, pwn-chain). Each leaf node specifies the relative path to the script that implements that specific skill for the given platform.
Supporting Components
According to the reverse-skill source code, several files interact with this core configuration:
skills/MASTER-ROUTING.md— Human-readable documentation describing the routing process and referencing the JSON schema.skills/scripts/master-route.ps1— Windows entry script that parsesrouting.jsonto determine dispatch targets.skills/scripts/master-route.sh— Unix-based entry script performing the same resolution for Bash environments.skills/scripts/test-routing.shandskills/scripts/test-routing.ps1— Validation suites that verify JSON integrity and routing correctness before deployment.
How Routing Resolution Works
When a request enters the system, the platform-specific master route script loads skills/config/routing.json and performs a lookup based on the provided platform and skill parameters.
JSON Matrix Format
The routing file follows a predictable two-level hierarchy:
{
"linux": {
"reverse-engineering": "skills/scripts/reverse-engineering.sh",
"pwn-chain": "skills/scripts/pwn-chain.sh"
},
"windows": {
"reverse-engineering": "skills/scripts/reverse-engineering.ps1",
"pwn-chain": "skills/scripts/pwn-chain.ps1"
},
"kali": {
"penetration-testing": "skills/scripts/pentest-kali.sh"
}
}
Bash Implementation Using jq
The master-route.sh script extracts execution paths using the jq command-line processor. The implementation follows this pattern:
#!/usr/bin/env bash
ROUTING_JSON="../../skills/config/routing.json"
PLATFORM=$1
SKILL=$2
SCRIPT=$(jq -r ".\"$PLATFORM\".\"$SKILL\"" "$ROUTING_JSON")
if [[ -z "$SCRIPT" || "$SCRIPT" == "null" ]]; then
echo "No routing entry for $PLATFORM → $SKILL"
exit 1
fi
bash "$SCRIPT"
Programmatic Loading in Node.js
For external integrations or administrative tooling, the JSON can be loaded and queried programmatically:
const fs = require('fs');
const path = require('path');
const routingPath = path.join(__dirname, 'skills', 'config', 'routing.json');
const routingData = JSON.parse(fs.readFileSync(routingPath, 'utf-8'));
const task = 'pwn-chain';
const platform = 'windows';
const entry = routingData[platform]?.[task];
console.log('Dispatch script:', entry);
Extending Routing Rules
Because the system stores routing logic in plain JSON, modifications require no changes to the entry point scripts. Adding support for a new skill involves editing skills/config/routing.json and appending entries for each supported platform.
Adding a New Skill Entry
To register a skill named malware-analysis, append the following structure to the configuration:
{
"linux": {
"malware-analysis": "skills/scripts/malware-analysis.sh"
},
"windows": {
"malware-analysis": "skills/scripts/malware-analysis.ps1"
}
}
After saving the file, validate the changes by executing the test suite:
bash skills/scripts/test-routing.sh
This confirms that all JSON entries resolve to existing files on disk and that no syntax errors exist in the routing matrix.
Validation and Testing
The framework includes dedicated test scripts to prevent configuration drift. These tools verify that skills/config/routing.json contains valid JSON syntax, that all referenced scripts exist in the repository, and that platform-skill combinations resolve to executable files.
Running test-routing.sh (or test-routing.ps1 on Windows) executes assertions against the routing matrix. This ensures that the core configuration file for reverse-skill's routing rules maintains consistency and integrity across different deployment environments.
Summary
skills/config/routing.jsonserves as the single source of truth for all routing decisions in the reverse-skill framework.- The file maps platforms (Windows, Linux, macOS, Kali) and skill categories to specific PowerShell or Bash execution scripts.
master-route.ps1andmaster-route.shparse this JSON at runtime to dispatch tasks to the appropriate modules usingjqor native JSON parsing.- Routing rules can be modified, version-controlled, and validated without changing application code or redeploying binaries.
test-routing.shandtest-routing.ps1provide automated validation of the JSON structure and verify that all routing paths point to existing executable files.
Frequently Asked Questions
Where is the reverse-skill routing configuration file located?
The routing configuration is stored in skills/config/routing.json at the repository root. This file contains the complete matrix mapping platforms and skills to their respective execution scripts across all supported operating systems.
How do I add a new routing rule to reverse-skill?
Edit skills/config/routing.json and add a new key-value pair under each relevant platform object. The key represents the skill identifier, and the value specifies the relative path to the execution script (using .ps1 extensions for Windows and .sh for Unix-based systems). Run skills/scripts/test-routing.sh to validate the syntax and verify file paths.
What happens if a routing entry is missing or invalid?
If master-route.sh or master-route.ps1 queries routing.json and encounters a missing or null entry, the script outputs an error message indicating that no routing exists for the specified platform-skill combination and exits with a non-zero status code. This prevents the execution of undefined or misconfigured commands.
Can I use reverse-skill routing without modifying the core JSON file?
No, the framework is architected to read exclusively from skills/config/routing.json. The entry point scripts hardcode this specific path when resolving routes. Any custom routing logic, including new skills or platform support, must be expressed within this JSON structure to function correctly with the standard master-route scripts.
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 →