Detailed Description
Waza does not discover skills located in .github/skills/ — a standard location used by GitHub Copilot for project-level skills. Users must manually add paths.skills: .github/skills in .waza.yaml as a workaround, but this only replaces the default skills/ path instead of supplementing it. Skills in .github/skills/ should be found automatically.
Root Cause
There are two independent code paths that both exclude .github/skills/:
1. internal/workspace/workspace.go — DetectContext() and scanForSkills()
DetectContext() step 3 only checks a single configured skillsDir (default "skills/"):
skillsDir := filepath.Join(absDir, o.skillsDir)
if isDir(skillsDir) {
skills := scanForSkills(skillsDir)
...
}
It never checks .github/skills/ unless the user explicitly overrides paths.skills in .waza.yaml — and even then, it replaces the default rather than adding to it.
Step 4 scans immediate children for SKILL.md, but scanForSkills() explicitly skips hidden directories:
for _, entry := range entries {
if !entry.IsDir() || strings.HasPrefix(entry.Name(), ".") {
continue // ← skips .github
}
...
}
2. internal/discovery/discovery.go — Discover()
The Discover() function (used by waza run --discover) also skips hidden directories during its filepath.Walk:
if info.IsDir() && strings.HasPrefix(info.Name(), ".") {
return filepath.SkipDir // ← skips entire .github tree
}
Reproduction Steps
- Create a skill in
.github/skills/my-skill/SKILL.md
- Run any waza command that detects the workspace (e.g.,
waza run my-skill, waza dev my-skill, waza tokens check)
- Expected: Skill is discovered
- Actual:
no skills detected in workspace error
Current Workaround
Add to .waza.yaml:
paths:
skills: .github/skills
This only works if all skills are in .github/skills/. If some are in skills/ and some in .github/skills/, there is no workaround since paths.skills only supports a single directory.
Proposed Solution
Phase 1: internal/workspace/workspace.go
Modify DetectContext() to also search .github/skills/ as a built-in secondary skills location:
- After step 3 (checking configured
skillsDir), also check .github/skills/ if it exists
- Merge skills from both locations, deduplicating by name (configured
skillsDir wins on conflict)
- This approach is backward-compatible and requires zero config changes
The scanForSkills() function does not need changes since it will be called with .github/skills as the parent directory directly (not .github).
Phase 2: internal/discovery/discovery.go
Modify Discover() to exempt .github from the hidden-directory skip:
if info.IsDir() && strings.HasPrefix(info.Name(), ".") && info.Name() != ".github" {
return filepath.SkipDir
}
This ensures waza run --discover also finds skills under .github/skills/.
Tests to Add
internal/workspace/workspace_test.go:
TestDetectContext_GitHubSkillsDir — skills in .github/skills/ are auto-discovered
TestDetectContext_BothSkillsDirs — skills in both skills/ and .github/skills/ are merged
TestDetectContext_GitHubSkillsDirWithCustomOverride — custom paths.skills + .github/skills/ both work
TestDetectContext_GitHubSkillsDirDedup — same skill name in both dirs resolves correctly
internal/discovery/discovery_test.go:
TestDiscoverGitHubSkillsDir — Discover() finds skills under .github/skills/
TestDiscoverOtherHiddenDirsStillSkipped — .hidden/ directories other than .github remain skipped
Files to Modify
| File |
Change |
internal/workspace/workspace.go |
Add .github/skills/ as secondary search path in DetectContext() |
internal/workspace/workspace_test.go |
Add tests for .github/skills/ discovery and merging |
internal/discovery/discovery.go |
Exempt .github from hidden-directory skip in Discover() |
internal/discovery/discovery_test.go |
Add tests for .github exemption |
Detailed Description
Waza does not discover skills located in
.github/skills/— a standard location used by GitHub Copilot for project-level skills. Users must manually addpaths.skills: .github/skillsin.waza.yamlas a workaround, but this only replaces the defaultskills/path instead of supplementing it. Skills in.github/skills/should be found automatically.Root Cause
There are two independent code paths that both exclude
.github/skills/:1.
internal/workspace/workspace.go—DetectContext()andscanForSkills()DetectContext()step 3 only checks a single configuredskillsDir(default"skills/"):It never checks
.github/skills/unless the user explicitly overridespaths.skillsin.waza.yaml— and even then, it replaces the default rather than adding to it.Step 4 scans immediate children for
SKILL.md, butscanForSkills()explicitly skips hidden directories:2.
internal/discovery/discovery.go—Discover()The
Discover()function (used bywaza run --discover) also skips hidden directories during itsfilepath.Walk:Reproduction Steps
.github/skills/my-skill/SKILL.mdwaza run my-skill,waza dev my-skill,waza tokens check)no skills detected in workspaceerrorCurrent Workaround
Add to
.waza.yaml:This only works if all skills are in
.github/skills/. If some are inskills/and some in.github/skills/, there is no workaround sincepaths.skillsonly supports a single directory.Proposed Solution
Phase 1:
internal/workspace/workspace.goModify
DetectContext()to also search.github/skills/as a built-in secondary skills location:skillsDir), also check.github/skills/if it existsskillsDirwins on conflict)The
scanForSkills()function does not need changes since it will be called with.github/skillsas the parent directory directly (not.github).Phase 2:
internal/discovery/discovery.goModify
Discover()to exempt.githubfrom the hidden-directory skip:This ensures
waza run --discoveralso finds skills under.github/skills/.Tests to Add
internal/workspace/workspace_test.go:TestDetectContext_GitHubSkillsDir— skills in.github/skills/are auto-discoveredTestDetectContext_BothSkillsDirs— skills in bothskills/and.github/skills/are mergedTestDetectContext_GitHubSkillsDirWithCustomOverride— custompaths.skills+.github/skills/both workTestDetectContext_GitHubSkillsDirDedup— same skill name in both dirs resolves correctlyinternal/discovery/discovery_test.go:TestDiscoverGitHubSkillsDir—Discover()finds skills under.github/skills/TestDiscoverOtherHiddenDirsStillSkipped—.hidden/directories other than.githubremain skippedFiles to Modify
internal/workspace/workspace.go.github/skills/as secondary search path inDetectContext()internal/workspace/workspace_test.go.github/skills/discovery and merginginternal/discovery/discovery.go.githubfrom hidden-directory skip inDiscover()internal/discovery/discovery_test.go.githubexemption