Repository navigation
feat(skills): inspect provider skills in Settings - #215
Conversation
d0c01bb to
123189f
Compare
123189f to
c08289f
Compare
c08289f to
1cf6259
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
bryantderosier
left a comment
There was a problem hiding this comment.
Reviewed as part of the #214–#216 stack. Stack-wide items, including the FORK.md blocker, are in the summary on #214.
#215 summary
- About 190 lines of Claude plugin-skill discovery live in the upstream
ClaudeSkills.ts, and it deletes upstream's comment.provider/skillPaths.tsis a new J5 file in an upstream folder. Please move both underapps/server/src/j5/skills/. - Unrelated timing logs are added to
ClaudeProvider.ts. - The slash menu now hides built-in skills for every provider. That change isn't in the PR body, and it makes the composer docs inaccurate.
- "Skills" and "Skill Management" are two settings pages for one feature, with the same icon. Please merge them.
skillOriginputs runtime logic in contracts and hardcodes the server's state layout. The discovery-state logic is duplicated between server and web.- A test asserts memoization call counts, and the UI says "T3's" instead of J5 Code.
Crew review: code quality, correctness, security, and spec conformance. Severity tags: blocker, should-fix, nit.
| // frontmatter `name`. Plugins add their namespace: `compress/SKILL.md` with | ||
| // `name: caveman-compress` is `caveman:compress`. Ordinary skillOverrides also | ||
| // use directory names; plugin enablement is independent of those overrides. | ||
| const discoverClaudePluginSkills = Effect.fn("discoverClaudePluginSkills")(function* ( |
There was a problem hiding this comment.
should-fix (fork boundary). About 190 lines of new Claude plugin-skill discovery, discoverClaudePluginSkills plus five schemas, sit inside an upstream provider driver. Please move them to apps/server/src/j5/skills/claudePluginSkills.ts and leave one appended call in discoverClaudeSkills, recorded in FORK.md.
| ); | ||
| }); | ||
|
|
||
| // Claude Code identifies user, project, and plugin skills by directory, not |
There was a problem hiding this comment.
should-fix (fork boundary). This rewrites upstream's explanatory "Claude Code identifies a skill by its directory" comment. Please restore it byte-for-byte so upstream pulls merge cleanly.
| @@ -0,0 +1,32 @@ | |||
| import type { ServerProviderSkill } from "@t3tools/contracts"; | |||
There was a problem hiding this comment.
nit (fork boundary). This is a new J5 file in the upstream provider/ directory. FORK.md "Add, don't modify" puts J5 code under J5-owned paths, so please move it to apps/server/src/j5/skills/ and import it from there.
| cwd, | ||
| resolvedEnvironment, | ||
| ).pipe(Effect.timed); | ||
| yield* Effect.logDebug("Claude skill discovery completed.", { |
There was a problem hiding this comment.
should-fix (scope). The Effect.timed and logDebug instrumentation around capability resolution and skill discovery isn't needed for this feature, and it widens the upstream diff. Please drop it and keep the bundled-skill reloadSkills probe as the only recorded append.
| @@ -61,7 +61,9 @@ export function getProviderSkillsForSlashMenu( | |||
| showSkillsInSlashMenu: boolean, | |||
| ): ServerProviderSkill[] { | |||
| return showSkillsInSlashMenu | |||
| ? dedupeProviderSkillsByName(skills.filter(isProviderSkillUserInvocable)) | |||
| ? dedupeProviderSkillsByName( | |||
| skills.filter((skill) => skill.scope !== "builtin" && isProviderSkillUserInvocable(skill)), | |||
There was a problem hiding this comment.
should-fix (behavior change). This drops scope === "builtin" skills from the slash menu for every provider. It's a composer behavior change outside this PR's stated scope (the Settings inventory), it isn't mentioned in the PR body, and it makes docs/user/composer.md ("Only skills enabled for the provider are listed") inaccurate. client-runtime is also upstream-owned. Please revert it, or split it into its own PR with a reason, update that doc sentence, and add a FORK.md entry.
| @@ -114,6 +116,12 @@ export const SETTINGS_SEARCH_ITEMS = [ | |||
| scope: "project-defaults", | |||
| searchTerms: ["new thread project provider reasoning effort"], | |||
| }, | |||
| { | |||
| id: "skill-management", | |||
There was a problem hiding this comment.
should-fix (product). This adds a second settings page, "Skill Management", next to #214's "Skills". Both use LibraryIcon, and nothing in the names tells you which page installs and which inspects. Each page has its own environment picker, and each adds nav, search, and route entries to upstream settings files. I'd like one Settings → Skills page with Catalog and Installed sections sharing one environment picker. That also removes one upstream append.
| if ( | ||
| locations.some( | ||
| (location) => | ||
| /\/skill-catalogs\/[^/]+\/catalog\//.test(normalizePath(location)) || |
There was a problem hiding this comment.
should-fix. skillOrigin (:30) and its path normalization are runtime logic in contracts, which should stay schema-only. This regex also hardcodes the server's private state layout (/skill-catalogs/<id>/catalog/) from skillCatalogTool.resolveSource. Better: have the server tag catalog-owned skills with an origin field. Otherwise, move this to packages/client-runtime/src/j5 or packages/shared. The same applies to #216's skillLinkUnavailableReason.
| readonly records: ReadonlyMap<ProviderInstanceId, ReadonlyArray<ServerProviderSkill>>; | ||
| } | ||
|
|
||
| export function skillDiscoveryState(provider: ServerProvider, cwd?: string): SkillDiscoveryState { |
There was a problem hiding this comment.
should-fix (duplication). The enabled, installed, availability, status, and workspace readiness logic here is copied in #216's skillLinkDiscovery on the server, and its local normalize duplicates normalizePath. Please put one discoveryState(provider, cwd) helper next to wherever skillOrigin moves and use it in both places.
| .find((button) => textContent(button).trimStart().startsWith(`${origin} `))!; | ||
| } | ||
|
|
||
| it("reuses inventory while typing and rebuilds when snapshots, workspace or catalog change", async () => { |
There was a problem hiding this comment.
should-fix (test quality). This asserts buildSkillInventory and skillDiscoveryState call counts with vi.spyOn, which mirrors the implementation's memoization rather than behavior, and the suite mocks about 15 UI modules. Please drop the call-count assertions and keep the visible-row assertions.
| Plugin: | ||
| "From installed plugins’ skill folders, such as those under ~/.codex/plugins or ~/.claude/plugins.", | ||
| Catalog: | ||
| "From your configured skill catalog directory or T3’s cached catalog checkout, including skills linked to those locations.", |
There was a problem hiding this comment.
nit (branding). "T3’s cached catalog checkout" should be "J5 Code’s cached catalog checkout", or just "the cached catalog checkout", per BRANDING.md.
1cf6259 to
b77d240
Compare
b77d240 to
2b7cb47
Compare
2b7cb47 to
c71cb38
Compare
e7d8c54 to
499da56
Compare
Carried from j5/main 2f53bd8 onto the upstream V2 candidate. Conflict: ProviderRegistry.ts keeps upstream's ModelManifest/compatibility imports beside J5's skill path resolver import; settingsSearch.test.ts and packages/shared/package.json keep both sides; docs/user/composer.md stays upstream and the PR's Installed-inventory text lands in docs/user/skills.md; FORK.md adds the skills inventory case as 43 (inventory 44), referencing case 42. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Joins fork head 2cf4ad7 (j5/main, including #247, #241, #244, #242, #214, #215, #216, #248, #249, #250, #251) with the reviewed candidate (j5/upstream-sync-20260924-candidate), which descends from frozen upstream 67a2be0. Upstream force-rewrote history, so per FORK.md's rewrite runbook the candidate was built from the upstream tree with pin 62aef85 as the content base, then carried each j5/main PR since 8f56083 onto it and adapted it to upstream V2. This merge's tree equals the candidate tree exactly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Users need to see which skills each provider discovers in an environment and project. Add Installed beside Catalog on one Settings → Skills page, sharing one environment picker. The inventory groups skills by origin and provides provider filtering, search, discovery status, refresh, and source details, including Claude plugin and bundled skills.
Plugin discovery, path resolution, and workspace refresh stay in J5-owned modules behind recorded upstream hooks. Shared runtime helpers handle origin and discovery state outside contracts. Existing built-in skills remain visible in the composer; failed refreshes retain stale inventory.
The inventory is available on web and desktop for Codex and Claude. Mobile has no inventory page. Cursor, Grok, OpenCode, and Antigravity retain their existing composer discovery without new management controls.
Stack 2/3, based on #214; followed by #216.
Validation: 144 focused tests across eight files on the completed stack after merging j5/main; server and web typechecks. The maintainer is handling the local UI check; no new browser, desktop, or mobile verification was run.
Model: GPT-6. Harness: Codex.
Summary by CodeRabbit
New Features
Documentation