npx skills add ...
npx skills add microsoft/hve-core --skill hve-core-installer
Decision-driven HVE-Core installer with multiple clone-based and extension install methods, environment detection, and selective component installation
npx skills add microsoft/hve-core --skill hve-core-installer
Decision-driven installer for HVE-Core with environment detection, 6 clone-based installation methods, extension quick-install, validation, MCP configuration, and selective component installation workflows.
Operate as two collaborating personas:
The Installer persona handles all detection and execution. After installation completes, switch to the Validator persona to verify success before reporting completion.
Re-run Behavior: Running the installer again validates an existing installation or offers upgrade. Safe to re-run anytime.
| Phase | Name | Purpose |
|---|---|---|
| 1 | Environment Detection | Obtain consent and detect user's environment |
| 2 | Installation Path Selection | Choose between Extension (quick) or Clone-based installation |
| 3 | Environment Detection & Decision Matrix | For clone path: detect environment and recommend method |
| 4 | Installation Methods | Execute the selected installation method |
| 5 | Validation | Verify installation success and configure settings |
| 6 | Post-Installation Setup | Configure gitignore and present MCP guidance |
| 7 | Component Installation | Optional: copy selected components for local use (clone-based only) |
Flow paths:
Before presenting options, detect the user's environment to filter applicable installation methods.
Present the following and await explicit consent:
If user declines, respond: "Installation cancelled. You can invoke this skill anytime to restart."
Upon consent, proceed to Phase 2 to offer the installation path choice.
Present the installation path choice before environment detection. Extension installation does not require shell selection or environment detection.
Present the following choice:
User input handling:
If user selects Option 1 (Quick Install):
If user selects Option 2 (Clone-Based):
When to choose Clone over Extension:
Before clone-based installation, verify git is available:
git --versionWhen the user selects Bash, also verify jq is available:
jq --versionWhen user selects Quick Install, first ask which VS Code variant they are using:
User input handling:
code CLIcode-insiders CLIStore the user's choice as the code_cli variable for use in validation scripts.
Display progress message:
Execute VS Code CLI command:
After command execution, proceed to Extension Validation.
Run the appropriate validation script based on the detected platform (Windows = PowerShell, macOS/Linux = Bash). Use the code_cli value from the user's earlier choice (code or code-insiders).
PowerShell: Run scripts/validate-extension.ps1 with the code_cli variable set.
Bash: Run scripts/validate-extension.sh with the code_cli variable set.
Upon successful validation, display:
After displaying the extension success report, proceed to Phase 6: Post-Installation Setup for gitignore and MCP configuration options.
If extension installation fails, provide targeted guidance:
| Error Scenario | User Message | Recovery Action |
|---|---|---|
| Trust dialog declined | "Installation was cancelled. You may have declined the publisher trust prompt." | Offer retry or switch to clone method |
| Network failure | "Unable to connect to VS Code Marketplace. Check your network connection." | Offer retry or CLI alternative |
| Organization policy block | "Extension installation may be restricted by your organization's policies." | Provide CLI command for manual installation |
| Unknown failure | "Extension installation failed unexpectedly." | Offer clone-based installation as fallback |
Flow Control After Failure:
If extension installation fails and user cannot resolve:
Run the appropriate detection script based on the user's shell:
PowerShell: Run scripts/detect-environment.ps1
Bash: Run scripts/detect-environment.sh
Based on detected environment, ask the following questions to determine the recommended method.
Present options filtered by detection results:
Ask this question only when multiple methods match the environment + team answers:
Use this matrix to determine the recommended method:
| Environment | Team | Updates | Recommended Method |
|---|---|---|---|
| Any (simplest) | Any | - | Extension Quick Install (works in all environments) |
| Local (no container) | Solo | - | Method 1: Peer Clone |
| Local (no container) | Team | Controlled | Method 6: Submodule |
| Local devcontainer | Solo | Auto | Method 2: Git-Ignored |
| Local devcontainer | Team | Controlled | Method 6: Submodule |
| Codespaces only | Solo | Auto | Method 4: Codespaces |
| Codespaces only | Team | Controlled | Method 6: Submodule |
| Both local + Codespaces | Any | Any | Method 5: Multi-Root Workspace |
| HVE-Core repo (Codespaces) | - | - | Method 4: Codespaces (already configured) |
After gathering answers:
Each supported installation path is documented end to end in references/installation-methods.md. Select the path resolved by the decision matrix above and follow it there. When that file is unavailable, warn the user that installation cannot proceed for the selected method and stop rather than improvising the steps.
After installation completes, switch to the Validator persona and verify the installation.
[!IMPORTANT] After successful validation, proceed to Phase 6 for post-installation setup, then Phase 7 for optional component installation (clone-based methods only).
Before modifying settings.json, present the following:
If user declines: "Installation cancelled. No settings changes were made."
Run validation based on the selected method. Set the base path variable before running:
| Method | Base Path |
|---|---|
| 1 | ../hve-core |
| 2 | .hve-core |
| 3, 4 | /workspaces/hve-core |
| 5 | Check workspace file |
| 6 | lib/hve-core |
PowerShell: Run scripts/validate-installation.ps1 with the method and basePath variables set.
Bash: Run scripts/validate-installation.sh with the method number and base path as arguments.
Upon successful validation, display:
After displaying the success report, proceed to Phase 6 for post-installation setup.
Read references/post-installation-setup.md and perform every step it specifies before continuing. When that file is unavailable, warn the user that post-installation setup cannot be completed and stop rather than improvising the steps.
Read references/component-installation.md and follow its component installation and upgrade procedures exactly, including every confirmation gate it defines. For Methods 3 and 5, verify the pre-existing HVE-Core clone's configured upstream source before collision detection or copy, using the warning and confirmation behavior in that reference. When the reference is unavailable, warn the user that component installation and upgrade cannot be performed and stop without writing to the target repository.
Provide targeted guidance when steps fail:
| Error | Troubleshooting |
|---|---|
| Not in git repo | Run from within a git workspace; verify git --version |
| Clone failed | Check network to github.com; verify git credentials and write permissions |
| Validation failed | Repository may be incomplete; delete HVE-Core directory and re-run installer |
| Settings update failed | Verify settings.json is valid JSON; check permissions; try closing VS Code |
To remove a failed or unwanted installation:
| Method | Cleanup |
|---|---|
| Extension | VS Code → Extensions → HVE Core → Uninstall |
| 1 (Peer Clone) | rm -rf ../hve-core |
| 2 (Git-Ignored) | rm -rf .hve-core |
| 3-4 (Mounted/Codespaces) | Remove mount/postCreate from devcontainer.json |
| 5 (Multi-Root) | Delete .code-workspace file |
| 6 (Submodule) | git submodule deinit lib/hve-core && git rm lib/hve-core |
Then remove HVE-Core paths from .vscode/settings.json.
If you used Phase 7 component installation, also delete .hve-tracking.json and any copied .github/agents/, .github/prompts/, .github/instructions/, or .github/skills/ content you no longer need.
Never modify files without explicit user authorization. Always explain changes before making them. Respect denial at any checkpoint.
Checkpoints requiring authorization:
Use these exact emojis for consistency:
In-progress indicators (always end with ellipsis ...):
Completion indicators:
Success: Environment detected, method selected, HVE-Core directories validated (agents, prompts, instructions, skills), settings configured, user directed to reload.
Failure: Detection fails, clone/submodule fails, validation finds missing directories, or settings modification fails.