How to Refresh the Tool Index for Different Platforms in reverse-skill
Run the platform-specific refresh script to regenerate skills/tool-index.md from the template, enabling the system to locate available tools.
The reverse-skill repository by zhaoxuya520 maintains a dynamic tool index that records the local availability and paths of all supported utilities. This index is generated from skills/tool-index.md.template and consumed by bootstrap, routing, and capability check scripts to resolve tool locations. You must refresh the tool index whenever you modify your local tooling to keep the automation accurate.
Platform-Specific Refresh Commands
The repository provides dedicated scripts for each operating system. Choose the command that matches your environment.
Windows (PowerShell)
On Windows, the script scans the registry and standard installation directories to discover executable paths.
powershell -NoProfile -ExecutionPolicy Bypass -File skills/scripts/refresh-tool-index.ps1
This command executes skills/scripts/refresh-tool-index.ps1, which writes the resolved paths to skills/tool-index.md using Windows-style paths (e.g., C:\Program Files\Git\bin\git.exe).
Linux and macOS (Bash)
For generic Unix systems, use the bash script located in the skills/scripts directory.
bash skills/scripts/refresh-tool-index.sh
The script searches standard binary directories such as /usr/local/bin and /usr/bin, then updates the index with Unix-style paths.
Kali Linux (Specialized Bash)
Kali Linux requires additional discovery logic for security tools packaged specifically for the distribution (e.g., aircrack-ng, nmap).
bash kali/scripts/refresh-tool-index.sh
This script extends the generic Unix scanner with Kali-specific discovery routines and writes the consolidated index to the same skills/tool-index.md location.
When to Refresh the Tool Index
According to the repository's RULES.md (lines 113-118), you must re-run the appropriate script in the following scenarios:
- After first cloning the repository – The index does not exist initially, and the README (lines 108-110) explicitly warns to "Run refresh-tool-index first to generate
skills/tool-index.md" before proceeding. - After installing a new capability – Whether adding an MCP, a binary, or a package via pipx/npm, the index must reflect the new availability.
- Following system-wide upgrades – When tools change locations or versions after an OS update, refreshing prevents stale path references.
How the Refresh Scripts Work
The refresh scripts operate by reading skills/tool-index.md.template and expanding it with actual system state.
- Windows: Queries registry entries and known installation directories to locate executables.
- Linux/macOS: Iterates through
$PATHdirectories and standard binary locations. - Kali: Invokes additional
tool-discovery.shlogic to handle specialized security tool packaging.
Each script outputs a markdown table to skills/tool-index.md containing columns for Tool, Available status, and resolved Path, which downstream scripts parse to determine whether to trigger installation routines or use existing binaries.
Summary
- The tool index (
skills/tool-index.md) is generated fromskills/tool-index.md.templateby platform-specific refresh scripts. - Windows users run
skills/scripts/refresh-tool-index.ps1via PowerShell. - Linux/macOS users run
skills/scripts/refresh-tool-index.shvia Bash. - Kali Linux users run
kali/scripts/refresh-tool-index.shfor specialized tool discovery. - Always refresh after cloning, installing new tools, or system upgrades to keep capability checks accurate.
Frequently Asked Questions
What file does the refresh tool index script generate?
The scripts generate skills/tool-index.md by expanding the template at skills/tool-index.md.template with actual tool availability and paths discovered on your local system. This markdown file acts as the runtime reference for all routing and bootstrap scripts.
Do I need administrator privileges to run the refresh scripts?
No, administrator privileges are typically not required. The scripts scan existing paths and registry entries readable by the current user. However, if your tools are installed in protected directories (e.g., C:\Program Files on Windows), standard user read access is usually sufficient for path discovery.
Why is there a separate script for Kali Linux?
Kali Linux packages many security tools (like aircrack-ng) in specialized ways that differ from standard Debian or generic Linux distributions. The kali/scripts/refresh-tool-index.sh script includes additional discovery logic via tool-discovery.sh to correctly locate these distribution-specific binaries that the generic Unix scanner might miss.
What happens if I don't refresh the tool index after installing a new tool?
If you skip refreshing, the automation scripts will not detect the new tool and may attempt redundant installations or fail to route commands to the correct executable. As documented in RULES.md, the index is the authoritative source for the "available vs needs installation" decision logic used by the bootstrap and capability check workflows.
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 →