Skip to content

Expose project Codex skills in chat#3901

Open
jakeleventhal wants to merge 12 commits into
pingdotgg:mainfrom
jakeleventhal:t3code/expose-project-skills-in-chat
Open

Expose project Codex skills in chat#3901
jakeleventhal wants to merge 12 commits into
pingdotgg:mainfrom
jakeleventhal:t3code/expose-project-skills-in-chat

Conversation

@jakeleventhal

@jakeleventhal jakeleventhal commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

What changed

Solves #3576

  • Added a cwd-scoped provider skills RPC and client query.
  • Made Codex list skills using the active project directory when the $ composer menu opens.
  • Kept the existing provider snapshot as an immediate fallback while project skills load.
  • Cached project-scoped results briefly to avoid repeatedly probing Codex.
  • Added coverage that verifies the project cwd reaches the provider instance.

Why

T3 Code previously populated the $ skill menu from a provider snapshot created with the server process working directory. That snapshot exposed global Codex skills, but it could not discover skills defined in the active project.

The composer now requests skills for its current project cwd, allowing Codex to return both applicable global and project-level skills.

Impact

Codex users can discover and invoke project-level skills through the existing $ menu. Other providers return a typed unsupported error and retain their existing behavior.

Validation

  • pnpm exec vp test apps/web/src/providerSkillSearch.test.ts apps/server/src/provider/Layers/ProviderRegistry.test.ts packages/contracts/src/server.test.ts (42 tests passed)
  • pnpm exec vp run typecheck
  • pnpm exec vp check (0 errors; 22 pre-existing warnings)
  • Manual verification in the development UI

Note

Medium Risk
Each $ menu open can spawn a short-lived Codex app-server probe per instance/cwd; failures are typed but add runtime dependency on Codex availability and probe timeouts.

Overview
Adds server.listProviderSkills (contracts, WS RPC, cached client query) so the composer can load skills for a provider instance and project cwd, not only from the server-wide provider snapshot.

Codex implements optional listSkills(cwd) via an exported probeCodexAppServerProvider with includeModels: false for skills-only probes (timeout + structured errors). ProviderRegistry.listSkills delegates to the instance; unsupported drivers get a typed error over the wire.

The $ skill menu fetches cwd-scoped skills when open, falls back to snapshot/cached results while loading, and ComposerPromptEditor updates skill chip labels in place so async skill loads do not reset focus or Lexical state.

Reviewed by Cursor Bugbot for commit 928f588. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Expose project Codex skills in the chat composer via a new listProviderSkills RPC

  • Adds a serverListProviderSkills WebSocket RPC that queries the Codex app-server for project-specific skills given an instanceId and cwd, returning structured errors for unsupported providers or failures.
  • CodexDriver now implements listSkills(cwd) on its ProviderInstance, and ProviderRegistry exposes a matching listSkills method that delegates to it.
  • The chat composer fetches and caches provider skills per environment/instance/cwd using a new useProviderSkills hook; the skill menu and prompt chips reflect these project-specific skills with a loading state while probing.
  • Skill chips in the composer editor can update their label and description in-place via $updateComposerSkillMetadata, avoiding selection resets when skill metadata changes.

Macroscope summarized 928f588.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a2cf74ac-facd-4501-8c3c-39c8ffebfbc5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 11, 2026
@jakeleventhal jakeleventhal marked this pull request as ready for review July 11, 2026 22:08
Comment thread apps/server/src/provider/Drivers/CodexDriver.ts
Comment thread apps/web/src/components/chat/ChatComposer.tsx Outdated
Comment thread apps/web/src/components/chat/ChatComposer.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 932bb4cc96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/server/src/provider/Drivers/CodexDriver.ts
Comment thread apps/server/src/provider/Drivers/CodexDriver.ts

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding on the new server.listProviderSkills RPC error handling. See inline comment.

Posted via Macroscope — Effect Service Conventions

Comment thread apps/server/src/ws.ts
@macroscopeapp

macroscopeapp Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR adds a new feature exposing project-level Codex skills via a new RPC endpoint and integrating them into the chat composer. New API endpoints, error handling, and cross-cutting frontend/backend changes introduce new user-facing behavior that warrants human review.

You can customize Macroscope's approvability policy. Learn more.

Comment thread apps/web/src/components/chat/ChatComposer.tsx

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effect service conventions: one finding on the new ServerProviderSkillsError. Storing a free-form message field that also acts as the discriminator between two distinct failure modes conflicts with the error-modeling conventions. Details inline.

Posted via Macroscope — Effect Service Conventions

Comment thread packages/contracts/src/server.ts Outdated
jakeleventhal and others added 2 commits July 11, 2026 20:01
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Comment thread apps/web/src/components/ComposerPromptEditor.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 52e3381. Configure here.

Comment thread apps/web/src/components/ComposerPromptEditor.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant