feat: support skills in .agents directory and other provider directories#2202
feat: support skills in .agents directory and other provider directories#2202
Conversation
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
|
Hi! I noticed that while the PR mentions .agents support, the implementation currently includes only Would it be possible to include both? Thanks for your work! Edit: Also wanted to raise a broader idea — instead of maintaining a hardcoded list of provider directories (which will keep growing as new tools emerge), would it be worth supporting a user-configurable option in settings? Something like: {
"skills": {
"paths": [".my-tool/skills", "~/shared-skills"]
}
}opencode already supports this exact pattern ( The current |
|
@LaZzyMan @tanzhenxin it appears this PR did not add support for |
TLDR
This PR adds support for loading skills from multiple provider configuration directories, not just
.qwen. This allows users to organize their skills in directories like.agent/skills/,.cursor/skills/,.codex/skills/, and.claude/skills/, similar to how Claude Code handles skills.Dive Deeper
The implementation introduces a
PROVIDER_CONFIG_DIRSconstant that lists supported configuration directories:.qwen(maintains backward compatibility).agent.cursor.codex.claudeKey changes:
getSkillsBaseDir→getSkillsBaseDirs: Changed from returning a single directory path to returning an array of paths for all supported provider directories.listSkillsAtLevel: Now iterates through all provider directories and aggregates skills from each.updateWatchersFromCache: Watches all existing provider skill directories for changes.ensureUserSkillsDir: Still creates the.qwen/skillsdirectory for backward compatibility when initializing user skills.This change is fully backward compatible - existing skills in
.qwen/skills/continue to work as before, while also enabling the new directory structures.Reviewer Test Plan
.qwen/skills/test-skill/SKILL.mdand verify it loads correctly..agent/skills/my-skill/SKILL.mdand verify it loads..qwen/skills/and.agent/skills/and verify all are listed.Example skill structure:
Testing Matrix
Tested on macOS with
npm run test- all skill-manager tests pass.Linked issues / bugs
Resolves #2086