Repository navigation
Hand the Menu's Skills Install to the Bootstrap's Kept Tree - #1923
Conversation
Run from a downstream repo or from no checkout at all, the menu's install-skills task ran the installer from the hub clone it fetched, which registered that clone as the Claude Code marketplace. The menu removes the clone on exit, so every later session found the registration naming a directory that no longer existed and loaded no fleet skills. From a fetched clone, the task now runs that clone's bootstrap --skills / -Skills at the same ref, whose kept tree outlives the run. A hub checkout the menu runs from still installs from itself. The menu's own --dir is not passed on, since it is a cache for the clone. The one flagged comment line is the existing Out-Host note, moved with the body it explains. Fixes #1771 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change correctly redirects Skills installation away from the transient fetched clone to the bootstrap’s kept tree, updates both bash and PowerShell implementations consistently, and includes targeted regression tests for the new menu behavior.
Review effort: Lite
Findings: None
What changed in this PR
This PR fixes the menu-driven Skills install path so it no longer registers a Claude Code marketplace pointing at a transient hub clone that the menu deletes on exit. When the menu had to fetch the hub (HUB_FETCHED), it now delegates the install to the hub clone’s bootstrap --skills path so the registration targets the bootstrap’s kept skills-tree instead of the soon-to-be-removed checkout.
Changes:
- Refactors menu script execution helpers to support running tools from
host-setup/(not onlyhost-setup/<platform>/) viarun_in_hub(bash) /Invoke-InHub(PowerShell). - Updates the “Install or update the fleet Skills” menu action to use
bootstrap.(sh|ps1) --skillswhen the hub was fetched, and keep the direct installer path when running from a hub checkout. - Adds Linux-only unit tests that source
menu.shfunctions and assert the correct installer path/arguments are chosen for fetched-vs-local hub scenarios; updateshost-setup/README.mdto document the rationale and prerequisites.
| File | Description |
|---|---|
| scripts/tests/test_bootstrap.py | Adds TestMenuSkillsInstall to assert the menu’s skills install delegates to bootstrap for fetched hubs and uses the in-checkout installer otherwise. |
| host-setup/README.md | Documents why the menu hands off Skills install to bootstrap when using a freshly fetched clone, and notes required network/tooling prerequisites. |
| host-setup/menu.sh | Introduces run_in_hub and a dedicated install_skills action that delegates to bootstrap.sh --skills --ref ... for fetched hubs. |
| host-setup/menu.ps1 | Introduces Invoke-InHub and updates Skills install to delegate to bootstrap.ps1 -Skills -Ref ... for fetched hubs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…pt-tree # Conflicts: # host-setup/README.md
Test-Path and Remove-Item read a bare path as a wildcard pattern, so a -Dir or hub root holding [ or ] missed the tool it looked for and left the fetched clone behind on exit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes consistently route skills installation through the bootstrap’s durable tree for transient hub clones and add targeted tests to lock in the intended behavior.
Review effort: Lite
Findings: None
Resolved since last review (1)
…to Main (#1924) ## Summary Promotes `develop` to `main`, carrying two changes: - #1922, Type the Hub Python and Run Its Suite Through the Shared Validator. The hub now declares the `python` type with the `lint-only` profile and `.` in `python-directories`. Its unittest suite moves from `scripts/tests` to a root `tests/`, which the shared validator's Python leg runs under coverage and uploads to Codecov. Both callers pass the input and `CODECOV_TOKEN`. The hub gains `codecov.yml` and a lint-only `.vscode/tasks.json`, and the GOVERNANCE.md layout and README.md describe it as it now is. - #1923, Hand the Menu's Skills Install to the Bootstrap's Kept Tree. Run from outside a hub checkout, the menu's skills task installed from the clone it then removed on exit, leaving the Claude Code marketplace registered against a missing directory. From a fetched clone it now hands off to that clone's `bootstrap.sh --skills` / `bootstrap.ps1 -Skills`, whose kept tree outlives the run, and every path cmdlet in `menu.ps1` reads its path literally. Closes #1913 Fixes #1771 ## Maintainer follow-ups - Store `CODECOV_TOKEN` in the hub's actions and dependabot secret stores. Until then the audit reports it missing and the best-effort upload sends nothing. - Add the Python extensions to the workspace file. An agent may not edit an active `.code-workspace`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Part of #1771.
Problem
Run from a downstream repo or from no checkout at all, the menu's "Install or update the fleet Skills" task ran
install-skillsfrom the hub clone the menu fetched into$DIR/hub. The installer registers the directory it runs from as theprojecttemplate-fleetClaude Code marketplace, which Claude Code loads in place. The menu removes that clone on exit unless--keepis given, so every later session found a registration naming a missing directory and loaded no fleet skills. Observed on a Windows host:skills_install.py --reportreadlive.reason: the registered checkout does not exist, so this channel serves nothing, with%LOCALAPPDATA%\host-setup\empty.Change
menu.shandmenu.ps1: when the hub is the menu's own fetched clone (HUB_FETCHED), the skills task runs that clone'sbootstrap.sh --skills --ref "$REF"/bootstrap.ps1 -Skills -Ref $REF, whose keptskills-treeoutlives the run, per Keep the Bootstrap's Skills Tree So the Claude Code Plugin Outlives the Run #1773. A hub checkout the menu runs from still installs from itself. The menu's own--diris not forwarded, since it is a cache for the clone and the bootstrap keeps its tree under its own directory.host_tool_locked/Invoke-HostToolasrun_in_hub/Invoke-InHub, so the skills task can targethost-setup/as well ashost-setup/<platform>/.host-setup/README.mdsays why the task hands off, and names what that handoff needs:curlandtaron Linux, andcodeload.github.comreachable (api.github.comonly records the installed commit).scripts/tests/test_bootstrap.py:TestMenuSkillsInstallsourcesmenu.sh's functions against stub scripts and asserts which installer runs, with which arguments, for a fetched clone and for a hub checkout.Out of scope: a host already carrying a dangling registration is not re-pointed by a later install, since
marketplace addof a registered name is a no-op. That is #1769.The
commentslabel covers one existing comment line inmenu.ps1(theOut-Hostnote), moved unchanged with the body it explains intoInvoke-InHub.Verification
TestMenuSkillsInstall(3) andTestKeptTreeHandlingpass on Linux (python:3.12-slim container). The task againstdevelop'smenu.shfails (install_skills_locked: command not found).menu.ps1'sInvoke-SkillsInstalland the refactoredInvoke-HostTooldriven under pwsh 7 on Windows against stub scripts: fetched clone ->bootstrap.ps1 -Skills -Ref <ref> [-Yes], hub checkout ->install-skills.ps1, missing tool -> exit 1 with the existing message.docker_lint.py: shellcheck, shfmt, PSScriptAnalyzer, markdownlint, editorconfig-checker all pass. ruff check/format, mypy, prose gate, and the eol gate pass.🤖 Generated with Claude Code