Repository navigation
Description
Problem
I keep a shared team skills repo under my normal projects directory (~/code/work/dev/dev-skills) and manage it with skillshare as a tracked repo. To get skillshare update (git pull) and edit-in-place behavior, the only option today is to move the real repo into the source:
~/.config/skillshare/skills/_dev-skills/ <- real repo
~/code/work/dev/dev-skills <- symlink back to it
That works, but it inverts where the repo lives. Tools that canonicalize the working directory (editors, agent CLIs, tmux-style session managers) all resolve the symlink and display the ~/.config/... path, so the repo effectively has two names and the one everybody types is the one nothing shows. I would much rather keep the repo where every other project lives and put the symlink in the source:
~/code/work/dev/dev-skills <- real repo
~/.config/skillshare/skills/_dev-skills <- symlink to it
Today that makes the repo invisible: skillshare list finds nothing inside it.
Why it does not work today
internal/sync/discover_walk.go walks with filepath.Walk, which stats entries with Lstat. A symlinked directory reports IsDir() == false, so it is neither descended into nor treated as a directory — the entry is effectively absent from the walk. The same is true of the other source walks (internal/install/install_queries.go, internal/config/reconcile_core.go, cmd/skillshare/update.go, ...).
I do not think this is a bug. It reads as a deliberate boundary: the source root may be a symlink, but its contents belong to the user.
What already points the other way
The codebase already makes room for symlinks when the user clearly meant them:
- The source root itself may be a symlink —
utils.ResolveSymlink(sourcePath)before every walk, documented for dotfiles managers (stow/chezmoi/yadm) inwebsite/docs/understand/source-and-targets.mdandreference/commands/sync.md#dotfiles-manager-compatibility. FindLocalSkills(internal/sync/pull.go) follows an external target symlink and scans the resolved directory rather than reporting a conflict.
My request is the same situation one level down: a symlink the user created on purpose, that they want treated as part of the source.
Proposal
An opt-in declaration file at the source root, symmetric with .skillignore:
# ~/.config/skillshare/skills/.skillfollow
# first-level directory symlinks that discovery may follow
_dev-skills
- Entry names, never target paths, so the file stays portable — the symlink resolves to a different absolute path on each machine (macOS vs Windows), but the declaration is identical and can be committed.
- A
.skillfollow.localcompanion for machine-local additions, mirroring.skillignore.local. - Only first-level entries of the source root; symlinks inside a followed tree are not followed, so there is no unbounded recursion.
- Targets must resolve to an existing directory; cycles (an entry resolving to the source root or an ancestor) are rejected.
- Default behavior is unchanged. With no
.skillfollow, an undeclared symlink stays invisible exactly as today.
Once the walk descends, everything else falls out for free: tracked-repo detection already probes .git with os.Stat (which follows symlinks), and skills are reported under their logical path (<source>/_dev-skills/<skill>) so the links sync writes still point through the source.
Scope
I have a working implementation. The shape is a small internal/skillfollow package (parser + filepath.Walk/WalkDir wrappers), with the wrappers swapped in at each source-root walk — one line per call site. Total upstream-file diff is ~26 insertions / 17 deletions across 11 files; the rest is the new package and tests.
Three call sites need slightly more than a one-line swap:
PruneOrphanLinksWithSkillsandCheckStatusMergedecide "is this link ours?" with a prefix test against the source path. That still holds for absolute links, but relative links (shouldUseRelative) and Windows junctions are canonicalized at creation time, so a followed skill's link resolves outside the source and gets classified as external.update --group/uninstall --groupexplicitly reject a group that resolves outside the source. Declared entries need to be exempt (undeclared ones stay rejected — the existingTestUninstallGroup_ExternalSymlinkRejected/TestUpdateGroup_ExternalSymlinkRejectedstill pass).
Known gaps I deliberately left out of a first cut, happy to discuss: internal/git/scope.go's nested-repo scan does not see a followed repo, there is no Web UI editor for .skillfollow (unlike .skillignore), and collect --force against a name that collides with a followed entry would RemoveAll the symlink rather than its target.
I also noticed while working on this that cmd/skillshare/update.go and cmd/skillshare/update_project.go walk sourcePath directly without utils.ResolveSymlink, unlike every other source walk — so update --all does not currently support a symlinked source root. Happy to split that out as a separate bug report if you prefer.
Next step
CONTRIBUTING says features go through an issue and then a proposals/ PR, with implementation handled by you. Glad to follow that — let me know if this is worth a proposal and I will write one up, and I can point at my branch as a reference implementation.
Activity
runkids commentedon Sep 21, 2026
Thanks for the detailed write-up — the use case makes sense, and keeping the repo where your other projects live is a reasonable ask.
Yes, please go ahead with a proposal. Feel free to link your branch as a reference.
The
.skillfollowfile approach sounds right to me, since it lives with the source like.skillignore. A few things I'd like the proposal to cover:Related: #253 and #206 ask for the same underlying thing from different angles — using skills that live outside the source without copying them. It'd be great if the proposal could note whether
.skillfollowcan serve as the common base for those too (e.g.install --linkjust creating the symlink + declaration).On the
update --allsymlinked source root: that looks already handled on current main, so no need for a separate report.star-nebula commentedon Oct 1, 2026
Windows data point that may change the shape of the follow-list, plus a confirmation of your
"three call sites need more than a one-line swap" note.
On Windows the link a user can actually create is a junction, not a symlink. Your own
internal/sync/symlink_windows.godocuments why:createLinkfalls back tocreateJunction(mklink /J) because directories need no privileges that way, while realsymlinks need Developer Mode. So if
.skillfollowmakes discovery descend only intoModeSymlinkentries, the feature is unreachable for Windows users in exactly the situationthis issue describes — they cannot put the "back-link" into the source in the privileged form.
Measured on 0.22.0 with an isolated config (
src/plainis a real skill directory,src/_extrepois a junction to an external repo holding 2 skills):The code reason is one level below your
filepath.Walknote: since Go 1.23 a junction reportsModeIrregularrather thanModeSymlinkand not as a directory, which is precisely whatinternal/utils/link.gosays when it justifies the extra reparse-tag read insideIsLinkMode.internal/sync/discover_walk.gothen branches only oninfo.IsDir()(:168, :176, :187, :216)and on
!info.IsDir() && info.Name() == "SKILL.md"(:234), so a junction satisfies neither anddrops out of the walk silently — no skip notice, unlike
.skillignore.Two suggestions that follow from that, if they are useful:
utils.IsLinkMode(path, info.Mode())rather than a symlink-only mode check, so one declaration file covers both link kinds.
filepath.Walkwill not descend into either kind, so the wrapper has to read the resolveddirectory itself — worth stating in the proposal, because it is where the recursion guard
("only first-level entries") actually has to live.
On your known gap with
PruneOrphanLinksWithSkills/CheckStatusMerge: agreed, and the samesource-prefix heuristic misfires in the other direction too. Because the prefix test is the only
ownership evidence the link branch uses, a junction that resolves under the source is treated as
skillshare's own regardless of who created it — on my 12-target / 663-link setup one plain
syncremoved 140 links I had made by hand, and I have filed that separately as #314. Ifprovenance came from
manifest.Managedinstead of the path prefix, both misclassificationsdisappear at once, which may be cheaper than special-casing followed entries in those two
functions.
salmonumbrella commentedon Oct 3, 2026
+1
runkids commentedon Oct 3, 2026
Thanks for the +1s and the detailed design. To move this forward, I wrote up a proposal based on @hhdebb's
.skillfollowdesign and @star-nebula's Windows/provenance notes: #369 (proposals/274-skillfollow.md).It covers the three requirements from earlier in this thread:
make checkon any new raw walk of the source. Today there are 12 raw source walks. One of them,reconcileSkillsWalk, would silently delete metadata for followed skills if it were missed.manifest.Managedand a link that resolves into the source or a followed target. Relative links are created through the logical path, so sync stays idempotent./_nameignore entry, because the current_name/pattern doesn't match a symlink.commit/pushrefuse if the link isn't ignored.update --forceis refused on a followed repo, since it would reset the user's own working copy.The proposal ends with open questions, including Windows junction read-back and whether followed single skills belong in phase 1. Feedback on the PR is welcome. Implementation starts once the design is agreed.
salmonumbrella commentedon Oct 3, 2026
btw @hhdebb thanks for herdr radar. i submitted a PR yesterday, and saw you in skillshare today. small world!
docs(proposals): opt-in .skillfollow for declared source links (#369)
feat(source): add the sourcewalk walker and sourcefs write boundary f…
feat(sourcewalk): follow first-level source links when enabled
feat(sourcewalk): expose Follow.Resolve for writes through followed l…
feat(sourcefs): write through followed first-level source links
fix(cli): pass the follow policy to update audits and group uninstall
docs: describe the link decision flow and writes through followed links
fix(sourcewalk): resolve junction targets with Readlink on Windows
runkids commentedon Oct 6, 2026
This shipped in v0.25.0. Thank you @hhdebb for the design and @star-nebula for the Windows notes; both shaped what landed.
Your repo can now stay where your other projects live:
skillshare link ~/code/work/dev/dev-skills --enable skillshare syncIt ended up as a single
follow_source_linkssetting rather than a.skillfollowfile, andskillshare link/unlinkcreate and remove the link for you (on Windows too). The dashboard can do the same.Docs:
link,follow_source_links.Closing this as completed. If anything doesn't work as expected, please open a new issue.