How the Execution Pipeline for Task Routing Works in Reverse-Skill: Windows vs. Linux/macOS

TLDR: The reverse-skill framework implements a unified task routing execution pipeline that processes user intents through an eight-stage workflow, deferring platform-specific handling until the tool-bootstrap stage where PowerShell orchestrates Windows environments and Bash handles Linux/macOS.

The reverse-skill repository (zhaoxuya520/reverse-skill) automates security and reverse-engineering workflows through a sophisticated execution pipeline that routes tasks from natural language hints to concrete automation skills. This architectural analysis examines how the pipeline maintains cross-platform consistency while adapting its implementation to Windows and Unix-like operating systems.

Architecture Overview

According to docs/ARCHITECTURE.md, the system employs a platform-agnostic routing layer that processes all tasks through identical logic until reaching the bootstrap phase. The core orchestration scripts—skills/scripts/master-route.ps1 for Windows and skills/scripts/master-route.sh for Linux/macOS—implement the same eight-stage execution sequence using their respective shell languages.

The Eight-Stage Execution Pipeline

The pipeline progresses through distinct phases that remain consistent across platforms, differing only in implementation syntax and package management tooling.

Stage Function Windows Implementation Linux/macOS Implementation
Intent Detection Parses user prompts against security rule sets skills/scripts/master-route.ps1 reads RULES.md and SKILL.md skills/scripts/master-route.sh reads kali/RULES-kali.md and SKILL.md
Routing Matrix Maps detected intent to concrete skill directories PowerShell parses skills/routing.md via Get-Content Bash parses skills/routing.md via cat and grep
Field Journal Verification Queries previous experience from field-journal/ Get-Content field-journal/*.md cat field-journal/*.md
Tool Index Check Validates required tooling against tool-index.md Import-Csv $ToolIndexPath | Where-Object awk or grep operations on tool-index.md
Tool Bootstrapping Installs missing dependencies automatically Executes skills/scripts/bootstrap-reverse.ps1 using winget, pip, npm, and GitHub ZIP releases Executes kali/scripts/bootstrap-reverse.sh using apt, pip, npm, and GitHub tar.gz archives
Skill Execution Runs the selected skill's workflow Invokes <skill>/run.ps1 or metadata-defined command Invokes <skill>/run.sh or metadata-defined command
Documentation Generation Creates reports and diagrams Calls docs-generator.ps1 Calls docs-generator.sh
Self-Evolution Updates indices and routing based on results PowerShell file operations update routing.md and tool-index.md Bash file operations update routing and bootstrap manifests

Platform-Specific Routing Scripts

Windows PowerShell Implementation

On Windows platforms, skills/scripts/master-route.ps1 serves as the primary entry point for the execution pipeline. The script implements intent detection by scanning user hints against RULES.md, then queries the skills/routing.md matrix to locate the appropriate skill directory. When the pipeline identifies missing tooling through skills/tool-index.md, it delegates to skills/scripts/bootstrap-reverse.ps1 to provision dependencies via Windows-native package managers.

Linux/macOS Bash Implementation

For Unix-like environments, particularly Kali Linux, skills/scripts/master-route.sh provides equivalent orchestration using POSIX-compliant utilities. The script reads platform-specific rules from kali/RULES-kali.md while sharing the same routing.md matrix and field-journal/ structure as the Windows implementation. Tool verification leverages standard text-processing utilities rather than CSV imports, maintaining identical logical flow through different syntactic mechanisms.

Tool Bootstrapping Mechanism

The most significant architectural divergence occurs during Stage 5.

Windows: The skills/scripts/bootstrap-reverse.ps1 script automates environment preparation using winget for system packages, pip and npm for language-specific tools, and direct GitHub Release ZIP downloads for standalone binaries.

Linux/macOS: The kali/scripts/bootstrap-reverse.sh script performs equivalent provisioning using apt for system packages, alongside pip, npm, and tar.gz extraction from GitHub releases, ensuring compatible tooling without Windows-specific dependencies.

Practical Usage Examples

Invoke the routing pipeline on Windows using PowerShell:

powershell -NoProfile -ExecutionPolicy Bypass `
    -File "skills/scripts/master-route.ps1" -Hint "enumerate AD objects"

On Linux or macOS, use the Bash entry point:

bash skills/scripts/master-route.sh --hint "enumerate AD objects"

Both commands execute the full pipeline: parsing the hint against routing.md, verifying tool availability via tool-index.md, triggering bootstrap scripts if dependencies are missing, and ultimately launching the platform-appropriate skill implementation.

Summary

  • The reverse-skill execution pipeline maintains platform-agnostic logic through the first four stages, ensuring consistent intent detection and routing matrix evaluation across operating systems.
  • Windows implementations utilize PowerShell scripts located in skills/scripts/, leveraging CSV parsing and Windows package managers for tool verification and installation.
  • Linux/macOS implementations use Bash scripts in skills/scripts/ for routing logic and kali/scripts/ for bootstrapping, employing standard Unix text processing and apt-based package management.
  • Both platforms consume the same skills/routing.md matrix, field-journal/ experience logs, and tool-index.md availability catalog, ensuring behavioral parity despite implementation differences.
  • The automatic bootstrapping mechanism ensures that missing tools are provisioned without manual intervention, using platform-appropriate methods before skill execution begins.

Frequently Asked Questions

What file handles the initial task routing on Windows?

The skills/scripts/master-route.ps1 script serves as the Windows entry point, responsible for parsing user hints, reading the routing matrix, and orchestrating the subsequent pipeline stages through PowerShell implementations.

How does reverse-skill handle missing tool dependencies on Linux?

The pipeline invokes kali/scripts/bootstrap-reverse.sh when skills/tool-index.md indicates missing binaries. This Bash script automatically provisions tools using apt for system packages, pip and npm for Python/Node modules, and direct downloads from GitHub releases for standalone utilities.

Is the routing configuration shared between Windows and Linux?

Yes. Both platforms reference the centralized skills/routing.md file to map intents to skill directories. However, they read platform-specific rule files—RULES.md on Windows and kali/RULES-kali.md on Linux/macOS—to handle OS-specific security contexts.

Where is the architectural documentation for the routing pipeline located?

The high-level design and visual flow diagrams are documented in docs/ARCHITECTURE.md, which illustrates the shared routing layer, platform-specific script boundaries, and the bootstrap flow divergence between Windows and Unix-like systems.

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 →