How to Use the Reverse-Skill Command-Line Interface (CLI): A Complete Powershell Routing Guide
The reverse-skill CLI is a lightweight PowerShell wrapper that routes task hints to specialized security skill modules via master-route.ps1, automatically dispatching to the appropriate SKILL.md documentation and helper scripts.
The reverse-skill repository provides a markdown-driven command-line interface for security practitioners working across reverse-engineering, penetration testing, and attack-chain workflows. This guide walks through the complete reverse-skill CLI setup, routing mechanism, and daily usage patterns based on the actual implementation in zhaoxuya520/reverse-skill.
Core CLI Architecture
The reverse-skill CLI follows a three-stage routing pattern that keeps the interface minimal while supporting extensible skill modules.
Primary Components
| Component | Purpose | Source Location |
|---|---|---|
master-route.ps1 |
Entry point that parses hints and dispatches to skill modules | skills/scripts/master-route.ps1 |
routing.md |
Human-readable routing table mapping hints to skill directories | skills/routing.md |
SKILL.md files |
Detailed workflow documentation for each security domain | Various */SKILL.md paths |
bootstrap-reverse.ps1 |
First-run environment initialization | skills/scripts/bootstrap-reverse.ps1 |
| Utility scripts | Task-specific helpers (APK rebuilding, radare2 reconnaissance, etc.) | skills/**/scripts/*.sh |
How the Router Works
When you invoke master-route.ps1 -Hint "<task>", the reverse-skill CLI executes this flow:
- Parse Hint — Extracts the hint string from the
-Hintparameter. - Lookup Routing Table — Scans
skills/routing.mdfor a matching row. - Dispatch — Changes to the identified skill folder and opens its
SKILL.mdor executes associated scripts.
Because the system is purely markdown-driven, adding new capabilities requires only a new routing.md entry and corresponding SKILL.md folder — no code changes to the router itself.
Initial Setup: Bootstrap the Reverse-Skill CLI
Before using the CLI, initialize your environment with the bootstrap script.
# Run once: creates .env placeholders and generates tool-index.md
.\skills\scripts\bootstrap-reverse.ps1
The bootstrap script establishes the foundation that master-route.ps1 depends on for subsequent operations.
After adding new tools to your system, refresh the tool index:
# Optional: rescans repository for executable tools
.\skills\scripts\refresh-tool-index.sh
Daily Usage: Routing Tasks with master-route.ps1
The master-route.ps1 script is the primary reverse-skill CLI interface. Pass a hint that matches an entry in skills/routing.md.
Common CLI Invocations
# Android APK reverse-engineering
.\skills\scripts\master-route.ps1 -Hint "apk reverse"
# Windows thick-client analysis
.\skills\scripts\master-route.ps1 -Hint "thick client"
# Web application penetration testing
.\skills\scripts\master-route.ps1 -Hint "web pentest"
# IoT firmware analysis
.\skills\scripts\master-route.ps1 -Hint "iot firmware"
The hint string must exist in skills/routing.md. The router performs fuzzy matching against human-readable phrases rather than requiring exact directory names.
Direct Script Execution for Fine-Grained Control
For tasks requiring specific parameters, call utility scripts directly instead of routing through master-route.ps1.
# Rebuild, re-sign, and install an Android APK
.\skills\apk-reverse\scripts\rebuild-sign-install.sh C:\path\to\target.apk
# Run automated radare2 reconnaissance
.\skills\apk-reverse\scripts\r2-recon.sh C:\path\to\target.apk
Direct script calls bypass the routing table and are useful when:
- You need precise control over script arguments
- The task is repetitive and you've memorized the path
- You're integrating reverse-skill into automation pipelines
Extending the CLI: Adding New Skill Modules
The reverse-skill CLI architecture enables zero-code extensions:
- Create a new directory:
skills/<new-skill>/ - Add
SKILL.mdwith complete workflow documentation - Place helper scripts in
skills/<new-skill>/scripts/ - Add a routing entry to
skills/routing.md:
| "new skill hint" | new-skill/ | Brief description |
The next master-route.ps1 invocation will automatically recognize the new capability.
Key Files Reference
| File | Role |
|---|---|
skills/scripts/master-route.ps1 |
Main CLI dispatcher with -Hint parameter handling |
skills/scripts/bootstrap-reverse.ps1 |
Environment setup and initial tool indexing |
skills/scripts/refresh-tool-index.sh |
Updates tool-index.md with newly discovered tools |
skills/routing.md |
Central routing table mapping hints to module paths |
skills/apk-reverse/SKILL.md |
Android reverse-engineering workflow documentation |
skills/thick-client/SKILL.md |
Desktop application analysis procedures |
docs/ARCHITECTURE.md |
High-level system design documentation |
Summary
- Install once with
bootstrap-reverse.ps1to prepare the reverse-skill CLI environment. - Route tasks via
master-route.ps1 -Hint "<phrase>"for guided access toSKILL.mddocumentation. - Bypass routing with direct script calls when you need specific parameter control.
- Extend naturally by adding markdown entries to
routing.md— no router modifications required. - Maintain currency by running
refresh-tool-index.shafter tool installations.
Frequently Asked Questions
How do I know what hints are available in the reverse-skill CLI?
Open skills/routing.md in any text editor. This file contains a markdown table mapping all supported hint phrases to their corresponding skill directories. The hints are designed to be human-readable descriptions like "apk reverse" or "windows pwn" rather than cryptic command flags.
Can I use the reverse-skill CLI on Linux or macOS?
The core router master-route.ps1 requires PowerShell, which is available cross-platform through PowerShell Core. However, many utility scripts in skills/**/scripts/ are written as .sh files for POSIX compatibility. Run bootstrap-reverse.ps1 with pwsh on Linux/macOS to verify full functionality.
What happens if my hint doesn't match anything in routing.md?
master-route.ps1 will fail gracefully with a message indicating no match was found. The script performs case-insensitive substring matching, so partial hints often succeed. If your hint fails, consult skills/routing.md for the exact phrasing used in the routing table.
Is there a way to list all available tools without opening individual SKILL.md files?
Yes. After running bootstrap-reverse.ps1, examine skill/tool-index.md which contains an auto-generated inventory of all discovered executables. Run refresh-tool-index.sh anytime to update this index when you install new tools.
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 →