Single Source of Truth for Reverse-Skill Routing Rules: Complete Technical Guide

The Single Source of Truth (SSoT) for all reverse-skill routing rules is the skills/config/routing.json file, which serves as the authoritative configuration that all platform-native router scripts reference to determine which SKILL.md to execute.

The reverse-skill repository by zhaoxuya520 implements a centralized routing architecture to map task hints to specific skill definitions. Understanding where the Single Source of Truth (SSoT) lives is critical for modifying routing behavior, as all routing-related scripts consume this single JSON configuration. According to the project's RULES.md documentation, this file is explicitly designated as the primary SSoT for the entire routing system.

What Is the Single Source of Truth in reverse-skill?

The definitive location for all routing tables in the reverse-skill project is skills/config/routing.json. The repository's RULES.md explicitly designates this file as the primary SSoT, stating: "Run the platform-native router → PRIMARY (SSoT: skills/config/routing.json)" according to lines 15-20 of the documentation.

The documentation further emphasizes this exclusivity by noting that "Route tables live only in skills/config/routing.json" (lines 3-4 of RULES.md). This means any addition, removal, or modification of routing entries must be performed in this specific file. All other routing-related components, including master-route.ps1 and master-route.sh, read from this JSON file to determine which SKILL.md file to execute for a given task hint.

How the Routing Architecture Works

The reverse-skill routing system operates on a strict hierarchy where platform-native scripts consume the centralized JSON configuration to resolve task hints to executable skill definitions.

Platform-Native Router Scripts

The entry points for the routing system are the platform-specific master router scripts located in skills/scripts/. These include:

  • master-route.sh for Linux, macOS, and Kali systems
  • master-route.ps1 for Windows PowerShell environments

These scripts do not contain hardcoded routing logic. Instead, they parse skills/config/routing.json at runtime to match the provided hint against the routing table and select the appropriate SKILL.md file for execution.

Routing Table Structure

The skills/config/routing.json file contains a JSON array of routing objects. Each entry maps a task hint to a skill definition file and specifies compatible platforms:

{
  "hint": "android-reversing",
  "skill": "skills/ida-reverse/SKILL.md",
  "platforms": ["linux", "macos", "windows"]
}

When you invoke the router with a hint, the script searches this array for a matching entry and validates that the current platform is supported before executing the referenced skill.

Working with the SSoT Configuration

Modifying the routing behavior requires direct interaction with the skills/config/routing.json file. All changes to routing logic must originate here to maintain system integrity.

Inspecting Current Routing Rules

To view the complete routing matrix in a human-readable format, use standard Unix utilities with JSON parsing:

cat skills/config/routing.json | jq .

This command displays the entire SSoT configuration, allowing you to verify existing routes, check platform compatibility flags, and understand the current routing hierarchy before making modifications.

Adding New Routing Entries

To extend the routing system with new capabilities, append a JSON object to the array in skills/config/routing.json:

{
  "hint": "my-new-task",
  "skill": "skills/new-module/SKILL.md",
  "platforms": ["linux", "macos"]
}

After modifying the file, test the configuration by running the platform-native router:

bash skills/scripts/master-route.sh --hint "my-new-task"

If the project includes a tool index refresh script, execute bash skills/scripts/refresh-tool-index.sh to ensure any dependent indices are updated to reflect the new routing configuration.

Key Files in the Routing Ecosystem

Understanding the relationship between configuration files and executable scripts clarifies the architecture's flow:

  • skills/config/routing.json — The Single Source of Truth containing all routing rules and the authoritative mapping of hints to skill files according to the zhaoxuya520/reverse-skill source code.
  • RULES.md — Core documentation located in the repository root that designates the SSoT and explains the complete routing workflow.
  • skills/scripts/master-route.sh and skills/scripts/master-route.ps1 — Platform-native entry points that read the SSoT to resolve and execute skills.
  • skills/routing.md — Advisory matrix used only after primary routing has occurred (secondary reference, not the SSoT).
  • AGENTS.md — High-level project overview describing entry points and system architecture.

Summary

  • The Single Source of Truth for reverse-skill routing rules is exclusively skills/config/routing.json.
  • Platform-native router scripts (master-route.sh, master-route.ps1) read from this JSON file to determine which SKILL.md to execute.
  • RULES.md explicitly designates this file as the primary SSoT and warns against duplicating route tables elsewhere.
  • All routing modifications must be made directly to skills/config/routing.json; no other files contain authoritative routing logic.
  • Use jq to inspect the routing table and standard JSON editing to extend the system's capabilities.

Frequently Asked Questions

Where is the Single Source of Truth for reverse-skill routing rules located?

The SSoT is located at skills/config/routing.json in the repository root. According to the zhaoxuya520/reverse-skill source code, specifically lines 15-20 of RULES.md, this file is explicitly designated as the "PRIMARY (SSoT)" for all routing operations. All platform-native router scripts reference this file exclusively to resolve task hints to skill definitions.

What happens if I modify routing rules in a different file?

Modifying routing rules in any file other than skills/config/routing.json will result in inconsistent behavior or routing failures. The documentation in RULES.md states that "Route tables live only in skills/config/routing.json," meaning the master router scripts do not check alternative locations for routing configuration. Changes made elsewhere will be ignored by the primary routing system.

How do I add a new skill to the reverse-skill routing system?

To add a new skill, append a JSON object to the array in skills/config/routing.json with three required fields: hint (the trigger keyword), skill (the path to the SKILL.md file), and platforms (an array of supported operating systems). After saving the file, test the configuration by running bash skills/scripts/master-route.sh --hint "your-new-hint" to verify the router correctly resolves to your new skill definition.

What is the difference between skills/config/routing.json and skills/routing.md?

skills/config/routing.json is the machine-readable Single Source of Truth consumed by router scripts to determine execution paths. In contrast, skills/routing.md serves as an advisory matrix used only after primary routing has occurred, likely for human reference or secondary validation. The executable routing logic depends exclusively on the JSON configuration, while the markdown file provides supplementary documentation.

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 →