Commit Graph
103 Commits
Author SHA1 Message Date
Willie 89055804ff fix: harden pull/push first-sync flow and add regression coverage 2026-02-21 21:12:51 +08:00
Willie 2b6386463f docs(faq): add per-skill target routing FAQ entry
Address common user question about syncing specific skills to specific
CLIs. Covers both SKILL.md targets field and config include/exclude
filters. Ref: discussions#34
2026-02-21 10:27:13 +08:00
Willie 2bb7312e9d test(install): add auth integration tests and fix docs gaps
Add offline tests verifying token env vars don't interfere with file://
clones and git pull updates. Add online tests for HTTPS public/private
repo auth, error message format, and token redaction in output.

Also fix install.md: add --global/-g to Options table, add --exclude
to no-arg restriction note. Update CHANGELOG for v0.15.0.
2026-02-21 06:07:35 +08:00
Willie 084d93bf94 feat(devcontainer): add credential-helper toggle and token forwarding
Add tooling for testing private repo auth inside the devcontainer:

- credential-helper script (on/off/status) with --eval mode to
  toggle both git credential helper and token env vars in one command
- remoteEnv forwards host token env vars (GITHUB_TOKEN, GITLAB_TOKEN,
  BITBUCKET_TOKEN, BITBUCKET_USERNAME, SKILLSHARE_GIT_TOKEN)
- docker-compose env_file for .devcontainer/.env (optional, gitignored)
- start-dev.sh auto-detects GITHUB_TOKEN from gh CLI on container start
- .env.example template for all supported tokens
- docker-sandbox.md documents token sources and private repo testing
2026-02-21 06:07:35 +08:00
Willie a972a0c943 feat(install): add HTTPS token auth for private repos
Automatically detect GITHUB_TOKEN, GITLAB_TOKEN, BITBUCKET_TOKEN, or
SKILLSHARE_GIT_TOKEN and inject credentials via transient GIT_CONFIG_*
env vars during clone and pull. Tokens are never persisted to disk.

Key changes:
- Platform detection (GitHub/GitLab/Bitbucket) with per-platform
  username conventions (x-access-token, oauth2, x-token-auth)
- GIT_CONFIG_COUNT safe append — reads existing count to avoid
  overriding CI pipeline git config entries
- Token-aware error messages: "no token" shows 3 options (SSH, env
  var, credential helper); "token rejected" suggests checking
  permissions and expiry
- sanitizeTokens redacts all credential values (including
  BITBUCKET_USERNAME) from stderr before surfacing errors
- gitPull also injects auth via getRemoteURL(), fixing the previous
  limitation where update failed after HTTPS+token install
2026-02-21 06:07:35 +08:00
Willie f5893a845c docs(sync): reframe copy mode as a first-class choice, not a workaround
Cursor 2.5 fixed symlink discovery, so copy mode no longer needs to be
positioned as a bug workaround. Add "Why copy mode?" section highlighting
three standalone motivations: defensive design (cross-platform symlink
variance), sandboxed environments (CI/containers), and user preference
(transparency/portability).
2026-02-21 06:07:35 +08:00
Willie 89060c0190 docs(sync): fix copy mode schema and document --force flag
- Add "copy" to project-config.schema.json mode enum
- Update include/exclude descriptions from "merge mode only" to
  "merge and copy modes" in both schemas
- Add --force/-f flag documentation to sync command page
- Add copy mode row to project-skills.md Mode Restrictions table
- Expand copy mode use cases: vendoring, CI pipelines, air-gapped
2026-02-21 06:07:35 +08:00
Willie 14257b1925 docs(skillshare): clarify copy-mode sync and doctor duplicate rules 2026-02-21 06:07:35 +08:00
Willie 3b721ee3e2 feat(sync): add copy mode for AI CLIs that can't follow symlinks
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
2026-02-21 06:07:35 +08:00
Willie 864a7056e2 docs: add centralized vs local-first architecture comparison
Help users understand the trade-offs between centralized skill
registries and skillshare's local-first approach, including the
hub system for decentralized discovery and self-hosted metrics.
2026-02-20 23:04:29 +08:00
Willie 7f742278f0 refactor(build): simplify Make/mise targets from 34 to 21
Sandbox (8→2): consolidate into `make playground` + `playground-down`,
add scripts/sandbox.sh wrapper for advanced ops (up/down/shell/reset/
status/logs/bare).

Test (7→5): remove test-cover and test-install from Make (still
available via scripts directly).

Dev Docker (3→2): merge dev-docker-up and dev-docker-watch into
`make dev-docker` (defaults to Compose Watch for auto-rebuild),
keep dev-docker-down.

Update all docs references: README, CLAUDE.md, quick-reference,
docker-sandbox guide, ui command page.
2026-02-20 22:13:33 +08:00
Willie 595fe84c6b refactor(devcontainer): simplify dev server management
Replace dev-servers with self-contained `ui` and `docs` commands:
- `ui` / `ui -p`: build binary, start API (global/project) + Vite
- `ui stop`: stop API + Vite
- `docs` / `docs stop`: start/stop Docusaurus
- Remove `ui-p` script (merged into `ui -p`)
- Fix PID reuse false-positive in is_running() via /proc/cmdline
- Fix process tree cleanup in do_stop() (kill children before parent)
- Fix pkill pattern to match `skillshare-dev` binary name
- Update devcontainer.json port labels and ordering
- Update docker-sandbox.md to reflect new commands
2026-02-20 22:13:33 +08:00
Willie aef35a9b40 feat(check): support multiple names and --group/-G flag
Allow `check` to target specific skills/repos instead of always scanning
everything. Adds parseCheckArgs, runCheckFiltered with spinner, and
positional group auto-detection — reusing resolve logic from update.

No args = check all (existing behavior preserved).
2026-02-20 13:28:13 +08:00
Willie a202557192 feat(update): support multiple names and --group/-G flag
Allow `update` to accept multiple positional names and a repeatable
`--group/-G` flag, matching the UX already available in `uninstall`.

- Add `updateOptions` struct and `parseUpdateArgs` (mirrors `parseUninstallArgs`)
- Add `resolveGroupUpdatable` to walk a group dir for updatable items only
  (tracked repos or skills with metadata; local skills silently skipped)
- Add `isGroupDir` to auto-detect positional args that are group directories
  (checked before basename resolution so "feature-radar" expands the group
  rather than matching the nested "feature-radar/feature-radar" by basename)
- Refactor `cmdUpdate` (global) and `cmdUpdateProject` (project) to use the
  shared parser and support batch updates
- `--all` is mutually exclusive with names/groups
- Project mode preserves default `--all` when no args given
- 10 new integration tests (8 global + 2 project)
- Update docs with multi-name, --group examples and options table
2026-02-20 13:10:46 +08:00
Willie 1b5056d0ea refactor(docker): unify versions, consolidate init scripts, add sandbox-logs
- Add `make sandbox-logs` / `mise run sandbox:logs` convenience target
- Unify Docker build versions via ARG: Node 24, pnpm 10.28.0, Go 1.25.5
- Extract shared demo content to scripts/create-demo-content.sh, slim down
  setup.sh and sandbox_playground_up.sh from ~150 duplicated lines each
- Move devcontainer scripts (ui, ui-p, docs) to .devcontainer/bin/
  (source-controlled, survives make clean) with auto mode-switching
2026-02-20 12:22:02 +08:00
Willie 626f0f2240 feat(devcontainer): add Node.js 24, auto-start dev servers, and dev-servers manager
Enable full frontend development inside the devcontainer without
falling back to the host. Three dev servers (Go API :19420, Vite :5173,
Docusaurus :3000) start automatically via postStartCommand and can be
managed with the `dev-servers` CLI (start/stop/restart/status/logs).

Key changes:
- Add Node.js 24 + pnpm devcontainer feature
- Auto-install ui/ and website/ dependencies in setup.sh
- Add dev-servers.sh process manager with PID tracking
- Replace shell aliases with PATH scripts (ss, skillshare-ui, etc.)
- Set Vite server.host: true for container accessibility
- Make ui-dev Go server host configurable via SKILLSHARE_UI_HOST env var
- Forward ports 5173 and 3000 alongside 19420
- Harden setup.sh with environment guard and safe_cleanup helpers
- Update docker-sandbox.md with frontend development section
2026-02-20 04:12:34 +08:00
Willie 941a64867e docs: reposition hub as organization-first with private source examples
Hub docs previously used public github.com URLs in examples, making it
unclear why users would choose hub over GitHub Search. Reframe hub as
the go-to solution for organization-wide skill distribution with private
sources (GHE, internal GitLab, VPN-only servers).

- Rename "Community Hub" to "Public Hub" (dual role: default catalog + fork template)
- Add "Organization Deployment" end-to-end workflow with GHE URLs
- Add admonition explaining why hub exists vs GitHub Search
- Update hand-written index examples with internal URLs
2026-02-20 01:31:29 +08:00
Willie 82fc7e8a99 docs: add security guide with cross-references
New guide at docs/guides/security.md covering threat model,
defense-in-depth layers, security checklist, organizational policy,
and real-world CI/CD example from skillshare-hub.

Cross-linked from sidebar (Advanced), guides index, audit command
See Also, best-practices Security section, and README.
2026-02-20 01:02:00 +08:00
Willie 0e25056df8 refactor(docs): replace ASCII box-drawing diagrams with Mermaid SVG
ASCII box-drawing characters (┌─┐│└─┘) render inconsistently on
Windows due to monospace font width differences. Replace all 30+
diagrams across docs with Mermaid flowcharts rendered as SVG.

- Add Mermaid handDrawn config (Rough.js sketchy style, seed 42)
- Add CSS fix for foreignObject overflow clipping in handDrawn mode
- Convert supported-targets grid to HTML with anchor navigation
- Simplify all node labels to short, readable single-line text
- Strip redundant %%{init}%% directives (covered by global config)
2026-02-19 23:56:11 +08:00
Willie 072b077971 feat: add JSON Schema for config YAML files
Enable IDE autocompletion, validation, and hover docs for config.yaml
by adding JSON Schema support via yaml-language-server directive.

- Add schemas/config.schema.json (global) and project-config.schema.json
- Prepend schema comment in Config.Save() and ProjectConfig.Save()
- Add unit and integration tests for schema comment roundtrip
- Document IDE setup in configuration.md
2026-02-18 23:58:45 +08:00
Willie 95e7ee24a6 feat: auto-detect group in uninstall and update v0.14.0 docs
- Show "Uninstalling group (N skills)" with sub-skill listing when
  uninstalling a directory that contains sub-skills
- Update CHANGELOG, website uninstall docs with group detection example
- Update built-in skill references for v0.14.0: version bump,
  .skillignore, --exclude, license display, multi-skill uninstall,
  audit detection patterns table, Firebender target
2026-02-18 22:23:50 +08:00
Willie 86d6134c58 feat: support multi-skill and group uninstall
Allow `skillshare uninstall` to accept multiple skill names and a
repeatable `--group`/`-G` flag for batch removal. Groups use prefix
matching so `--group frontend` removes `frontend/*` recursively.
Problematic skills are skipped with warnings (skip & continue).
Names and groups can be mixed; duplicates are deduplicated by path.
Single-skill invocation preserves backward-compatible output.
2026-02-18 22:23:50 +08:00
Willie bd4c9700be feat: support group matching in .skillignore via path-based comparison
Change matchSkillIgnore to compare against skill path instead of name,
enabling patterns like "feature-radar" to exclude all skills under
that group directory. Precise paths like "feature-radar/helper" still
target individual skills. Backward compatible — flat skills have
path == name so existing patterns work unchanged.
2026-02-18 22:23:50 +08:00
Willie bbe71471de docs: expand --init-rules workflow and list directory grouping
Add step-by-step false positive fix workflow with scaffold file
preview to audit docs. Add directory grouping section to list docs
explaining auto-grouping mechanism and linking to organizing guide.
2026-02-18 22:23:50 +08:00
Willie 1ff2fe6881 feat: add group field to SkillEntry for organized skill placement
The --into flag information was previously encoded only in the name
field (e.g. name: frontend/pdf), causing config-based install to fail
because validate.SkillName() rejects slashes. Add an explicit group
field to separate placement from identity, with automatic migration
of legacy slash-in-name entries.

- Add Group field, FullName(), and EffectiveParts() to SkillEntry
- Update reconcilers to write new format and migrate legacy entries
- Fix installFromGlobalConfig/installFromProjectConfig to use
  EffectiveParts() for validation and FullName() for path construction
- Fix uninstall config cleanup to match via FullName()
- Add unit tests for SkillEntry helpers and reconciler group behavior
- Add 5 integration tests for group field end-to-end flows
- Document group field in declarative-manifest.md
2026-02-18 22:23:50 +08:00
Willie 8143e29ea7 docs: add runkids/my-skills as real-world .skillignore demo with screenshot 2026-02-18 22:23:50 +08:00
Willie 001fff0c77 feat: add .skillignore, --exclude flag, and license display for install
Implement three install features with full documentation:

- .skillignore: repo-level file to hide skills from discovery (exact
  match + trailing wildcard). Applied during git repo discovery before
  any selection prompt.
- --exclude: CLI flag to skip specific skills during multi-skill install.
  Filters before the interactive prompt so excluded skills never appear.
  Warns when used with direct local-path installs (not applicable).
- License display: shows SKILL.md license frontmatter in selection
  prompts and single-skill confirmation screen.

Add 7 integration tests, 2 new doc pages (declarative-manifest,
url-formats), and cross-reference updates across 6 existing doc pages.
2026-02-18 22:23:50 +08:00
Willie 1d0633aa35 feat: expand audit rules with 6 new security patterns
Add detection for real-world attack vectors that were missing from the
audit engine: dynamic code evaluation (eval/exec/Function), Python shell
execution (os.system/subprocess), environment variable leaking
(process.env), prompt injection hidden in HTML comments, and escape
sequence obfuscation (hex/unicode). Each rule includes false-positive
guards (e.g. evaluate() excluded from eval rule, NODE_ENV excluded from
env-access). Also backfills insecure-http and shell-chain rules that
were missing from the website docs table.
2026-02-18 22:23:50 +08:00
Willie 57099849da feat: add Firebender as a supported target
Firebender is a coding agent for JetBrains IDEs with native skills support.
Paths: ~/.firebender/skills
(global), .firebender/skills (project). Update target count to 49+.
2026-02-18 22:23:50 +08:00
Willie 15586425c8 fix: sync agent target paths with upstream and document push/pull vs config
- antigravity: global_skills → skills
- augment: rules → skills
- goose project: .agents/skills → .goose/skills (upstream main)
- Update supported-targets.md to match
- Add "Alternative: Install from Config" section to cross-machine-sync
  with comparison table (push/pull vs install from config)
- Add cross-reference tip in install.md
- Bump CHANGELOG version to 0.13.3
2026-02-18 22:23:50 +08:00
Willie 7abe17cc2c feat: add declarative skill manifest for global mode
Port the project-mode skill manifest pattern to global mode so
`config.yaml` supports a `skills:` section and `skillshare install`
(no args) installs all listed remote skills.

- Rename ProjectSkill → SkillEntry (shared by both modes)
- Add Skills []SkillEntry to global Config with validation
- Add ReconcileGlobalSkills() to auto-sync manifest after install
- Wire no-arg install, auto-reconcile on all install paths
  (including search → install), and uninstall cleanup
- Update server handlers for global reconciliation
- Update docs, tests, and CHANGELOG
2026-02-18 22:23:50 +08:00
Willie f16a28d678 docs: restructure website documentation with scenario-driven navigation
- Add version command page and fix commands index (missing check, trash, hub)
- Document target aliases and XDG base directory layout
- Rewrite all 9 section index pages with "What do you want to do?" tables
- Standardize all 24 command docs with "When to Use" and "See Also" sections
- Enhance intro with role-based paths (individual / team / migration)
- Add "What Just Happened?" explainer to first-sync getting-started page
- Add practical context callouts (:::tip) to all concept pages
- Add See Also cross-references to all guide and workflow pages

59 files changed, 547 insertions(+), 163 deletions(-)
2026-02-16 17:01:06 +08:00
Willie 692d87c4cc fix: use .md extension in relative doc links to prevent 404s
Relative links like `./sync` resolve differently depending on
whether the page URL has a trailing slash. Adding `.md` lets
Docusaurus resolve them at build time, fixing broken links when
navigating via the navbar.
2026-02-16 16:16:18 +08:00
Willie bda787362f docs: add upgrade tip to install sections and clarify Homebrew upgrade 2026-02-16 14:54:38 +08:00
Willie ba103c4a18 docs: update UI install notes for runtime download and add XDG cleanup paths
All install methods now include the web dashboard via runtime download.
Remove outdated Homebrew-only limitation notes. Add XDG data/state/cache
directories to uninstall instructions.
2026-02-16 13:04:07 +08:00
Willie d99653025c refactor: unify CacheDir into config package and document all platform paths
Move GetCacheDir() from version package to config.CacheDir(), consistent
with BaseDir()/DataDir()/StateDir() pattern including Windows fallback.
Add XDG_CACHE_HOME and cache paths to website docs.
2026-02-16 12:58:28 +08:00
Willie 2d78be860e docs: add v0.13.0 changelog, release note, and fix remaining doc gaps
- Add CHANGELOG.md entry for v0.13.0 (Added/Changed/Fixed/Breaking)
- Add RELEASE_NOTE_v0.13.0.md for GitHub release
- README: update Recent Updates table, fix Windows paths to %AppData%
- upgrade.md: document UI asset pre-download
- install.md: document fuzzy subdirectory resolution for monorepos
- check.md: document targets field validation warnings
- intro.md, configuration.md, windows.md: fix remaining Windows paths
2026-02-16 11:49:18 +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 41e822d979 feat: remove go:embed, serve UI exclusively via runtime download
Replace the embedded SPA (go:embed + build tags) with runtime download
from GitHub Releases. The binary no longer bundles UI assets — they are
downloaded on first `skillshare ui` launch and cached at
~/.cache/skillshare/ui/<version>/.

- Delete embed.go / embed_dev.go; add spa_disk.go with placeholder handler
- Simplify ensureUIAvailable(): cache check before dev-mode fallback
- Pre-download UI assets in `skillshare upgrade` (best-effort)
- Remove Node stages from production and CI Dockerfiles
- Keep Node stage in sandbox for playground UI cache pre-population
- Remove ui-embed-check CI job and -tags dev build flag
- Update Makefile, mise.toml, GoReleaser, release workflow
2026-02-16 02:58:22 +08:00
Willie 80c2d52fef feat: respect XDG Base Directory Specification (#26)
Add config.BaseDir() as single source of truth for base directory
resolution. Replace all hardcoded ~/.config/skillshare paths.

Path resolution priority:
  1. SKILLSHARE_CONFIG env var (unchanged)
  2. $XDG_CONFIG_HOME/skillshare (any platform)
  3. %AppData%/skillshare (Windows only)
  4. ~/.config/skillshare (Linux, macOS fallback)

- Add config.BaseDir() with XDG_CONFIG_HOME + Windows %AppData% support
- Update BackupDir(), TrashDir(), init default source to use BaseDir()
- Show resolved base directory in doctor output
- Add unit tests and integration tests for XDG override
- Document XDG_CONFIG_HOME and update Windows paths in docs
2026-02-16 01:23:36 +08:00
Willie 2dfe57a213 chore: improve list skills UX 2026-02-16 00:41:24 +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 a29e198725 feat: add target filter CLI, skill-level targets field, and Web UI support
- CLI: `target <name> --add-include/--add-exclude/--remove-include/--remove-exclude`
- SKILL.md `targets` frontmatter restricts sync to specified targets
- Cross-mode matching (e.g. "claude" matches "claude-code" project target)
- Web UI: inline filter editor on Targets page, target badges on Skills pages
- API: PATCH /api/targets/{name} for filter updates
- Fix drift detection in doctor/status/handler to account for skill-level targets
- `check` warns about unknown target names in skill-level targets field
- Docs: update skill-format, target command, configuration, creating-skills
2026-02-15 23:29:30 +08:00
Willie d30d90af76 feat: update Homebrew install to homebrew-core and detect missing UI
- Update Homebrew command from tap (runkids/tap/skillshare) to
  homebrew-core (brew install skillshare) in README, website homepage,
  and getting-started docs
- Add note that Homebrew build is CLI-only (no web dashboard)
- Add IsUIBuilt() detection in embed.go/embed_dev.go to check for
  placeholder UI at startup
- Show CLI warning with install instructions when skillshare ui is
  run on a build without the frontend
- Add Homebrew Note section to commands/ui.md with migration steps
2026-02-15 16:18:26 +08:00
Willie 5b437c343a docs: add project config examples to collision detection sections
Each collision detection section now shows both global and project
config filter syntax, with a cross-reference link to the full
target filters documentation.
2026-02-14 18:59:04 +08:00
Willie 43d12b11c1 feat: per-target collision detection with filter-aware reporting
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
2026-02-14 18:35:21 +08:00
Willie 137fb84abf fix: correct droid and copilot skill paths per official docs
- droid (Factory AI): ~/.agents/skills → ~/.factory/skills,
  .agents/skills → .factory/skills
  Ref: https://docs.factory.ai/cli/configuration/skills

- copilot (GitHub Copilot): .agents/skills → .github/skills
  Ref: https://docs.github.com/en/copilot/concepts/agents/about-agent-skills
2026-02-14 02:30:35 +08:00
Willie 9c9f04d511 docs: update target count to 48+, add Deep Agents, fix gemini/opencode paths 2026-02-14 02:26:16 +08:00
Willie 3d6de369a9 feat: add project mode support for doctor 2026-02-14 00:42:38 +08:00
Willie bd75ef8939 feat: support target include/exclude filters across sync, UI, and docs 2026-02-14 00:21:48 +08:00