Skip to content

Conversation

@marius-kilocode
Copy link
Collaborator

@marius-kilocode marius-kilocode commented Jan 23, 2026

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

  • Added PROJECT_CONTEXT_DIRS constant: [".kilocode", ".claude"]
  • Updated getSkillsDirectories() to iterate over all supported context directories
  • Updated setupFileWatchers() to watch all context directories
  • Added first-wins logic in loadSkillMetadata() to ensure .kilocode takes precedence over .claude

MarketplaceManager.ts

  • Updated checkProjectInstallations() to check skills in both .kilocode and .claude directories

Tests

  • Added tests for multi-directory skills support:
    • Discovering skills from .claude directory
    • Preferring .kilocode over .claude for same skill name
    • Merging skills from both directories

Behavior

  • .kilocode takes precedence over .claude when the same skill exists in both
  • Skills from both directories are merged and available
  • File watchers monitor both directories for changes
  • No breaking changes - existing .kilocode configurations work unchanged

@changeset-bot
Copy link

changeset-bot bot commented Jan 23, 2026

🦋 Changeset detected

Latest commit: d62a031

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Minor

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

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 23, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds support for discovering skills from multiple context directories (.kilocode/skills/ and .claude/skills/), allowing users with existing Claude configurations to reuse their skills.

Key Implementation Details:

  • Defines PROJECT_CONTEXT_DIRS constant with priority order [".kilocode", ".claude"]
  • Uses "first-wins" logic via !this.skills.has(skillKey) check to ensure .kilocode takes precedence
  • Updates file watchers to monitor both directories
  • Comprehensive test coverage for discovery, precedence, and merging scenarios
Files Reviewed (4 files)
  • .changeset/multi-directory-skills.md - Changeset for the feature
  • src/services/marketplace/MarketplaceManager.ts - Updated to check both context directories
  • src/services/skills/SkillsManager.ts - Core multi-directory support implementation
  • src/services/skills/__tests__/SkillsManager.spec.ts - Tests for multi-directory support

@marius-kilocode marius-kilocode enabled auto-merge (squash) January 23, 2026 16:46
@marius-kilocode marius-kilocode requested review from a team January 23, 2026 16:48
metadata[entry.name] = {
type: "skill",
// kilocode_change start - Check skills in multiple context directories
const projectContextDirs = [".kilocode", ".claude"]
Copy link
Contributor

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
Copy link
Contributor

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)) {
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants