Bootstrap Process for Refreshing the Tool Index on Windows and Kali Linux
The reverse-skill repository implements a cross-platform bootstrap system that regenerates the tool index by scanning installed binaries, checking service capabilities, and outputting synchronized Markdown and JSON catalogs.
The bootstrap process for refreshing the tool index enables the routing engine to resolve correct skill scripts across different operating systems. This system is implemented in the zhaoxuya520/reverse-skill repository and maintains parity between Windows PowerShell and Kali Linux Bash environments. Both platforms execute identical logical steps while writing outputs to skills/tool-index.md and skills/tool-index.json for universal accessibility.
Platform-Specific Entry Points
The refresh workflow begins at platform-specific scripts that handle shell syntax differences while preserving core functionality.
Windows PowerShell executes skills/scripts/refresh-tool-index.ps1, which orchestrates the discovery and generation pipeline.
Kali Linux uses kali/scripts/refresh-tool-index.sh to perform the equivalent operations via Bash.
Both scripts source shared discovery libraries that define the scanning universe. The Bash version loads lib/tool-discovery.sh, while the PowerShell counterpart imports skills/scripts/lib/ToolDiscovery.ps1.
Discovery and Scanning Phase
The discovery layer initializes two parallel data structures that drive the scanning process:
TOOL_CATALOG– An array listing all tools to probe for availability.SCRIPT_REFS– A mapping array linking each tool name to the skill-specific scripts that reference it.
For every entry in TOOL_CATALOG, the scripts invoke the resolve_tool function (or its PowerShell equivalent). This helper checks four critical attributes:
- Binary presence on the system
PATH. - Resolved absolute file location.
- Installed version string (when detectable).
- Originating skill defined in the corresponding
SKILL.mdfile.
The function returns a pipe-delimited string that the parser splits into the standard columns: Tool, Skill, Purpose, Available, Path, Version, and Source.
Markdown Table Generation
After resolving the tool catalog, the scripts generate a human-readable Markdown table. The Bash implementation writes the header, timestamp, and static columns between lines 18-42, while the PowerShell version handles this between lines 70-92.
The output follows a strict schema that allows the routing engine to quickly identify which skills are actionable based on installed dependencies.
Capability Status Assessment
Following the tool table, the bootstrap generates a secondary capabilities view that evaluates higher-level services like jadx, frida, and idapro. This assessment queries four dimensions for each capability:
- Binary availability – Whether the executable is present.
- MCP registration – Status checked via
check_mcp_registered. - Service health – TCP port probes for running services.
- Auto-install feasibility – Bootstrap kind classification (
apt-package,github-release,pip-package,npm-mcp, etc.).
In the Bash script, this logic occupies sections 45-55, while the PowerShell implementation spans lines 98-122. The capability data appends directly to the Markdown output, providing a complete operational picture.
JSON Payload Construction
The refresh process mirrors the Markdown data into structured JSON for programmatic consumption.
If jq is present on Kali Linux, the Bash script constructs the JSON payload in sections 37-80, parsing the pipe-delimited tool records into proper JSON objects. The PowerShell version builds the JSON object natively after Markdown generation (lines 151-173) using standard object serialization.
Both platforms write the final output to skills/tool-index.json, ensuring the routing engine can parse the index regardless of the host operating system.
Bootstrap-Refresh Coupling
The higher-level bootstrap scripts integrate installation and index regeneration into a single workflow. bootstrap-reverse.ps1 (Windows) and bootstrap-reverse.sh (Kali Linux) perform three sequential operations:
- Install missing capabilities based on the requested tools.
- Optionally start required services.
- Invoke the refresh script to update the index.
In the Kali Linux bootstrap, this coupling appears at line 87, where the script calls the refresh routine immediately after capability installation completes. This ensures the tool-index.md and tool-index.json files always reflect the current system state after bootstrap operations.
Running the Refresh Bootstrap
Execute the platform-appropriate script from the repository root to regenerate the tool index.
Refresh index on Windows:
powershell -NoProfile -ExecutionPolicy Bypass -File skills/scripts/refresh-tool-index.ps1
Refresh index on Kali Linux:
bash kali/scripts/refresh-tool-index.sh
Full bootstrap with installation on Kali Linux:
# Installs jadx and apktool, then regenerates the index
bash kali/scripts/bootstrap-reverse.sh jadx apktool
Full bootstrap with installation on Windows:
# Installs jadx and frida, then refreshes the index
powershell -NoProfile -ExecutionPolicy Bypass -File skills/scripts/bootstrap-reverse.ps1 -Capability jadx,frida
Summary
- The bootstrap process for refreshing the tool index uses platform-specific scripts (
refresh-tool-index.ps1andrefresh-tool-index.sh) that share identical logic through discovery libraries. - The
resolve_toolfunction probes binary availability, paths, versions, and skill origins for every entry in theTOOL_CATALOGarray. - Output generation creates both a Markdown table (lines 18-42 in Bash, 70-92 in PowerShell) and a JSON catalog for routing engine consumption.
- Capability assessment tracks MCP registration, service health, and bootstrap kinds (
apt-package,github-release, etc.) in secondary tables. - Higher-level bootstrap scripts (
bootstrap-reverse.ps1andbootstrap-reverse.sh) couple installation workflows with automatic index refresh to maintain synchronization.
Frequently Asked Questions
How does the tool discovery layer work across different platforms?
Both platforms source shared libraries that define the TOOL_CATALOG and SCRIPT_REFS arrays. The Bash version loads lib/tool-discovery.sh, while PowerShell imports ToolDiscovery.ps1. These libraries expose the resolve_tool function that normalizes platform-specific path lookups into a standard pipe-delimited format containing Tool, Skill, Purpose, Available, Path, Version, and Source fields.
What is the difference between the tool table and the capability status view?
The tool table lists individual binaries discovered on the system path with their metadata. The capability status view evaluates higher-level functional units like jadx or frida, checking not only binary presence but also MCP registration status via check_mcp_registered, TCP service health, and auto-install feasibility categorized by bootstrap kind.
Where are the generated index files stored after running the bootstrap?
Both the Markdown and JSON outputs are written to the skills/ directory regardless of platform. The files skills/tool-index.md and skills/tool-index.json serve as the canonical references for the routing engine (SKILL.md → routing.md) to resolve appropriate skill scripts and MCP services for any given reverse engineering task.
Can I run the refresh script independently without performing a full bootstrap?
Yes. The refresh scripts (refresh-tool-index.ps1 and refresh-tool-index.sh) operate independently of the bootstrap scripts. While bootstrap-reverse.sh and bootstrap-reverse.ps1 call the refresh routine automatically after installing capabilities, you can execute the refresh scripts directly to update the index without triggering package installations.
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 →