Difference Between Bootstrap and Refresh-Tool-Index Scripts in Reverse-Skill
The bootstrap-reverse.ps1 script installs and configures tools and capabilities, while refresh-tool-index.ps1 generates documentation files that inventory the current state of installed tools without modifying the system.
The zhaoxuya520/reverse-skill repository automates reverse-engineering environment setup through PowerShell scripts located in skills/scripts. Understanding the distinct roles of these two core scripts ensures proper environment initialization and accurate tool tracking.
Primary Functional Differences
Bootstrap-Reverse.ps1: Installation and Configuration
The bootstrap-reverse.ps1 script serves as the installer and initializer for the reverse-skill ecosystem. It processes the declarative skills/config/bootstrap-manifest.json to resolve dependencies and execute installations via package managers like winget, npm, pip, go, and git.
Key responsibilities include:
- Installing required runtimes and tools (Node.js, Python, Android SDK, etc.)
- Resolving capability dependencies through the
Ensure-CapabilityandEnsure-GitHubZipInstallfunctions - Registering MCP (Model Context Protocol) servers and modifying configuration files
- Starting background services such as Anything Analyzer via
Start-AnythingAnalyzerService
Refresh-Tool-Index.ps1: Discovery and Reporting
The refresh-tool-index.ps1 script operates as a report generator and inventory tool. It uses Get-ReverseToolReport and Get-ReverseCapabilityState to scan the system and produce human-readable and machine-readable documentation.
Key responsibilities include:
- Discovering currently installed tools and their versions without installing new software
- Generating
tool-index.md(Markdown table) andtool-index.json(JSON payload) at the repository root - Summarizing tool availability, source locations, and capability status for consumption by Claude, Codex, or developers
Workflow Position and Execution Order
These scripts occupy opposite ends of the setup workflow:
- First step: Run
bootstrap-reverse.ps1to prepare the environment and ensure required capabilities (e.g.,adb,apktool,frida,anything-analyzer) are present - Last step: Execute
refresh-tool-index.ps1to reflect the current tool landscape after any changes
The bootstrap script automatically invokes the refresh script at completion unless you supply the -SkipRefresh parameter, ensuring the index remains synchronized with the newly installed capabilities.
Parameter and Side Effect Comparison
| Aspect | Bootstrap-Reverse.ps1 | Refresh-Tool-Index.ps1 |
|---|---|---|
| Primary parameters | -Capability, -SkipRefresh, -StartServices, -McpHostTarget |
-OutputMarkdown, -OutputJson |
| System modifications | Installs packages, modifies MCP configs, starts services | Writes only to tool-index.md and tool-index.json |
| Safety profile | Destructive (changes system state) | Non-destructive (read-only discovery) |
| Key functions | Ensure-Capability, Ensure-NodeRuntime, Start-AnythingAnalyzerService |
Get-ReverseToolReport, Get-ReverseCapabilityState, Add-Content |
Practical Usage Examples
Bootstrapping New Capabilities
Install required tools for specific reverse-engineering workflows and automatically update the index:
powershell -NoProfile -ExecutionPolicy Bypass `
-File skills/scripts/bootstrap-reverse.ps1 `
-Capability apktool,frida `
-StartServices `
-McpHostTarget Both
This command resolves dependencies for Apktool and Frida, registers MCP servers for both targets, starts associated services, and triggers refresh-tool-index.ps1 to document the new installation.
Refreshing Documentation Only
Regenerate the tool inventory without reinstalling or modifying anything:
powershell -File skills/scripts/refresh-tool-index.ps1 `
-OutputMarkdown ./tool-index.md `
-OutputJson ./tool-index.json
This scans the system using the ToolDiscovery.ps1 helper library and rebuilds the documentation files to reflect current availability and versions.
Supporting Infrastructure
Both scripts rely on shared resources in the zhaoxuya520/reverse-skill repository:
skills/scripts/lib/ToolDiscovery.ps1: Helper library providing tool detection and path resolution functions used by both scriptsskills/config/bootstrap-manifest.json: Declarative configuration defining capabilities, bootstrap methods, and installation locationstool-index.md(generated): Human-readable table for debugging and manual referencetool-index.json(generated): Machine-readable payload for automated routing and AI context
Summary
- Bootstrap-reverse.ps1 is the installer that modifies system state by downloading, configuring, and starting tools and services
- Refresh-tool-index.ps1 is the documenter that performs read-only discovery to generate
tool-index.mdandtool-index.json - The bootstrap script calls the refresh script automatically unless
-SkipRefreshis specified - Use bootstrap when setting up new environments; use refresh when you need to audit or document existing installations
Frequently Asked Questions
Can I run refresh-tool-index.ps1 without running bootstrap-reverse.ps1 first?
Yes. The refresh script performs only read-only discovery and documentation generation. You can run it independently to inventory existing tools on a system that was configured manually or through other means, as long as the tools are discoverable via the paths defined in ToolDiscovery.ps1.
What happens if I use -SkipRefresh during bootstrap?
When you invoke bootstrap-reverse.ps1 with the -SkipRefresh switch, the script completes all installations and service startups but skips the automatic execution of refresh-tool-index.ps1. The tool-index.md and tool-index.json files will not be updated to reflect the new installations until you manually run the refresh script.
Does refresh-tool-index.ps1 modify MCP server configurations?
No. The refresh script exclusively generates documentation files. MCP server registration and configuration file modifications are handled exclusively by bootstrap-reverse.ps1 during the capability installation phase, specifically through functions that configure the -McpHostTarget parameters for Claude Desktop or other compatible hosts.
Where does the bootstrap script get its installation instructions?
The bootstrap script references skills/config/bootstrap-manifest.json, which contains declarative definitions for each capability including bootstrap kind (winget, npm, pip, zip), install locations, and auto-install flags. This manifest drives the Ensure-Capability function logic to determine which package manager or installation method to invoke.
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 →