Skip to content

feat(ai-core): discover skills from .agents/skills directories#17553

Merged
sgraband merged 4 commits into
masterfrom
sg/agentsFolder
Jun 6, 2026
Merged

feat(ai-core): discover skills from .agents/skills directories#17553
sgraband merged 4 commits into
masterfrom
sg/agentsFolder

Conversation

@sgraband
Copy link
Copy Markdown
Contributor

What it does

Add .agents/skills/ as an additional skill source location alongside the existing .prompts/skills/ directory. Skills are now discovered from:

  • Workspace: .prompts/skills/ and .agents/skills/
  • User-configured directories (unchanged)
  • Global: ~/.theia/skills/ and ~/.agents/skills/

Refactor DefaultSkillService and combineSkillDirectories to operate on arrays of workspace/default directories instead of single paths, and update the corresponding tests.

The CreateSkill agent prompt now asks the user which target directory to use, defaulting to .agents/skills/, and the README and agent description are updated accordingly.

How to test

  1. Create a skill using the CreateSkill agent in the .agent folder
  2. Observe that you can see the skill in the ai configuration and that you can invoke it in the chat.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@sgraband sgraband requested a review from ndoschek May 26, 2026 08:02
@github-project-automation github-project-automation Bot moved this to Waiting on reviewers in PR Backlog May 26, 2026
@ndoschek ndoschek mentioned this pull request May 27, 2026
24 tasks
Copy link
Copy Markdown
Member

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sgraband, overall this looks good and works as described, but first we need to resolve the conflicts. I added a few comments inline. Please have a look.

Comment thread packages/ai-core/src/common/skill.ts
Comment thread packages/ai-core/src/browser/skill-service.ts
Comment thread packages/ai-core/src/browser/skill-service.ts Outdated
@github-project-automation github-project-automation Bot moved this from Waiting on reviewers to Waiting on author in PR Backlog May 27, 2026
sgraband added a commit that referenced this pull request May 29, 2026
- Refactor combineSkillDirectories to return tagged tuples (path + tier)
  so DefaultSkillService.update() can call the helper directly. Eliminates
  the drift between the helper and the inline dedup in update(); collapses
  three near-duplicate per-tier loops into one tier-dispatched loop.
- Add tests documenting the workspace-tier priority (.prompts/skills wins
  over .agents/skills on duplicate skill names), both at helper level and
  via a FileService-mock-based service-level integration test.
- Add CHANGELOG breaking-changes entry under 1.73.0 for the renamed
  getDefaultSkillsDirectoryPaths and the changed combineSkillDirectories
  signature.
@sgraband sgraband requested a review from ndoschek May 29, 2026 07:21
sgraband added 2 commits June 1, 2026 10:01
Add .agents/skills/ as an additional skill source location alongside the
existing .prompts/skills/ directory. Skills are now discovered from:

- Workspace: .prompts/skills/ and .agents/skills/
- User-configured directories (unchanged)
- Global: ~/.theia/skills/ and ~/.agents/skills/

Refactor DefaultSkillService and combineSkillDirectories to operate on
arrays of workspace/default directories instead of single paths, and
update the corresponding tests.

The CreateSkill agent prompt now asks the user which target directory
to use, defaulting to .agents/skills/, and the README and agent
description are updated accordingly.
- Refactor combineSkillDirectories to return tagged tuples (path + tier)
  so DefaultSkillService.update() can call the helper directly. Eliminates
  the drift between the helper and the inline dedup in update(); collapses
  three near-duplicate per-tier loops into one tier-dispatched loop.
- Add tests documenting the workspace-tier priority (.prompts/skills wins
  over .agents/skills on duplicate skill names), both at helper level and
  via a FileService-mock-based service-level integration test.
- Add CHANGELOG breaking-changes entry under 1.73.0 for the renamed
  getDefaultSkillsDirectoryPaths and the changed combineSkillDirectories
  signature.
The duplicate-skill test compared the resolved skill location against a
POSIX-style string, but `Path.fsPath()` on the production side returns
backslashes on Windows. Normalize the expected value through `Path.fsPath()`
so the assertion holds on both POSIX and Windows runners.
Copy link
Copy Markdown
Member

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates Simon, LGTM 🎉

@github-project-automation github-project-automation Bot moved this from Waiting on author to Needs merge in PR Backlog Jun 3, 2026
@sgraband sgraband merged commit dca320f into master Jun 6, 2026
10 checks passed
@sgraband sgraband deleted the sg/agentsFolder branch June 6, 2026 06:37
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Jun 6, 2026
@github-actions github-actions Bot added this to the 1.73.0 milestone Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants