feat: add experimental support for remote skills and commands via wellknown #6782
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for centralized skill and command directories served via
.well-known/opencodeendpoints. Enterprises can host shared skills and commands that are automatically discovered when users authenticate to a wellknown endpoint.Changes
WellKnownutility module (src/util/wellknown.ts) for fetching and caching remote resourcessrc/skill/skill.ts) to discover and lazily fetch remote skillssrc/command/index.ts) to discover and lazily fetch remote commandsexperimental.remote_skillsandexperimental.remote_commandsconfig flagsopencode auth refresh [url]command to refresh cached wellknown datanew
.well-knownResponse{ "auth": { "command": ["company-auth", "token"], "env": "COMPANY_TOKEN" }, "config": { "enterprise": { "url": "https://enterprise.example.com" } }, "skills": { "web-perf": { "description": "Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals, identifies render-blocking resources, and accessibility gaps.", "url": "https://enterprise.example.com/.well-known/opencode/skills/web-perf/SKILL.md" }, "gitlab": { "description": "Use for GitLab repos. Provides glab CLI commands for MRs, CI/CD, and issues.", "url": "https://enterprise.example.com/.well-known/opencode/skills/gitlab/SKILL.md" }, "gh": { "description": "GitHub CLI workflows. Use for creating PRs, managing issues, and working with GitHub Actions.", "url": "https://enterprise.example.com/.well-known/opencode/skills/gh/SKILL.md" } }, "commands": { "deploy": { "description": "Deploy to production via internal CI", "url": "https://enterprise.example.com/.well-known/opencode/commands/deploy.md" } } }Server Directory Structure
Usage
Disable via Config
{ "experimental": { "remote_skills": false, "remote_commands": false } }Out of Scope
Progressive disclosure for remote skills:
reference.md,scripts/, etc.) relative to the skill's base directory.files: []array or support for fetching related files? or use WebFetch?