-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: Support multiple context directories for skills (.kilocode, .claude) #5353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: d62a031 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThis PR adds support for discovering skills from multiple context directories ( Key Implementation Details:
Files Reviewed (4 files)
|
| metadata[entry.name] = { | ||
| type: "skill", | ||
| // kilocode_change start - Check skills in multiple context directories | ||
| const projectContextDirs = [".kilocode", ".claude"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what the point of this is, if we never install it there? I also suspect that if you install, manually move to claude, you will see it here, but delete won't work
| }) | ||
| }) | ||
|
|
||
| // kilocode_change start - Tests for multi-directory skills support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please try not to extend testfiles we share with roo, but instead make a new one next to it
| }) | ||
| // kilocode_change start - Only add skill if not already present (first-wins for same key) | ||
| // This ensures .kilocode takes precedence over .claude since it's processed first | ||
| if (!this.skills.has(skillKey)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we order it the other way and override it? That would achieve the same but be simpler right?
Summary
This PR adds support for multiple context directories for skills retrieval. Skills can now be loaded from both
.kilocode/skills/and.claude/skills/directories, allowing users with existing Claude configurations to reuse their skills.Changes
SkillsManager.ts
PROJECT_CONTEXT_DIRSconstant:[".kilocode", ".claude"]getSkillsDirectories()to iterate over all supported context directoriessetupFileWatchers()to watch all context directoriesloadSkillMetadata()to ensure.kilocodetakes precedence over.claudeMarketplaceManager.ts
checkProjectInstallations()to check skills in both.kilocodeand.claudedirectoriesTests
.claudedirectory.kilocodeover.claudefor same skill nameBehavior
.kilocodetakes precedence over.claudewhen the same skill exists in both.kilocodeconfigurations work unchanged