[PR #11842] feat: add support for reading skills from .agents/skills directories #13950

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

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

State: closed
Merged: Yes


Summary

This PR adds support for reading skills from .agents/skills/ directories, similar to how .claude/skills/ is already supported.

Changes

  • Added scanning for project-level .agents/skills/ directories (searches up the directory tree from the current working directory)
  • Added support for global ~/.agents/skills/ directory
  • Uses the same CLAUDE_SKILL_GLOB pattern (skills/**/SKILL.md) to find skill files
  • Follows the same error handling and logging patterns as the existing .claude/skills implementation

Use Case

Users who organize their AI assistant configurations in .agents/ directories (instead of or in addition to .claude/) can now have their skills automatically loaded by opencode.

Testing

The implementation follows the same patterns as the existing .claude/skills scanning:

  • Uses Filesystem.up() to find .agents directories in parent folders
  • Checks for global ~/.agents directory
  • Uses existing addSkill() function to parse and register skills
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11842 **State:** closed **Merged:** Yes --- ## Summary This PR adds support for reading skills from `.agents/skills/` directories, similar to how `.claude/skills/` is already supported. ## Changes - Added scanning for project-level `.agents/skills/` directories (searches up the directory tree from the current working directory) - Added support for global `~/.agents/skills/` directory - Uses the same `CLAUDE_SKILL_GLOB` pattern (`skills/**/SKILL.md`) to find skill files - Follows the same error handling and logging patterns as the existing `.claude/skills` implementation ## Use Case Users who organize their AI assistant configurations in `.agents/` directories (instead of or in addition to `.claude/`) can now have their skills automatically loaded by opencode. ## Testing The implementation follows the same patterns as the existing `.claude/skills` scanning: - Uses `Filesystem.up()` to find `.agents` directories in parent folders - Checks for global `~/.agents` directory - Uses existing `addSkill()` function to parse and register skills
yindo added the pull-request label 2026-02-16 18:18:46 -05:00
yindo closed this issue 2026-02-16 18:18:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13950