Commit Graph
859 Commits
Author SHA1 Message Date
Willie 6185849328 fix: handle Windows junctions in sync and diff 2026-02-08 15:14:16 +08:00
Willie 092fb14f8a feat: add web dashboard with embedded React SPA (skillshare ui)
Single-binary web UI for visual skill management — React 19 + Vite
frontend embedded via go:embed, Go net/http REST API backend (30+
endpoints). Includes dashboard, skills browser, targets, sync, collect,
search, install, config editor, backup/restore, and git sync pages.

Also adds Bitbucket/GitLab URL parsing for install, git operations
library, skill version checking, CI frontend build steps, Docker
sandbox support, and website docs for the ui command.
2026-02-08 05:08:30 +08:00
Willie bf41422659 fix(install): naming behavior and docs 2026-02-07 21:08:36 +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 b83300ac05 feat: project level skills 2026-02-05 11:20:53 +08:00
Willie d084e59c8d fix(upgrade): gracefully handle rate limit, use cached version
- Skip CLI upgrade silently when API rate limited and no cache
- Use cached version to upgrade when API fails but cache exists
- Extract BuildDownloadURL for direct URL construction without API
- Add GetCachedVersion to expose cached latest version
2026-02-01 08:33:54 +08:00
Willie 32014986ec fix(diff,sync): improve diff clarity and fix sync --force for merge mode
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
2026-01-31 20:22:51 +08:00
Willie e4565005b5 refactor: reduce cyclomatic complexity across CLI commands
Extract options structs and helper functions to reduce complexity:
- cmdInit: 49 → 5 (extract parseInitArgs, validateInitOptions, etc.)
- cmdUninstall: 39 → 12 (extract parseUninstallArgs, resolveUninstallTarget)
- cmdList: 33 → 12 (extract parseListArgs, buildSkillEntries)
- cmdInstall: 28 → 6 (extract parseInstallArgs, dispatchInstall)
- search.Search: 29 → ~5 (extract fetchCodeSearchResults, processSearchItems)
- main: 24 → 9 (command map pattern replaces switch)
- targetRemove: 21 → 7 (extract parseTargetRemoveArgs, backupTargets)
- updateAllTrackedRepos: 20 → ~10 (extract updateTrackedRepoQuick)
- cmdPush: 19 → 10 (extract parsePushArgs, checkGitRepo)

Overall: 19 functions > 15 reduced to 11 (42% improvement)
2026-01-31 19:53:28 +08:00
Willie Hung 0f7ba6ff8d fix(windows): improve junction error messages and path comparison
- 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
2026-01-31 16:50:39 +08:00
Willie Hung 83bd7d45ef feat(targets): add 6 new agents to supported targets
Add AdaL, Augment, iFlow, OpenClaude, Trae CN, and Mistral Vibe.
Total supported agents: 43.
2026-01-31 16:34:36 +08:00
Willie Hung 1aab744b04 feat(search): add skillshare search command
- Search GitHub for skills containing SKILL.md files
- Sort results by repository stars (most popular first)
- Interactive selector with "Search again" option
- Auto-detect gh CLI token for authentication
- Filter out forked repositories
- Support --json, --list, --limit flags
2026-01-31 15:29:49 +08:00
Willie Hung bf286f1d88 fix(upgrade): add Windows zip support
- Handle .zip format for Windows releases (vs .tar.gz for others)
- Add extractFromZip() and refactor extraction logic
- Update test to use --force flag for upgrade flow
2026-01-31 03:40:34 +08:00
Willie Hung f5798fc0ea fix(upgrade): add GitHub token support and improve rate limit handling
Refactored GitHub API logic into shared internal/version/github.go:
- Support GITHUB_TOKEN and GH_TOKEN environment variables
- Clear error message when rate limit exceeded with fix instructions
- Removed duplicate API code from upgrade.go and check.go
2026-01-31 03:10:55 +08:00
Willie Hung 3bb6edc12a feat(ui): redesign install command with tree-style output
- Add tree structure UI (▸ → ├─ → └─) for install progress
- Add SkillBox component for displaying skill details
- Customize survey multi-select with cleaner icons (✓, ▸)
- Unify UI across all install modes (discovery, track, subdir, direct)
- Show version number in logo for install commands
- Add logo to doctor and status commands
- Quiet git clone output for cleaner experience
2026-01-31 02:51:00 +08:00
Willie Hung 83849bd557 fix(backup): handle Windows junctions in copyDir
On Windows, filepath.Walk may fail when encountering junctions with
"Incorrect function" error. This fix:
- Gracefully handles walk errors for symlinks/junctions
- Uses SkipDir to avoid entering junction directories
- Double-checks with Lstat for Windows reparse points
2026-01-31 01:57:58 +08:00
Willie Hung a869838c2b feat(windows): use junction instead of symlink, show git progress
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
2026-01-31 01:18:14 +08:00
Willie Hung e764b0a206 feat(targets): add openclaw support (moltbot renamed)
Moltbot rebranded to OpenClaw with new skills directory
(~/.openclaw/skills). Keep moltbot as legacy alias.
2026-01-30 15:38:27 +08:00
Willie Hung 6f8b6768c3 feat(ui): redesign help output with ASCII art and color grouping
- Add figlet-style ASCII art logo with brand yellow color
- Group commands into logical sections (Core, Skill, Target, Sync, Utilities)
- Apply color scheme: yellow commands, cyan arguments, gray examples
- Implement ANSI-aware padding for proper column alignment
2026-01-30 13:37:49 +08:00
Willie Hung 4ce9992ff0 fix(ui): use ASCII arrow to prevent box misalignment
Unicode arrow (→) has ambiguous width in East Asian terminals,
causing pterm box rendering to misalign. Use ASCII (->) instead.
2026-01-30 10:09:03 +08:00
Willie Hung 3de857b382 feat(update): support skills with metadata in --all
- `update --all` now updates both tracked repos and skills with
  .skillshare-meta.json
- Add spinner with progress indicator [1/7] for each item
- Safe update: install to temp dir first, then swap (prevents data
  loss on failure)
- Show warning (yellow) instead of error (red) for update failures
- Add Spinner.Warn() method for warning state
2026-01-30 09:43:04 +08:00
Willie Hung 115a554d3c feat: add Kimi CLI support
Add ~/.kimi/skills/ as a sync target for Kimi Code CLI.
2026-01-28 23:20:42 +08:00
Willie Hung 4a65a981f3 feat: expand supported agents from 17 to 35
Add 18 new agents: cline, codebuddy, commandcode, continue, junie,
kiro, kode, mcpjam, moltbot, mux, neovate, openhands, pi, pochi,
qoder, qwen, trae, zencoder

- Rename clawdbot to moltbot
- Fix antigravity path to global_skills
- Update docs with new agent table
2026-01-28 17:16:02 +08:00
Willie Hung 683d22573d fix: use runewidth for correct Unicode character width calculation
The arrow character (→) takes 2 columns in terminal but was counted as 1,
causing box misalignment. Now using go-runewidth for accurate width calculation.
2026-01-25 02:58:46 +08:00
Willie Hung 9fbfe0e88a fix: resolve box rendering issues and improve list UI
- Add displayWidth() to calculate visible string width excluding ANSI codes
- Fix box padding calculation in Box, WarningBox, SummaryBox, UpdateNotification
- Disable git color output in GetCommitsBetween to prevent ANSI codes in commit hashes
- Improve list command: dynamic name alignment, add icons, remove duplicate separators
2026-01-25 02:49:54 +08:00
Willie Hung 19d641d66b feat: move version cache to XDG-compliant location
Move version-check.json from ~/.skillshare/ to ~/.cache/skillshare/
to align with XDG Base Directory Specification. Add support for
XDG_CACHE_HOME environment variable. Auto-cleanup legacy cache
location on first run.
2026-01-24 23:34:23 +08:00
Willie Hung 3a3f0ef6f2 fix: remove ANSI codes from update notification content
ANSI color codes in box content caused pterm to miscalculate width,
resulting in misaligned right border. Use plain text content and
let pterm handle the box styling.
2026-01-24 01:55:03 +08:00
Willie Hung 8617fe235d feat: support discovery mode for git subdirectories
When installing from a git subdirectory (e.g., user/repo/path/to/skills),
automatically scan for multiple skills within that subdirectory. If found,
enter discovery mode to let users select which skills to install.

- Add DiscoverFromGitSubdir() for subdirectory scanning
- Add includeRoot parameter to discoverSkills() to include root SKILL.md
- Add handleGitSubdirInstall() for subdir discovery flow
- Display "root" label for root-level skills in selection UI
- Auto-install if only one skill found, prompt selection if multiple
2026-01-24 01:39:12 +08:00
Willie Hung 806e14096d feat: handle force push when updating tracked repos
When using --force flag, use git fetch + reset --hard instead of
git pull. This handles cases where remote history was rewritten
(force push).
2026-01-24 00:07:27 +08:00
Willie Hung 10be270dcd fix: clear stale version cache when current >= cached latest
If user manually updates (not via skillshare upgrade), the cache
may still show an older "latest" version. Now clears cache when
current version >= cached latest to trigger fresh fetch.
2026-01-23 21:19:33 +08:00
Willie Hung fa6757664f feat: clear version cache after successful upgrade 2026-01-23 21:17:35 +08:00
Willie Hung f9f4e595e0 fix: add padding to SummaryBox for consistent border width 2026-01-23 21:14:09 +08:00
Willie Hung 6fad4335d2 fix: Box padding and semver comparison
- Add padding to Box function for consistent border width
- Fix version comparison to handle semver properly (0.6.10 > 0.6.8)
2026-01-23 21:13:22 +08:00
Willie Hung dda075cffb fix: disable color in git status output for consistent box rendering 2026-01-23 21:04:38 +08:00
Willie Hung 6dfe1c0c1f fix: pad WarningBox lines for consistent border width 2026-01-23 21:03:03 +08:00
Willie Hung fb077539da feat: add version check notification after commands
- Check GitHub releases API for new versions (24h cache)
- Display colorful update notification when update available
- Skip check for dev builds
- Cache stored at ~/.skillshare/version-check.json
2026-01-23 14:03:53 +08:00
Willie Hung 936a200198 feat: upgrade install/update UI with PTerm
- Add PTerm library for modern CLI output
- Add internal/ui/pterm.go with spinner, box, progress bar utilities
- Add internal/git/info.go for git diff/commit info retrieval
- Update install.go with header boxes, spinners, progress bars
- Update update.go with header boxes, spinners, change summaries
- Fallback to plain text for non-TTY environments
2026-01-23 13:50:57 +08:00
Willie Hung ad6715539e fix: GetTrackedRepos now correctly checks for '_' prefix
The function was checking for '@' prefix instead of '_', causing
`skillshare update --all` to find no tracked repositories.
2026-01-21 11:39:39 +08:00
Willie Hung d43afa5269 feat: add discover mode for init command
- Add --discover flag to detect new agents
- Add --select flag for non-interactive mode (AI use)
- Use survey.MultiSelect for interactive target selection
- Update init.md with discover flags documentation
- Add 8 test cases for discover functionality
2026-01-21 00:42:05 +08:00
Willie Hung 8bcf5b6a13 feat: add 5 new agents to DefaultTargets
- clawdbot, droid, kilocode, roo, windsurf
- Fix amp path to ~/.config/agents/skills
- Update docs/targets.md with new agents list
2026-01-21 00:41:57 +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 aaae299f9e feat: require target path to exist and show sync reminder
- Change TargetPath validation to return error when path doesn't exist
  instead of just a warning
- Add sync reminder message after successful target add
- Add TestTargetPath unit tests and integration test for non-existent path
2026-01-19 22:18:08 +08:00
Willie Hung 5e15e6bc8a fix: update opencode target path from skill to skills
Opencode unified their path structure to use "skills" (plural).
See: https://opencode.ai/docs/skills/
2026-01-19 21:06:22 +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 Hung 01bad709a1 feat: add GitHub shorthand for install command
Support owner/repo shorthand that expands to github.com/owner/repo:
- skillshare install anthropics/skills
- skillshare install anthropics/skills/skills/pdf

This matches the UX of npm, go get, and skild for faster installs.
2026-01-16 01:21:46 +08:00
Willie Hung 0a410234fd feat: add skill installer and expand dry-run previews 2026-01-15 23:15:38 +08:00
Willie Hung 3c28b254dd feat: add Amp, Gemini CLI, Letta as supported targets
- Add amp target (~/.amp/skills)
- Add gemini target (~/.gemini/skills)
- Add letta target (~/.letta/skills)
2026-01-15 17:17:50 +08:00
Willie Hung 2a83d170eb feat: add Goose and global agents as supported targets
- Add goose target (~/.config/goose/skills)
- Add agents target (~/.config/agents/skills) for portable cross-agent skills
- Alphabetize target list for consistency
2026-01-15 17:12:15 +08:00
Willie Hung 6f181f18bf feat: add Crush as supported target
- Add crush target with path ~/.config/crush/skills
- Update README supported tools list
2026-01-15 17:08:54 +08:00
Willie Hung 4d96a0de56 refactor: rename gemini target to antigravity
- Rename target from 'gemini' to 'antigravity' to match product name
- Update README to use Antigravity instead of Gemini CLI
2026-01-15 03:53:32 +08:00