Skip to content
Source
Sign inSign up
pingdotgg/t3code

Add OpenCode skill discovery #3154

Mergeddbalders(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/3154/headmerged by maria-rcks View on GitHub

Summary

OpenCode-only sessions did not publish discovered skills, so composer $skill suggestions were empty even when OpenCode had skills available.

This adds skill discovery to both current inventory paths: configured servers use the OpenCode SDK, while local installations use opencode debug skill. Skill lookup is optional, so an unavailable endpoint, unsupported command, or malformed skill response no longer hides otherwise healthy providers and models. Valid rows are mapped into the shared provider skill snapshot and incomplete rows without a name or location are skipped.

Validation

  • vp test run apps/server/src/provider/opencodeRuntime.inventory.test.ts apps/server/src/provider/opencodeRuntime.cliParsers.test.ts apps/server/src/provider/Layers/OpenCodeProvider.test.ts (25 passed)
  • Targeted vp lint on the five changed OpenCode files
  • vp run -F ./apps/server typecheck
  • Codex Autoreview with medium reasoning: clean

Screenshots

Before: OpenCode composer before skill discovery

After: OpenCode composer after skill discovery

Model: GPT-5.6 Sol via Codex.

Note

Add skill discovery to OpenCode provider inventory

  • Extends OpenCodeInventory to include a skills array, populated via the SDK (app.skills()) or CLI (opencode debug skill) depending on the runtime path.
  • Adds flattenOpenCodeSkills in OpenCodeProvider.ts to convert raw skill entries into ServerProviderSkill objects, skipping entries with missing name or location, and returning a name-sorted list.
  • CLI-based inventory loading now runs all three commands (models, agents, skills) in parallel with a single retry after 1s on failure, and passes cwd through to the child process.
  • SDK-based inventory loading degrades gracefully to an empty skills array if the app.skills() call fails.
Macroscope summarized 4443b61.

Note

Low Risk Additive inventory and snapshot fields with graceful degradation; model loading still gates success and there are no auth or data-handling changes.

Overview OpenCode provider snapshots now include discovered skills, so composer $skill suggestions can surface skills that OpenCode already knows about.

Skill loading runs on both inventory paths: configured servers call the SDK app.skills() endpoint; local installs run opencode debug skill alongside existing models and agent CLI probes. CLI inventory passes cwd into spawned commands and runs models, agents, and skills in parallel with the same one-second retry behavior. Skills are optional enrichment—SDK skill failures or bad CLI output degrade to an empty list without failing models/providers. Valid rows are mapped via flattenOpenCodeSkills into ServerProviderSkill (name-sorted, enabled, descriptions); entries missing name or location are dropped.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4443b610c3e965cb1bb80b6ad2a1383f3369dd2f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
    1. dbalders(GitHub profile, opens in a new tab) changed the title

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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 Plus

      Run ID: 7e937713-cf10-4824-91f8-07299eac8159

      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.
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved 613d598

      Additive feature that extends existing OpenCode inventory discovery to include skills, following established patterns for agents/models. The ServerProviderSkill type already exists in contracts and is consumed by clients. Implementation gracefully degrades on failure and includes comprehensive tests.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9212d6a84a39c2dd3166c7e4c00e535f0b62fd05. Configure [here](https://www.cursor.com/dashboard/bugbot).
    6. UtkarshUsername(GitHub profile, opens in a new tab) approved these changes

    7. maria-rcks merged thiscf251c3

    8. maria-rcks closed this

Sign in to join this conversation.