Skip to content

Source root named .skillshare is skipped during discovery (regression since v0.24.4) #511

Closed

Description

@neilforest7

When sources.skills points to a directory whose basename is .skillshare, discovery skips the entire source tree. skillshare list reports no skills even when valid SKILL.md files exist beneath it. This also affects sync: previously managed target links can be pruned because the source appears empty.

Reproduction

Run with v0.25.3. Tested on macOS arm64 using the Homebrew binary. This creates an isolated source and configuration:

set -eu
repro_dir="$(mktemp -d)"
mkdir -p "$repro_dir/.skillshare/skills/demo"
cat > "$repro_dir/.skillshare/skills/demo/SKILL.md" <<'SKILL'
---
name: demo
description: Minimal discovery reproduction
---
Demo skill.
SKILL
cat > "$repro_dir/config.yaml" <<CONFIG
sources:
  skills: $repro_dir/.skillshare
mode: symlink
targets: {}
CONFIG
skillshare version
SKILLSHARE_CONFIG="$repro_dir/config.yaml" skillshare list --global --json

Actual on v0.25.3 and v0.24.6: [].

Expected, and observed on v0.24.3: one skill:

[{"name":"skills__demo","kind":"skill","relPath":"skills/demo"}]

Root cause and proposed fix

The regression was introduced by 881d08e, first released in v0.24.4.

ProjectTargetDotDirs() always includes .skillshare. SkipTargetDotDir() checks filepath.Dir(path) != walkRoot, but does not exempt path == walkRoot. At the root callback, that parent-directory comparison is true, so the root itself is skipped.

Exempt the source root before applying the target-directory filter:

--- a/internal/sourcewalk/walk.go
+++ b/internal/sourcewalk/walk.go
@@
-	if !info.IsDir() || !TargetDotDirs[info.Name()] {
+	if path == walkRoot || !info.IsDir() || !TargetDotDirs[info.Name()] {

A regression test should verify that a source root named .skillshare remains visible while target directories nested below a source child remain excluded. The proposed patch has not yet been compiled or unit-tested.

Verification and sync impact

The reproduction above was executed against v0.25.3, v0.24.6, and v0.24.3 with the results shown. In a separate isolated fixture with one configured merge-mode target, v0.24.3 sync created one managed link; v0.25.3 sync then discovered zero skills and pruned that link. The source SKILL.md remained intact.

Rolling back to v0.24.3 restores discovery and sync with the existing source layout and configuration.

Activity

  1. self-assigned this
    on Oct 10, 2026
  2. added
    bug
    on Oct 10, 2026
  3. added 2 commits that reference this issue on Oct 10, 2026
    d2f5936
    81974cf
  4. runkids commented on Oct 10, 2026

    @runkids
    Owner

    Thanks for the thorough report, and for pinning down the exact line. Your analysis was correct: SkipTargetDotDir never exempted the walk root, so a source whose basename matched any target dotdir (.skillshare, .claude, .cursor, …) was skipped on the very first callback.

    Fixed in #514 with the one-line guard you proposed, plus two regression tests: a unit test on SkipTargetDotDir (root not skipped, nested .claude still skipped, first-level .cursor still visible) and a discovery-level test that reproduces your exact layout (.skillshare/skills/demo/SKILL.md). Your repro script now lists skills__demo.

    While looking at this we found the same class of bug in agent discovery: a sources.agents directory with a hidden basename (e.g. ~/.agents) was also skipped entirely. That is fixed in #515.

    Both are merged on main and will ship in the next release. In the meantime your v0.24.3 rollback remains safe; nothing in the source layout or config needs to change.

  5. runkids commented on Oct 10, 2026

    @runkids
    Owner

    Both fixes (#514 and #515) are now released in v0.25.4:

    skillshare upgrade

    After upgrading you can move off the v0.24.3 rollback; no config or source layout change is needed. Thanks again for the precise report.

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions