# How to Refresh the Tool Index for Different Platforms in reverse-skill

> Learn how to refresh the tool index for various platforms in reverse-skill. Execute platform-specific scripts to regenerate the tool-index.md file, ensuring accurate tool discovery.

- Repository: [ZhaoXu/reverse-skill](https://github.com/zhaoxuya520/reverse-skill)
- Tags: how-to-guide
- Published: 2026-08-06

---

**Run the platform-specific refresh script to regenerate [`skills/tool-index.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/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
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`](https://github.com/zhaoxuya520/reverse-skill/blob/main/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
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
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`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/tool-index.md) location.

## When to Refresh the Tool Index

According to the repository's [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/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`](https://github.com/zhaoxuya520/reverse-skill/blob/main/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 `$PATH` directories and standard binary locations.
- **Kali**: Invokes additional [`tool-discovery.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/tool-discovery.sh) logic to handle specialized security tool packaging.

Each script outputs a markdown table to [`skills/tool-index.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/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`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/tool-index.md)) is generated from `skills/tool-index.md.template` by platform-specific refresh scripts.
- **Windows** users run `skills/scripts/refresh-tool-index.ps1` via PowerShell.
- **Linux/macOS** users run [`skills/scripts/refresh-tool-index.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/scripts/refresh-tool-index.sh) via Bash.
- **Kali Linux** users run [`kali/scripts/refresh-tool-index.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/kali/scripts/refresh-tool-index.sh) for 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`](https://github.com/zhaoxuya520/reverse-skill/blob/main/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`](https://github.com/zhaoxuya520/reverse-skill/blob/main/kali/scripts/refresh-tool-index.sh) script includes additional discovery logic via [`tool-discovery.sh`](https://github.com/zhaoxuya520/reverse-skill/blob/main/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`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md), the index is the authoritative source for the "available vs needs installation" decision logic used by the bootstrap and capability check workflows.