[PR #12423] feat(skill): add skill discovery from URLs via well-known RFC #14212

Closed
opened 2026-02-16 18:19:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/12423

State: closed
Merged: Yes


Summary

This PR implements the Agent Skills Discovery RFC, allowing users to specify URLs for skill registries in their config.

Changes

  • src/config/config.ts: Added "urls" field to "skills" schema
  • src/skill/discovery.ts (new): Created "Discovery" namespace for downloading skills from well-known endpoints
  • src/skill/skill.ts: Integrated discovery to load skills from configured URLs

Usage

Users can now add skill registry URLs to their config:

"""json
{
"skills": {
"urls": ["https://example.com/.well-known/skills/"]
}
}
"""

How it works

  1. Fetches "/.well-known/skills/index.json" from each URL
  2. Downloads all skill files listed in the index
  3. Caches them to "~/.cache/opencode/skills/"
  4. Skips re-downloading existing files for efficiency
  5. Loads the downloaded skills into the skill registry

Implementation details

  • Follows the naming conventions from @AGENTS.md
  • Caches files to avoid re-downloading on every run
  • Returns empty array on failure (non-blocking)
  • Logs progress and errors appropriately

Testing

  • Typecheck passes ✓
  • All existing tests pass ✓
  • Implementation follows RFC spec exactly
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/12423 **State:** closed **Merged:** Yes --- ## Summary This PR implements the [Agent Skills Discovery RFC](https://github.com/cloudflare/agent-skills-discovery-rfc), allowing users to specify URLs for skill registries in their config. ## Changes - **src/config/config.ts**: Added \"urls\" field to \"skills\" schema - **src/skill/discovery.ts** (new): Created \"Discovery\" namespace for downloading skills from well-known endpoints - **src/skill/skill.ts**: Integrated discovery to load skills from configured URLs ## Usage Users can now add skill registry URLs to their config: \"\"\"json { \"skills\": { \"urls\": [\"https://example.com/.well-known/skills/\"] } } \"\"\" ## How it works 1. Fetches \"/.well-known/skills/index.json\" from each URL 2. Downloads all skill files listed in the index 3. Caches them to \"~/.cache/opencode/skills/\" 4. Skips re-downloading existing files for efficiency 5. Loads the downloaded skills into the skill registry ## Implementation details - Follows the naming conventions from @AGENTS.md - Caches files to avoid re-downloading on every run - Returns empty array on failure (non-blocking) - Logs progress and errors appropriately ## Testing - Typecheck passes ✓ - All existing tests pass ✓ - Implementation follows RFC spec exactly
yindo added the pull-request label 2026-02-16 18:19:01 -05:00
yindo closed this issue 2026-02-16 18:19:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14212