Skip to content

feat: Choose whether skills install at the Unity project root or the Git repository root - #3395

Merged
hatayama merged 9 commits into
mainfrom
feat/skills-install-root-selection
Oct 27, 2026
Merged

hatayama merged 9 commits into
mainfrom
feat/skills-install-root-selection

Conversation

@hatayama

@hatayama hatayama commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Skills can now be installed at the Git repository root as well as the Unity project root, chosen from the CLI or from the Editor.
  • The installed-skills status in Settings and the Setup Wizard checks whichever location is chosen.

User Impact

  • Before: project-local skills (.claude/skills, .agents/skills, ...) always went under the Unity project root. People whose agents start at the Git repository root, with the Unity project in a subfolder, had to copy them by hand, and the Editor reported their skills as missing.
  • After:
    • uloop skills list|install|uninstall accept --root unity|git. git installs at the nearest directory, at or above the Unity project, that holds a .git directory or file, so worktrees and submodules count.
    • The Skills section in Settings and the Setup Wizard has a Location picker at the bottom, set off by a divider, and shows the resolved directory. The choice is saved in .uloop/settings.skills.json. A uloop skills command without --root follows it, so the CLI and the Editor install into the same place; --root overrides it for one run. Like settings.tools.json, the file can be committed so a whole team installs at the same root; the README lists it in the recommended .gitignore exceptions.
    • With no Git repository, --root git is an error instead of silently installing at the Unity root. In the Editor the picker is disabled; installs from Settings, the Setup Wizard, and the migration wizard explain the problem in a dialog.
    • Switching the location does not move or delete copies at the other root. The auto-refresh during skills install only covers the chosen root, and the help text says so.

Changes

  • CLI (dispatcher):
    • Parses --root, rejects it together with --global or --output-dir, and otherwise reads the saved setting.
    • Resolves the Git root, then passes the resolved install root to list, install, uninstall, auto-refresh, and the V3 migration subcommands.
    • Skill sources and tool settings are still read from the Unity project root.
  • Editor:
    • A new resolver reads and writes the shared settings file, and the skill setup port applies the saved install root to every detect, install, and remove.
    • A malformed settings file logs a warning and falls back to the Unity root, so the user can pick a location again. The CLI rejects the same file instead.
  • Presentation: a shared picker view in the Skills panel, wired into the Settings presenter and the Setup Wizard controller. The availability checks run before installs.
  • Docs: README / README_ja --root git example, settings.skills.json in the .uloop/ file table and recommended .gitignore, and a "Skill install root" glossary entry.

Verification

  • scripts/check-go-cli.sh
  • uloop compile (0 errors, 0 warnings)
  • Scoped EditMode runs:
    • The skill setup, synchronizer, presenter, Setup Wizard, CLI setup section, and migration wizard test classes.
    • The new SkillInstallRootResolverTests and SkillsInstallRootTextTests.
  • Manual:
    • Switched the picker to Git Repository Root in Settings and confirmed it saved {"installRoot":"git"}.
    • A flagless uloop skills list then reported the Git root.
    • Ran --root git against a nested fixture project.

Teams split on where their agents start: some open the Unity project,
others open the Git repository that contains it, and skills installed
under the Unity root are invisible to the latter.

- Add --root unity|git to skills list/install/uninstall and the V3
  migration subcommands; git resolves to the nearest ancestor of the
  Unity project root (inclusive) holding a .git directory or file, and
  fails instead of falling back when there is none
- Without --root, follow installRoot saved by the Editor in
  .uloop/settings.skills.json so the CLI and the Editor install into
  the same place; --global and --output-dir ignore it
- Only the destination moves: skill sources and disabledTools still
  come from the Unity project root
- Move the target definitions into skills_targets.go to keep skills.go
  under the 500-line limit
The Editor wrote agent skill folders under the Unity project root only,
so teams whose agents start at the Git repository root could not use
the Editor installer.

- Save the choice in .uloop/settings.skills.json with the installRoot
  spelling the CLI reads, so both installers target the same root
- ToolSkillSetupService resolves the install root on every call, so
  every caller (Settings, Setup Wizard, migration wizard, tool toggles)
  follows the saved choice without knowing about it; skill sources and
  disabled tools still come from the Unity project root
- An unavailable Git root makes explicit installs throw, detection
  report nothing, and tool-toggle syncs skip with a warning
- Synchronizer methods that only touch target folders now take the
  install root and are named AtInstallRoot
Users need to pick between the Unity project root and the Git
repository root in the GUI, and the installed-skills status must be
checked at the same place the skills are installed.

- Add a Location picker to the shared skills panel, so both Settings
  and Setup Wizard save the choice and rescan the status list there
- Show the resolved directory under the picker; when no Git repository
  contains the project the picker is disabled unless the unavailable
  Git root is the saved choice, so the user can switch back
- Installing into an unavailable Git root shows a dialog instead of
  letting the install throw
- The Settings presenter rereads the saved choice on every refresh so
  a choice made in the Setup Wizard shows up without reopening
Auto-refresh only looks under the chosen install root, so copies left
under the other root after switching roots are not kept up to date;
the help text now says so instead of promising they never go stale.
The install location is a setting rather than a status, so it sits
below the status list and install buttons, set off by a divider.
The setting lives under .uloop/, which projects keep out of version
control, so the choice belongs to each checkout rather than to a team.
… tool toggle

The migration wizard installed its skill without checking the saved
install root, so a Git root with no repository surfaced only as a logged
exception. It now shows the same dialog as Settings and Setup Wizard.

Enabling a tool while that root is unavailable skips the skill sync with
its own warning; the follow-up check then blamed the skill source layout.
That second warning is now suppressed when the install root is the cause.
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between b3b4548 and 000991b.

Files selected for processing: 4
  • README.md
  • README_ja.md
  • cli/dispatcher/internal/dispatcher/skills_install_root.go
  • docs/glossary.md
Files skipped from review as they are similar to previous changes: 4
  • docs/glossary.md
  • README_ja.md
  • README.md
  • cli/dispatcher/internal/dispatcher/skills_install_root.go

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Walkthrough

The change adds Unity project and Git repository skill install roots in the Editor and CLI. The Editor saves and displays the selected root. The CLI accepts a root option or reads the saved selection. Skill installation and detection use the resolved destination.

Changes: Skill install root selection

Layer / File(s) Summary
Install-root contract and saved selection
Packages/src/Editor/Domain/*, Packages/src/Editor/Application/UseCases/SkillSetupUseCase.cs, Packages/src/Editor/Infrastructure/SkillSetup/SkillInstallRootResolver.cs, Assets/Tests/Editor/SkillInstallRootResolverTests.cs
The Editor adds Unity project and Git repository root selection, persists the selection in .uloop/settings.skills.json, and discovers the nearest ancestor containing a .git file or directory.
Editor install and detection routing
Packages/src/Editor/Infrastructure/SkillSetup/*, Assets/Tests/Editor/ToolSkillSynchronizer*, Assets/Tests/Editor/SkillInstallRootResolverTests.cs, Assets/Tests/Editor/V3MigrationSkillInstallerTests.cs
Editor skill detection, installation, removal, and migration use the selected install root. Skill sources remain tied to the Unity project root.
Editor picker and workflow integration
Packages/src/Editor/Presentation/Setup/*, Packages/src/Editor/Presentation/Shared/*, Packages/src/Editor/Presentation/UIToolkit/*, Packages/src/Editor/Presentation/UnityCliLoopSettings*, Assets/Tests/Editor/*Workflow*Tests.cs, Assets/Tests/Editor/SkillsInstallRootTextTests.cs, Assets/Tests/Editor/CliSetupSectionTests.cs
The Editor displays and saves the selected root. Installation workflows show an unavailable-root dialog and stop when the selected Git root cannot be resolved.
CLI root parsing and resolution
cli/dispatcher/internal/dispatcher/skills_install_root.go, cli/dispatcher/internal/dispatcher/skills_options.go, cli/dispatcher/internal/dispatcher/skills_install_root_test.go
The CLI parses --root unity and --root git, loads saved settings when the option is omitted, and resolves the nearest Git ancestor when Git is selected.
CLI skill commands and coverage
cli/dispatcher/internal/dispatcher/skills.go, cli/dispatcher/internal/dispatcher/skills_v3_migration.go, cli/dispatcher/internal/dispatcher/skills_display.go, cli/dispatcher/internal/dispatcher/skills_targets.go, cli/dispatcher/internal/dispatcher/*_test.go, README.md, README_ja.md, docs/glossary.md
CLI listing, installation, uninstallation, target detection, and V3 migration use the resolved root. Help text and documentation describe root selection and its interaction with saved settings.

Priority: Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant SkillsCLI
  participant skillsInstallRootFor
  participant SettingsFile as settings.skills.json
  participant installSkillsForTarget
  User->>SkillsCLI: Request skills install with --root git
  SkillsCLI->>skillsInstallRootFor: Resolve root from projectRoot and options
  skillsInstallRootFor->>SettingsFile: Read saved root when no option is supplied
  skillsInstallRootFor-->>SkillsCLI: Return resolved installRoot
  SkillsCLI->>installSkillsForTarget: Install target at installRoot
Loading
Merge Risk: Minimal · up to 00099

The reviewed root-selection behavior and documentation show no unresolved issue; the change is mergeable after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: selecting whether skills install at the Unity project root or the Git repository root.
Description check Passed The description directly explains the CLI and Editor changes, user impact, error handling, documentation updates, and verification for configurable skill install roots.
Docstring Coverage Passed Docstring coverage is inconclusive: files from earlier reviews still need to be rechecked within the check's analysis limits. Not blocking.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The picker enum mirrored SkillInstallRoot through numeric casts, so its
members were never referenced by name and the dead code gate counted
them as two new public candidates. Explicit switch mappings reference
each member and fail loudly if the two enums ever drift apart.
settings.skills.json sits in .uloop/, which the recommended .gitignore
ignores. Teams that want everyone's agents to read skills from the same
root need to know they can track it, the same way settings.tools.json is
already offered, so the README table and pattern now list it and the
code comment no longer calls it a per-checkout choice.
@hatayama
hatayama merged commit a16951e into main Oct 27, 2026
17 checks passed
@hatayama
hatayama deleted the feat/skills-install-root-selection branch October 27, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant