fix: discover skills under .github/skills/ directory#69
Conversation
There was a problem hiding this comment.
Pull request overview
Enables automatic discovery of skills placed under GitHub Copilot’s conventional .github/skills/ location, without requiring users to override paths.skills.
Changes:
- Update workspace detection to merge skills from the configured skills directory (default
skills/) and.github/skills/, deduplicating by skill name (configured directory wins). - Update discovery traversal to avoid skipping the
.githubdirectory while still skipping other hidden directories. - Add tests covering
.github/skills/detection, merging, and hidden-directory skip behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/workspace/workspace.go | Merges skills from configured skills dir and .github/skills/ in DetectContext(). |
| internal/workspace/workspace_test.go | Adds workspace tests for .github/skills/ auto-discovery and merge/dedup behavior. |
| internal/discovery/discovery.go | Exempts .github from hidden-directory skipping during Discover() traversal. |
| internal/discovery/discovery_test.go | Adds discovery tests ensuring .github/skills/ is discovered while other hidden dirs remain skipped. |
e35daae to
666221a
Compare
666221a to
07e0790
Compare
spboyer
left a comment
There was a problem hiding this comment.
✅ Reviewed by Rusty — LGTM. .github/skills/ discovery support with squad state updates per team decisions. Ready to merge (can't self-approve since you authored this).
07e0790 to
3032f7f
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8468aef to
edf7a5a
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change models to match the YAML, for less confusion.
wbreza
left a comment
There was a problem hiding this comment.
Code Review: PR #69 — fix: discover skills under .github/skills/ directory
✅ What Looks Good
- All 8 prior review comments addressed — thorough follow-through across three commits
- Comprehensive test coverage — 8 new tests covering discovery, merging, deduplication, custom override, and double-scan prevention
- Correct
.githubscoping — discovery only enters.github/skills/, properly skipsworkflows/and other subdirs - Cross-platform path handling —
samePath()handles symlinks and Windows case-insensitivity - Backward compatible — no config changes needed; existing behavior preserved
🟡 Suggestions (non-blocking)
samePath()has no direct unit test — It implements non-trivial logic (Abs, EvalSymlinks, Windows case-insensitive). Consider adding aTestSamePathwith edge cases.- Consider extracting skill deduplication into a helper — The merge-with-dedup logic is inline. A
mergeSkills()helper would improve reuse if a third skill source is ever added. - Edge case tests — No explicit test for
.githubwithoutskills/subdirectory or empty.github/skills/directory. Both work correctly based on the code, but explicit tests would document the behavior.
Summary
| Priority | Count |
|---|---|
| Critical | 0 |
| High | 0 |
| Medium | 2 |
| Low | 2 |
Overall Assessment: ✅ Approve — well-implemented feature with solid test coverage. All prior feedback addressed. Suggestions are quality improvements, not blockers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
richardpark-msft
left a comment
There was a problem hiding this comment.
Seems fine. We might want to revisit some of it, but I think the overall feature makes sense.
* fix: discover skills under .github/skills/ directory #52 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: address review feedback on PR #69 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: address PR #69 discovery review comments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: add samePath tests + extract dedup helper (#69 feedback) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * refactor: optimize and dedupe skill merge logic for PR69 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #52
Changes
This PR enables waza to automatically discover skills in (GitHub Copilot's standard location) without requiring manual configuration.
Phase 1: Workspace Detection ()
Modified to check both configured skills directory and :
Phase 2: Discovery ()
Modified to exempt from hidden directory skipping:
if info.IsDir() && strings.HasPrefix(info.Name(), ".") && info.Name() != ".github"Tests
Added comprehensive test coverage:
Workspace tests:
TestDetectContext_GitHubSkillsDir- Skills in.github/skills/auto-discoveredTestDetectContext_BothSkillsDirs- Skills from both locations mergedTestDetectContext_GitHubSkillsDirDedup- Deduplication works correctlyTestDetectContext_GitHubSkillsDirWithCustomOverride- Custom paths.skills + .github/skills both workDiscovery tests:
TestDiscoverGitHubSkillsDir- Discover() finds skills under .github/skills/TestDiscoverOtherHiddenDirsStillSkipped- Other hidden dirs remain skippedVerification
✅ All tests pass:
go test ./internal/workspace/ ./internal/discovery/ -v -count=1✅ Build succeeds:
go build ./...✅ Clean diff: Only touches workspace.go, workspace_test.go, discovery.go, discovery_test.go