Repository navigation
Fix orchestration skill coverage for provider-home skill roots (#8256) - #8510
Conversation
Add the per-provider global skill directories that npx skills --global writes to (grok, opencode, pi, antigravity, cursor) to skill discovery, plus matching coverage location definitions and per-agent mappings, and map claude-agent-teams to the same ~/.claude roots as Claude Code. Fixes #8256 Co-authored-by: Orca <help@stably.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughExpanded skill discovery to scan Grok, OpenCode, Pi, Gemini, Antigravity, and Cursor home directories, including symlinked skills under provider roots. Extended orchestration coverage identifiers and agent mappings for these providers and Claude Agent Teams. Added tests for provider-specific coverage, Windows-style OpenCode paths, distinct Gemini and Antigravity handling, and provider-home skill discovery. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
…skills) Co-authored-by: Orca <help@stably.ai>
Adversarial hardening review — 3 roundsRan 3 hostile rounds (fresh reviewer subagent each). Baseline before/after each change: focused vitest ( Change applied (1 should-fix)Added the Gemini CLI home skill root — Why: the authoritative Provider paths — verified against the
|
Settings → Orchestration → Agent coverage decided whether each detected agent had the orchestration skill by matching a skill's single `rootPath` against a hand-maintained table of path segments. Skill discovery dedups by canonical file path, so when one provider home is a symlink onto another agent's skills directory — which `npx skills add --global` does — the two collapse into one row and the absorbed roots survive only in `rootPaths`, which the old matcher ignored. With `~/.grok/skills` symlinked onto `~/.claude/skills`, Claude read Ready and Grok read Missing even though Grok loads the same files. Now classifies every entry in `rootPaths` and resolves each root through the `SkillDiscoverySource` the scanner already returns, accepting it when `sourceKind` is not `repo` and `owner` is either the agent's owner or `null`. Deletes `ORCHESTRATION_SKILL_LOCATIONS` and `ORCHESTRATION_SKILL_LOCATION_IDS_BY_AGENT` — a renderer-side mirror of `buildSkillDiscoverySources` that had to be hand-edited for every new provider root, which is what caused this class of bug. No discovery roots change here; those landed in #8510. Fixed during review: - Restored the required `{ kind: 'local' }` argument to `useDetectedAgents`. Dropping it failed typecheck (TS2554) and pinned `detectedIds` to null, leaving the widget on "Checking installed agents and skill paths…" forever. It also reverted the remote-host scoping from #9790. - Stopped a duplicate repo root from shadowing an owning home root. `SkillDiscoverySource.path` is not unique: when the scan cwd is the home directory, `~/.claude/skills` is scanned as both a home root and a repo root, and a path-keyed Map is last-write-wins — so every agent read Missing while the panel above said Installed. Guaranteed in Settings on a WSL project. - Carried OMP coverage in the owner-based shape so #6422's coverage-table hunks could be dropped on merge. Behavior note: an orchestration skill inside an enabled Claude plugin now counts for Claude. That is a deliberate consequence of trusting the scanner's ownership data, matches how the Codex plugin cache was already treated, and is pinned by a test. Refs #8256 Co-authored-by: sdhilip200 <49802211+sdhilip200@users.noreply.github.com>
…yai#8256) (stablyai#8510) Co-authored-by: Orca <help@stably.ai>
Settings → Orchestration → Agent coverage decided whether each detected agent had the orchestration skill by matching a skill's single `rootPath` against a hand-maintained table of path segments. Skill discovery dedups by canonical file path, so when one provider home is a symlink onto another agent's skills directory — which `npx skills add --global` does — the two collapse into one row and the absorbed roots survive only in `rootPaths`, which the old matcher ignored. With `~/.grok/skills` symlinked onto `~/.claude/skills`, Claude read Ready and Grok read Missing even though Grok loads the same files. Now classifies every entry in `rootPaths` and resolves each root through the `SkillDiscoverySource` the scanner already returns, accepting it when `sourceKind` is not `repo` and `owner` is either the agent's owner or `null`. Deletes `ORCHESTRATION_SKILL_LOCATIONS` and `ORCHESTRATION_SKILL_LOCATION_IDS_BY_AGENT` — a renderer-side mirror of `buildSkillDiscoverySources` that had to be hand-edited for every new provider root, which is what caused this class of bug. No discovery roots change here; those landed in stablyai#8510. Fixed during review: - Restored the required `{ kind: 'local' }` argument to `useDetectedAgents`. Dropping it failed typecheck (TS2554) and pinned `detectedIds` to null, leaving the widget on "Checking installed agents and skill paths…" forever. It also reverted the remote-host scoping from stablyai#9790. - Stopped a duplicate repo root from shadowing an owning home root. `SkillDiscoverySource.path` is not unique: when the scan cwd is the home directory, `~/.claude/skills` is scanned as both a home root and a repo root, and a path-keyed Map is last-write-wins — so every agent read Missing while the panel above said Installed. Guaranteed in Settings on a WSL project. - Carried OMP coverage in the owner-based shape so stablyai#6422's coverage-table hunks could be dropped on merge. Behavior note: an orchestration skill inside an enabled Claude plugin now counts for Claude. That is a deliberate consequence of trusting the scanner's ownership data, matches how the Codex plugin cache was already treated, and is pinned by a test. Refs stablyai#8256 Co-authored-by: sdhilip200 <49802211+sdhilip200@users.noreply.github.com>
Summary
The Orchestration → Agent coverage panel reported the orchestration skill as Missing for agents that actually have it installed. For a user who installed the skill for every agent, the panel showed only "2 of 8 detected agents have the skill" (Claude + Codex ready; Claude Agent Teams, Grok, OpenCode, Pi, Antigravity, Cursor all Missing).
This teaches skill discovery + coverage about each agent's own global skills directory, so an install performed with
npx skills add … --globalis credited to the right agent.Root cause
The reporter's symlink framing is a red herring — symlink following in
src/main/skills/discovery.ts(findSkillFiles, lines ~101-127) is already correct and tested. The real cause is two gaps:src/main/skills/skill-discovery-sources.ts:32-45—buildSkillDiscoverySourcesonly scanned~/.codex/skills,~/.agents/skills,~/.claude/skills, and~/.codex/plugins/cache. It never scanned the per-provider home skill roots thatnpx skills add --globalwrites to, so those installs were never discovered.src/renderer/src/lib/orchestration-skill-coverage.ts:24-57, :103— the coverage layer had no location definitions for those provider roots and no agent→location mappings, so every unmapped agent fell back to['agents-home'].claude-agent-teamswas also unmapped despite reading the same~/.claude/skillsas Claude Code.Issue #8503 independently confirmed the exact symptom (
~/.pi/agent/skills/orchestrationpresent, Pi shown Missing).The fix
Added the provider home skill roots (provider
agent-skills) to discovery, matching coverage location definitions, and per-agent mappings. Each path was verified against the repo's own config-path helpers (not blindly trusted):grok~/.grok/skillssrc/main/grok/hook-service.ts(${home}/.grok)opencode~/.config/opencode/skillsOPENCODE_CONFIG_DIR="$HOME/.config/opencode"pi~/.pi/agent/skillsPI_CODING_AGENT_DIR = ~/.pi/agent; #8503 exampleantigravity~/.gemini/antigravity/skillssrc/main/antigravity/hook-service.ts(~/.gemini/…)cursor~/.cursor/skillssrc/main/cursor/hook-service.ts(~/.cursor)Each agent maps to
['<provider>-home', 'agents-home'], andclaude-agent-teamsmaps to['claude-home', 'agents-home'](it runs Claude Code). Coverage matching reuses the file's existingpathContainsSegmentscontiguous-segment matcher (case-insensitive, backslash-normalized) so Windows/SSH paths work, and thesourceKind !== 'repo'guard keeps repo-scoped installs from counting as global coverage.Because the discovery fix scans these roots (with symlink following intact), this also resolves the sibling report #8503 (Pi/OpenCode).
Evidence
UI screenshot isn't feasible in headless CI — the co-located unit tests are authoritative.
Before (new tests fail against current
main):After (fix applied):
Also green:
pnpm run typecheck:tsc:node,pnpm run typecheck:tsc:web,oxlinton all changed files, and the nearby skill suites (src/main/skills,src/main/ipc/skills.test.ts,useInstalledAgentSkills.test.ts,agent-skill-cli-prerequisite.test.ts— 37 passed).ELI5
Orca has a checklist that says which of your AI helpers already learned the "orchestration" trick. But Orca was only peeking into two of the drawers where the trick can be stored. If you put the trick in Grok's drawer or Pi's drawer, Orca didn't look there, so it said "missing" even though the helper had it. This makes Orca open every helper's own drawer before deciding.
Trade-offs
None for the default layout. Known limitation (pre-existing, matches how the
.codex/.claude/.agentsroots already work): the roots are the default locations, so relocation env vars (XDG_CONFIG_HOME/OPENCODE_CONFIG_DIR,GROK_HOME,PI_CODING_AGENT_DIR) aren't honored for skill discovery yet — a reasonable follow-up.Relationship to existing PR
Connected PR #8329 by @sdhilip200 targets the same bug. I implemented this independently first, then compared: our changes converge on the exact same five provider paths, the same
pathContainsSegmentssegment lists, and the same agent mappings (includingclaude-agent-teams). That independent convergence is strong validation of the path list. Decision: keep this PR independent. It is functionally equivalent to #8329 but adds: a negative-leak assertion (a provider-home install must not mark unrelated agents), an end-to-end symlinked-discovery test tying #8256 + #8503 together, a Windows-backslash case for a multi-segment provider path, and "why" comments. Full credit to @sdhilip200 for the parallel diagnosis — either could land; if #8329 is preferred, the extra tests here are worth cherry-picking.Review loops
1 (a fresh independent reviewer returned CLEAN with no must-fix items; one non-blocking suggestion — a Windows-path case for the new multi-segment locations — was adopted).
Fixes #8256
Made with Orca 🐋