- Add contentEqual() byte comparison for copy-mode idempotency check:
re-running sync extras no longer marks identical copies as conflicts
- Restore mode default in CLI handler so display shows "(merge)"
instead of "()" for targets with no explicit mode
- Fix bug: pass `rest` (not `args`) to cmdSyncExtras in --all path
- Return error from cmdSyncExtras when totalErrors > 0
- Remove empty if-block dead code in syncOneExtraFile
- Remove redundant mode default (SyncExtra already defaults to merge)
- Consolidate capitalize/capitalizeFirst into single Unicode-safe helper
- Remove trivial copyExtraFile wrapper, call copyFile directly
- Warn when --all is used in project mode (extras are global only)
- Cache os.UserHomeDir() at package level for shortenPath
- Use source file set instead of per-file os.Stat in pruneExtraOrphans
filepath.Walk/WalkDir silently skip symlinked root directories because
os.Lstat sees the root as a non-directory symlink and never enters it.
This affected update, uninstall, reconcile, and server handlers when
the source directory was a symlink (common with dotfiles managers).
Extract ResolveSymlink() from sync.go into internal/utils/path.go and
apply it at every filepath.Walk/WalkDir callsite on source/target dirs.
Also add containment guards to resolveGroupSkills (uninstall) and
resolveGroupUpdatable (update) to reject group directories that are
symlinks pointing outside the source tree.
When source or target directories are symlinks managed by external tools
(e.g., dotfiles managers), sync would incorrectly delete them during
mode conversion. This change:
- Add resolveWalkRoot() so filepath.Walk follows symlinked source dirs
- Add isSymlinkToSource() with canonicalization to distinguish internal
symlink-mode targets from external symlinks (alias-safe)
- Protect external target symlinks in both merge and copy mode
- Allow FindLocalSkills to scan through external symlinked targets
- Handle external symlinks in CheckStatusMerge as normal directories
When a target directory is an external symlink (e.g., dotfiles manager
pointing ~/.claude/skills/ elsewhere), sync previously deleted it
unconditionally during symlink→merge/copy mode conversion. This also
affected DiscoverSourceSkills which failed to traverse symlinked source
directories because filepath.Walk uses Lstat on root.
Changes:
- Add resolveWalkRoot() helper; use in both Discover functions so
filepath.Walk enters symlinked source directories
- Add isSymlinkToSource() to distinguish source-pointing symlinks
(symlink mode residue, safe to remove) from external symlinks
- Pass explicit sourcePath to SyncTargetMergeWithSkills and
SyncTargetCopyWithSkills for reliable symlink origin detection
- Fix FindLocalSkills to use utils.ResolveLinkTarget (handles relative
symlinks correctly) and follow external symlinks for scanning
- Fix CheckStatusMerge to follow external symlinks instead of returning
StatusConflict
- Add 17 unit tests and 6 integration tests covering symlinked source,
target, both, chained symlinks, idempotency, prune, and pull
Size was computed by walking every file in every local skill directory
during the scan phase, before the user even confirms. CLI never displays
the size. Move to lazy on-demand calculation in the Web UI handler only.
Copy mode previously computed DirChecksum (Walk + ReadFile + SHA256)
for every skill on every sync, even when nothing changed. Add mtime-
based short-circuit: if source dir max mtime matches the manifest
record, skip checksum entirely.
Changes:
- Add DirMaxMtime() — Walk + lstat only, no file reads
- Extend Manifest with Mtimes map (omitempty, backward-compatible)
- SyncTargetCopyWithSkills: mtime fast-path with target validity check
- diff: two-phase scan-then-display with spinner (no more interleaved
spinner + diff output), discovery spinner for both global/project
- Clearer diff reasons: "missing" → "source only",
"missing (deleted from target)" → "deleted from target"
- Server handleDiff: same mtime fast-path for copy mode
- Prune cleans up orphan mtime entries
DiscoverSourceSkills was called 1+2N times (N = number of targets),
each doing a full filepath.Walk + SKILL.md frontmatter parsing.
Now discovered once and passed to all targets via WithSkills variants.
Changes:
- Add SyncTargetMergeWithSkills, PruneOrphanLinksWithSkills (PruneOptions struct)
- Add SyncTargetCopyWithSkills with onProgress callback, PruneOrphanCopiesWithSkills
- Discovery spinner + per-target reporting + summary line in CLI
- Copy mode shows per-skill spinner progress during slow checksum+copy
- Collision report uses dim gray text to avoid confusion with sync results
- Server handlers (handleSync, handlePull) use single discovery pass
- Fix pre-existing TestLog_StatsOutput assertion ("Success rate" → "OK:")
DiscoverSourceSkillsLite skips frontmatter parsing during directory
walk and collects tracked repos in a single pass — significantly
faster for large skill collections.
ParseFrontmatterFields extracts specific YAML fields from SKILL.md
without parsing the full document, used by the TUI detail panel.
MatchesTargetName now falls back to path comparison when name-based
matching fails, so targets sharing the same project_path (e.g. codex
and universal both using .agents/skills) correctly match in
FilterSkillsByTarget.
PruneOrphanLinks records user-created directories in LocalDirs instead
of emitting misleading "unknown directory" warnings, and syncMergeMode
counts them toward the local skill total.
- Extend .skillshare-manifest.json tracking from copy mode to merge mode.
- Update PruneOrphanLinks to prioritize manifest records over naming patterns.
- Ensure SyncTargetMerge writes to manifest for all linked/updated skills.
- Add integration tests for uninstall + sync orphan directory cleanup.
- Maintain backward compatibility for targets without existing manifests.
Unreadable files or unresolvable paths now cause DirChecksum to return
an error rather than silently producing an incomplete checksum.
Ref: PR #33 review (gemini-code-assist)
- SyncTargetCopy replaces non-directory managed entries with proper
skill directories; skips local non-directory entries unless --force
- CheckStatusCopy only counts managed entries that are actual
directories on disk
- diff and server diff handlers report "target entry is not a
directory" for both managed and unmanaged non-directory entries
- Add tests for non-directory edge cases in sync, diff, and target info
- P1: diff now checks target skill directory exists before comparing
checksums; deleted directories are reported as "missing" instead of
being silently treated as synced
- P2: CheckStatusCopy counts only managed entries that exist on disk,
so target info shows accurate managed count
- Add tests for deleted target dir detection and manifest/disk mismatch
- P1: diff now compares checksums to detect content drift in copy mode
- P2: diff routes on config mode instead of manifest presence
- P2: project target remove cleans up manifest file
- P3: target info uses mode-appropriate status check (copy/merge/symlink)
- Export DirChecksum for use by diff and server handlers
- Add 4 integration tests covering all fixed scenarios
Add a third sync mode (`copy`) that copies skills as real files instead
of symlinks, with a `.skillshare-manifest.json` tracking managed skills
and SHA256 checksums for incremental updates.
- Manifest-based tracking: skip unchanged, update modified, --force all
- Pruning: remove managed copies no longer in source
- Mode conversion: bidirectional merge↔copy and symlink↔copy
- Full command support: sync, status, doctor, diff, target, collect
- Server API + Web UI: targets list, drift detection, filter editing
- include/exclude filters work in both merge and copy modes
- 12 integration tests covering all acceptance criteria
- Documentation updated across 13 pages
Closes#31
After data migration (e.g. XDG path change), target symlinks still
point to old source path. PruneOrphanLinks treated these as "external"
and always preserved them, even with --force.
- Auto-remove broken external symlinks (target no longer exists)
- Pass force flag to PruneOrphanLinks; force removes valid external symlinks
- Use utils.PathHasPrefix for Windows case-insensitive path comparison
Project targets now use the same short names as global targets (e.g.,
"claude" instead of "claude-code"). Old project_name values are preserved
as aliases so existing configs continue to work.
- Add Aliases field to targetSpec (deprecated, remove once safe)
- Update 11 targets in targets.yaml: project_name = global_name
- LookupProjectTarget falls back to alias lookup
- Fix 3 callers that bypassed LookupProjectTarget
- Extend MatchesTargetName and KnownTargetNames with alias support
- Add TestLookupProjectTarget_Alias
- Update all integration tests, docs, CLI help, and FAQ
Collision checks previously ran on all skills before target filters,
producing false positive warnings when users route same-named skills
to different targets via include/exclude. Now collision detection
runs per-target after filtering, downgrading to info when filters
correctly isolate duplicates.
- Add CheckNameCollisionsForTargets() to internal/sync
- Replace collision blocks in sync.go and sync_project.go
- Show human-readable filter summary per merge target
- Add unit tests (5 cases) and integration test
- Update docs with new two-tier collision output examples
Sync discovery (DiscoverSourceSkills) was skipping all hidden directories
via utils.IsHidden(), causing skills inside .curated/ and .system/ (like
openai/skills) to be invisible after install. Now only .git is skipped,
matching the install-time discovery that was already fixed in 8ec5306.
Tracked repo naming now uses owner-repo format (e.g., _openai-skills
instead of _skills) via new Source.TrackName() method, preventing
collisions between repos that share the same basename.
Project-mode `list` command now uses recursive DiscoverSourceSkills()
instead of shallow os.ReadDir(), aligning with global list and web UI
behavior so tracked repo skills are visible everywhere.
Also includes CHANGELOG for v0.11.0, README updates, docs improvements,
and minor UI nav reorder.
diff improvements:
- Use sync.DiscoverSourceSkills for proper tracked repo handling
- Remove "Diff:" prefix, show target name directly
- Clearer descriptions: "missing", "local copy (sync --force to replace)", "local only"
- Add action hints explaining what sync/pull commands will do
sync --force fix:
- Now properly replaces local copies with symlinks in merge mode
- Previously --force only worked for symlink mode conflicts
help improvements:
- Add GIT REMOTE section grouping push and pull --remote together
- Remove logo from status command (high-frequency operation)
docs: update sync.md with new diff output format and symbols table
- Add detailed error messages when junction/symlink creation fails
- Pre-flight checks for source existence and target conflicts
- Capture mklink /J stderr output
- Show both junction and symlink failure reasons
- Add case-insensitive path comparison for Windows (NTFS)
- New PathsEqual() and PathHasPrefix() in utils/path.go
- Fix 8 path comparisons that could fail due to case differences
- Affects sync, pull, target remove, diff, and doctor commands
Windows symlinks require admin or Developer Mode. This commit:
- Add platform-specific link creation (junction on Windows, symlink on Unix)
- Show git clone progress instead of quiet mode for better UX
- Update doctor to test link support using the new createLink function
- Add `skillshare target <name>` to show target details
- Add `skillshare target <name> --mode <mode>` to change target mode
- Show sync mode [merge/symlink] in status and doctor output
- Show warning when configured mode doesn't match actual state
- Fix sync to properly convert between symlink and merge modes
- Simplify module name to `skillshare`
- Remove go install option from README (incompatible with simplified module)
Share skills across AI CLI tools (Claude Code, Codex, Cursor, Gemini, OpenCode)
with a single source directory and symlinks.
Commands:
- init: Initialize with source directory, auto-detect CLI tools
- sync: Migrate existing skills and create symlinks
- status: Show target status
- target: Manage targets (add/remove/list)