Repository navigation
feat: Choose whether skills install at the Unity project root or the Git repository root - #3395
Conversation
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.
|
No actionable comments were generated in the recent review.
|
| 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:
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
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: 
5
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.
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.
Summary
User Impact
.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.uloop skills list|install|uninstallaccept--root unity|git.gitinstalls at the nearest directory, at or above the Unity project, that holds a.gitdirectory or file, so worktrees and submodules count..uloop/settings.skills.json. Auloop skillscommand without--rootfollows it, so the CLI and the Editor install into the same place;--rootoverrides it for one run. Likesettings.tools.json, the file can be committed so a whole team installs at the same root; the README lists it in the recommended.gitignoreexceptions.--root gitis 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.skills installonly covers the chosen root, and the help text says so.Changes
--root, rejects it together with--globalor--output-dir, and otherwise reads the saved setting.--root gitexample,settings.skills.jsonin the.uloop/file table and recommended.gitignore, and a "Skill install root" glossary entry.Verification
scripts/check-go-cli.shuloop compile(0 errors, 0 warnings)SkillInstallRootResolverTestsandSkillsInstallRootTextTests.{"installRoot":"git"}.uloop skills listthen reported the Git root.--root gitagainst a nested fixture project.