Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: resolve skill source path correctly for all scopes#514

Merged
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/global-skill-path-resolutionbreaking-brake/cc-wf-studio:fix/global-skill-path-resolutionCopy head branch name to clipboard
Jan 29, 2026
Merged

fix: resolve skill source path correctly for all scopes#514
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/global-skill-path-resolutionbreaking-brake/cc-wf-studio:fix/global-skill-path-resolutionCopy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

Problem

When executing workflows with Codex CLI, skills from global/user-scope directories (e.g., ~/.copilot/skills/time-greeting) fail to copy with ENOENT error.

Current Behavior

  1. Add a skill from ~/.copilot/skills/time-greeting to workflow
  2. Click "Execute with Codex CLI"
  3. ❌ Error: Failed to copy skill "time-greeting": ENOENT: no such file or directory, scandir '{project}/.copilot/skills/time-greeting'

The checkSkillsToNormalize() function was reconstructing the source path using getSourceSkillsDir(), which always returns project-scope paths. This caused user-scope skill paths to be incorrectly resolved.

Expected Behavior

  1. Add a skill from any scope (user or project) to workflow
  2. Click "Execute with Codex CLI"
  3. ✅ Skill is correctly copied from its actual location to .claude/skills/

Solution

Use path.resolve(workspaceRoot, path.dirname(skillPath)) to derive the source directory directly from the skill's actual path.

Changes

File: src/extension/services/skill-normalization-service.ts

  • Replace getSourceSkillsDir() call with path.resolve(workspaceRoot, path.dirname(skillPath))
  • path.resolve() correctly handles:
    • Absolute paths (user-scope): Returns path as-is
    • Relative paths (project-scope): Resolves against workspaceRoot
  • Mark unused _getSourceSkillsDir() with underscore prefix for future use

Impact

  • Fixes skill normalization for user-scope skills (~/.copilot/skills/, ~/.codex/skills/)
  • Fixes skill normalization for project-scope relative paths (.github/skills/)
  • No breaking changes
  • Windows compatible (verified path.resolve() handles both separators)

Testing

  • Manual E2E: Global skill (~/.copilot/skills/) → Codex CLI execution
  • Manual E2E: Project skill (.github/skills/) → Codex CLI execution
  • Build passes (npm run check && npm run build)
  • Windows compatibility verified (code review)

🤖 Generated with Claude Code

- Use path.resolve() with skillPath directly instead of reconstructing path
- Handles both absolute paths (user-scope) and relative paths (project-scope)
- Mark unused _getSourceSkillsDir() with underscore prefix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@breaking-brake breaking-brake merged commit 8caf97e into main Jan 29, 2026
3 checks passed
@breaking-brake breaking-brake deleted the fix/global-skill-path-resolution branch January 29, 2026 16:30
@breaking-brake breaking-brake mentioned this pull request Jan 29, 2026
braking-brake-semantic-release Bot pushed a commit that referenced this pull request Jan 29, 2026
## [3.18.2](v3.18.1...v3.18.2) (2026-01-29)

### Bug Fixes

* add CLI-aware skill normalization to skip native directories ([#512](#512)) ([0c49d94](0c49d94))
* add MCP server detection for Copilot CLI and Codex CLI ([#509](#509)) ([#510](#510)) ([ef31649](ef31649))
* add skills detection for Copilot/Codex with grouped UI ([#508](#508)) ([ab89f69](ab89f69)), closes [#507](#507)
* remove Codex project trust workaround ([#513](#513)) ([c5a9c45](c5a9c45)), closes [#495](#495)
* resolve skill source path correctly for all scopes ([#514](#514)) ([8caf97e](8caf97e))
* show AI provider badge for user scope skills ([#515](#515)) ([760d411](760d411))

### Documentation

* add AI coding tools configuration reference ([#505](#505)) ([f3bd005](f3bd005))
@braking-brake-semantic-release
Copy link
Copy Markdown

🎉 This PR is included in version 3.18.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.