Skip to content

feat: add support for reading skills from .agents/skills directories#11842

Merged
thdxr merged 2 commits into
devfrom
opencode/crisp-orchid
Feb 3, 2026
Merged

feat: add support for reading skills from .agents/skills directories#11842
thdxr merged 2 commits into
devfrom
opencode/crisp-orchid

Conversation

@thdxr

@thdxr thdxr commented Feb 2, 2026

Copy link
Copy Markdown
Member

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

@thdxr thdxr force-pushed the opencode/crisp-orchid branch 8 times, most recently from 3b2988a to b14e7f5 Compare February 2, 2026 21:09
@thdxr thdxr enabled auto-merge (squash) February 2, 2026 21:11
@thdxr thdxr force-pushed the opencode/crisp-orchid branch from b14e7f5 to e687553 Compare February 2, 2026 21:13
@antonio-ivanovski

Copy link
Copy Markdown

Will this be applicable for both project and global skills?

@thdxr thdxr force-pushed the opencode/crisp-orchid branch 3 times, most recently from a3157fd to c3e711d Compare February 2, 2026 21:17
@thdxr thdxr disabled auto-merge February 2, 2026 21:19
@thdxr thdxr force-pushed the opencode/crisp-orchid branch 2 times, most recently from 2206186 to 1d8a993 Compare February 2, 2026 21:19
@thdxr thdxr enabled auto-merge (squash) February 2, 2026 21:19
@ben-vargas

ben-vargas commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Just make sure you guys are on the same page... PR says .agent/skills and Alexander's x post says .agents/skills 😅
CleanShot 2026-02-02 at 14 27 40@2x

Edit: external pattern in skill.ts looks good though, just a PR doc issue.

@gverma-openai

gverma-openai commented Feb 2, 2026

Copy link
Copy Markdown

Just make sure you guys are on the same page... PR says .agent/skills and Alexander's x post says .agents/skills 😅

Correct, the recommendation is to use .agents/skills (plural).

@thdxr thdxr changed the title feat: add support for reading skills from .agent/skills directories feat: add support for reading skills from .agents/skills directories Feb 2, 2026
@thdxr thdxr added the beta label Feb 2, 2026
@thdxr thdxr disabled auto-merge February 3, 2026 04:08
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
@adamdotdevin adamdotdevin force-pushed the opencode/crisp-orchid branch 2 times, most recently from 5b6cf03 to 5a8ee88 Compare February 3, 2026 12:17
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
opencode-agent Bot added a commit that referenced this pull request Feb 3, 2026
@thdxr thdxr merged commit 17e62b0 into dev Feb 3, 2026
4 checks passed
@thdxr thdxr deleted the opencode/crisp-orchid branch February 3, 2026 20:51
mvclaudianobj pushed a commit to mvclaudianobj/markscode that referenced this pull request Feb 4, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
ishaksebsib pushed a commit to ishaksebsib/opencode that referenced this pull request Feb 4, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
ishaksebsib pushed a commit to ishaksebsib/opencode that referenced this pull request Feb 4, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
@scarf005

scarf005 commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

using ~/.agents/skills breaks the XDG location, see: agentskills/agentskills#15 (comment)

Colin4k1024 pushed a commit to Colin4k1024/opencode that referenced this pull request Feb 10, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
@Solido

Solido commented Feb 10, 2026

Copy link
Copy Markdown

I've been waiting for this to land, but still inactive or problematic under 1.1.53. Did something broke since the merge last week?

schneiderlo pushed a commit to schneiderlo/opencode that referenced this pull request Feb 17, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
Rwanbt pushed a commit to Rwanbt/opencode that referenced this pull request May 5, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
…nomalyco#11842)

Co-authored-by: Filip <34747899+neriousy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants