Commit Graph
12 Commits
Author SHA1 Message Date
Willie 7d26726a5e feat(targets): split antigravity-cli into its own target
The Antigravity CLI (agy) reads ~/.gemini/antigravity-cli/skills and
never the app's ~/.gemini/config/skills, so treating it as an alias of
antigravity synced skills to a directory it does not read. Give it its
own targets.yaml entry with the correct path.

A path-less `antigravity-cli:` config entry also failed validation,
because DefaultTargets() is not alias-aware; as a real target it now
resolves to the default path.
2026-09-21 02:36:06 +08:00
Willie 9143b467e0 fix(targets): split gemini out of antigravity and correct global path
Antigravity and Gemini CLI read different global skill directories, so
folding gemini into antigravity as an alias made one of them wrong for
every user. Antigravity loads ~/.gemini/config/skills; Gemini CLI loads
~/.gemini/skills. Restore gemini as its own target so both resolve
correctly.

Also document that Antigravity's skill scanner skips symlinks entirely
(surfacing as "Incorrect function" on Windows, silent absence elsewhere)
along with the two available workarounds.

Closes #255
2026-08-02 22:38:56 +08:00
Willie 3345fd677e refactor: unify gemini and antigravity targets under antigravity
- Update antigravity global path to shared ~/.gemini/skills
- Update antigravity project path from .agent to .agents
- Add aliases: gemini, gemini-cli, antigravity-cli
- Remove standalone gemini target (now an alias)
- Update testutil.CreateTarget to match new path
2026-05-20 13:44:40 +08:00
Willie d2946cb4d1 fix(tests): align integration tests with cursor project path change
The cursor target's project path was updated from .cursor/skills to
.agents/skills in 57b0649d but three integration tests still asserted
the old path:

- TestInitProject_Fresh_CreatesStructure
- TestInitProject_Discover_WithMode_AddsTargetMode
- TestSyncProject_MultipleTargets

Fix testutil knownPaths map and test assertions to match the new path.
Discover test now uses windsurf (unique path) instead of cursor
(grouped at .agents/skills with 10+ other targets).
2026-05-05 12:11:06 +08:00
Willie e3f501d16f fix: redirect XDG vars into sandbox to prevent CI test leakage
Ubuntu CI runners set XDG_CONFIG_HOME system-wide, causing
config.BaseDir() in subprocesses to resolve outside the sandbox.
Redirect XDG_CONFIG_HOME/DATA_HOME/STATE_HOME to sandbox paths
so every test exercises the XDG codepath with proper isolation.
2026-02-16 12:08:05 +08:00
Willie 0bf84493cc feat: split XDG data/state dirs and add Windows legacy migration
Separate backups/trash into XDG_DATA_HOME and logs into XDG_STATE_HOME
instead of keeping everything under XDG_CONFIG_HOME. Add automatic
migration at startup to move existing data to the new locations.

Fix Windows path resolution: DataDir() and StateDir() now fall back to
%AppData% on Windows (matching BaseDir()), preventing incorrect use of
~/.local/share and ~/.local/state paths.

Add MigrateWindowsLegacyDir() to move pre-v0.13.0 data from
~\.config\skillshare\ to %AppData%\skillshare\ on Windows.

Update doctor, oplog, backup, trash, and all tests/docs accordingly.
2026-02-16 10:41:14 +08:00
Willie 403aafb254 feat: unify project target names with global names, add aliases for backward compat
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
2026-02-16 00:08:59 +08:00
Willie 78924f08ea fix(backup): replace filepath.Walk with os.ReadDir to handle Windows junctions
filepath.Walk fails on Windows NTFS junctions with "Incorrect function"
because os.Lstat returns nil info, bypassing all junction-detection logic
and crashing the entire backup for that target. This means one unreadable
junction prevents ALL local skills from being backed up.

Replace with os.ReadDir + os.Lstat so junctions are identified and skipped
before any read attempt. Also add Windows CI and unit tests for copyDir.

Fixes runkids/skillshare#7
2026-02-07 00:35:11 +08:00
Willie 0162bddfde feat: add per-target sync mode support for project mode
Allow project targets to set mode individually (merge or symlink),
mirroring global behavior. Default remains merge.

- Add Mode field to ProjectTargetEntry with YAML marshal/unmarshal
- Add mode branching in project sync (reuses syncMergeMode/syncSymlinkMode)
- Support --mode flag in target info for project targets
- Mode-aware unlink in target remove
- Unify project sync UI with global sync output format
- Update docs to reflect per-target mode support
2026-02-05 13:20:12 +08:00
Willie Hung fd4387460a feat: Team Edition - tracked repos, nested skills, collision detection
## New Features
- Tracked repositories: `install --track` to clone team skill repos
- Nested skills: organize in folders, auto-flatten on sync (work/api → work__api)
- Name collision detection: warns when multiple skills share same SKILL.md name
- Auto-pruning: orphaned symlinks cleaned on sync
- Custom naming: `--name` flag for tracked repos

## Changes
- Require target path to exist when adding targets
- Add sync reminder after adding target
- Improve pruning messages (broken vs orphan symlinks)
- Add `{team}:{name}` naming convention recommendation

## Files
- New: update.go, gitignore.go, frontmatter.go
- Updated: sync.go, install.go, uninstall.go, validate.go
- Docs: README.md, SKILL.md
2026-01-20 01:56:07 +08:00
Willie Hung 4af34fe695 feat: rename update to upgrade with CLI self-update support
- Rename `update` command to `upgrade`
- Add CLI binary self-update from GitHub releases
- Add `--cli` and `--skill` flags to upgrade specific components
- Detect Homebrew installation and use `brew install` instead
- Refactor SKILL.md with progressive disclosure pattern
- Split references into separate files (status, sync, install, etc.)
- Move run.sh to skills/skillshare/scripts/
- Fix --update flag to auto-reinstall when git pull not possible

BREAKING CHANGE: `skillshare update` is now `skillshare upgrade`
2026-01-16 22:12:03 +08:00
Willie f55e056fa4 feat: add comprehensive sandbox integration tests
Add complete integration test coverage for all CLI commands with
isolated sandbox environments that run on every change.

Changes:
- Add testutil package for sandbox test infrastructure
- Add 77 integration tests covering all commands (init, sync, status,
  diff, backup, restore, pull, doctor, target, version, help)
- Update CI workflow to run integration tests on Ubuntu and macOS
- Add SKILLSHARE_CONFIG env var support for test isolation
- Add mise.toml for task management
- Move scripts to scripts/ directory
2026-01-14 22:35:33 +08:00