Commit Graph
53 Commits
Author SHA1 Message Date
Willie de1abd4b33 feat(install): pin project skills to a commit with a lockfile
config.yaml records which skills a project wants, but not which commit
each one resolved to, so two teammates running `install -p` a week apart
could end up with different skill contents.

Project mode now writes .skillshare/skills.lock.json next to the config.
`install -p` checks out the locked commit for skills and tracked repos,
and brings an already installed skill to the lock when they differ.
`update -p` and the dashboard move a pin only for skills whose commit
actually changed, so a stale local copy cannot roll the team back, and
uninstall drops the pin. A locked value is only honoured when it is a
full SHA for the same source, since it ends up as a git argument.
2026-09-21 04:31:22 +08:00
Willie f52ae74c5f feat(audit): remember findings accepted via --force across updates
Overriding the audit gate with --force was per-invocation, so skills that
legitimately quote attack strings (security scanners, red-team docs) had to
be forced on every `update --all`. The only alternative, disabling the rule,
was global and turned it off for every skill.

Record the accepted findings (rule + file + matched text, no line number) in
.metadata.json under `audit_accepted`, keyed by skill relPath so it survives
entry rewrites and works for tracked repos. Later updates mark matching
findings as acknowledged and exclude them from the block decision; any new
finding, or the same rule matching different text, still blocks.

Staged installs audit a temp directory, so InstallOptions gains an
AuditAcceptRoot/AuditAcceptPath override pointing at the final destination.

Refs #279
2026-09-17 10:24:18 +08:00
Willie 0a3e669b09 fix(audit): decouple audit override from Force so --force reaches the gate
InstallOptions.Force carried two meanings: "overwrite what is already
there" and "proceed despite audit findings". Update paths set Force
unconditionally to overwrite a staged temp dir, so they had to leave it
off to keep the audit gate alive -- which swallowed the caller's --force
and made the gate impossible to override from either the CLI or the web
UI.

Split the audit intent into InstallOptions.AuditOverride and route every
gate through it alone. Entry points translate --force explicitly, so a
missed one degrades to "force has no effect" rather than "audit is
bypassed". Scan failures stay fail-closed regardless: accepting known
findings is not the same as being unable to learn any.

This also closes two paths that bypassed the gate outright, since both
inherited Force for overwrite reasons alone: install --json and grouped
batch updates.

In the web UI, Force Retry now appears only on failures force can
actually resolve -- a permission-denied unlink previously offered a
button that could never succeed -- and CLI-only flag hints are stripped
from messages rendered there.

Behaviour change: a --force at install time no longer exempts later
updates from the audit gate; it is a one-off decision per command.
2026-08-27 17:10:29 +08:00
Willie 6f49546476 fix(install): warn when temp repo cleanup fails
Route temp clone cleanup through a shared helper that logs cleanup failures with path and error while preserving existing best-effort cleanup semantics.

Cover cleanup failure logging with a deterministic unit test.
2026-06-14 14:52:22 +08:00
Willie 54dd7d12a3 fix(update): surface missing tracked repos in update --all across CLI, API, and UI
When tracked repo metadata is committed but the gitignored clone dirs are
absent on a fresh machine, `update --all` silently reported zero work: the
batch path skipped missing repos with no message, and the web UI's
update-all paths only listed repos present on disk.

Missing tracked repos are now detected and surfaced everywhere:
- CLI: a warning block (human output) plus an aggregated
  `missing_tracked_repos` summary (names + one-shot rehydrate hint) in JSON;
  the per-item error is concise. Fixed for both global and project modes,
  and batch and single-target paths.
- Server: GET /api/update/missing-tracked-repos and the update-all/stream
  summaries report them; POST /api/update/rehydrate re-clones them from
  metadata (mirrors bare `skillshare install`).
- UI: the Update page shows a warning banner listing missing repos with a
  Rehydrate button; strings added to all 11 locales.

Closes #212
2026-06-11 15:32:28 +08:00
Willie ef57f030dc fix: report missing tracked repositories 2026-06-10 15:37:16 +08:00
Letiancheng Lee 980e7e3d87 fix: support custom SSH usernames 2026-05-31 22:28:33 +08:00
Willie 89080cf4f1 refactor(install): typed ambiguity error with counts, save one clone
The mixed-tracked-repo recovery path used a fragile substring match on
the error message and re-cloned the repo via /discover to count skills
and agents. Both problems share one root cause: the counts InferTrackedKind
already computed during the failed first install were thrown away.

- Add install.TrackKindAmbiguousError carrying the discovered Skills /
  Agents counts. InferTrackedKind returns it on the ambiguous branch.
  Error() preserves the legacy message verbatim so CLI output is unchanged.
- Server handleInstall track branch uses errors.As to detect it and emits
  writeCodedError with stable code 'install.track_kind_ambiguous' plus
  skills/agents counts in error_params.
- UI replaces the substring match with an ApiError.code check and reads
  counts straight from err.params, skipping the second /discover clone.
- Add unit tests asserting errors.As, count fidelity, and explicit-kind
  short-circuit (no clone).

Net result: 2 clones instead of 3 on the mixed-track recovery path, and a
stable cross-language contract instead of a brittle English substring.
2026-05-26 11:05:32 +08:00
Willie 4e200e3dfa fix(install): validate git source in InferTrackedKind before clone attempt
InferTrackedKind was called before installTrackedRepoImpl's IsGit()
guard, causing --track with local paths to attempt a clone with an
empty URL instead of returning the correct error message.

Add an early IsGit() check so non-git sources fail with the expected
'--track requires a git repository source' error.
2026-04-11 00:57:09 +08:00
Willie 7e30699eaa feat: add tracked agent repo discovery and install support
- DiscoveredResource gains RepoRelPath and Targets fields
- AgentKind.Discover populates RepoRelPath via findTrackedRepoRelPath
- AgentCheckResult gains RepoPath and dirty status for tracked repos
- InferTrackedKind auto-detects pure-agent repos for --track install
- TrackedRepoResult reports AgentCount and Agents list
2026-04-10 02:04:55 +08:00
Willie b8a189ba58 Improve resource install agent support
Add local-path resource discovery so install flows can detect agents as well as skills. Preserve nested agent paths and suffixless agent metadata keys during batch install and update, and refresh the UI copy to use resource-aware wording on the install surface.
2026-04-10 01:26:40 +08:00
Willie 2acfec82ec refactor: simplify metadata — extract helpers, remove dual-write, add kind constants
Code quality fixes from review:
- Extract RemoveByNames() to eliminate copy-paste in uninstall Phase 7
- Add MetadataKindSkill/MetadataKindAgent constants
- Remove dual-write shim (findSkillsRoot + writeMetaToCentralized)
- install_apply.go uses WriteMetaToStore with SourceDir (no sidecar)
- Move LoadMetadata out of walk loops (P0 efficiency fix)
- isGroupDir accepts store parameter to avoid redundant loads
- Add SourceDir to InstallOptions for --into group support
2026-04-08 15:00:22 +08:00
Willie ba1b03f5f9 feat(install): add agent discovery, install flow, and --kind/--agent flags
Extend DiscoveryResult with Agents field and auto-detection rules:
- agents/ convention directory scanned for .md files
- pure agent repo fallback (no SKILL.md, no agents/ dir, root .md files)
- conventional excludes (README/LICENSE/CHANGELOG/SKILL.md)

Add InstallAgentFromDiscovery() for single-file agent install with
per-agent metadata (<name>.skillshare-meta.json with kind: agent).

Add Kind field to SkillMeta and InstallOptions. New CLI flags:
- --kind <skill|agent>: explicit resource kind selection
- --agent/-a <names>: select specific agents (implies --kind agent)

Add AgentInfo struct, DiscoveryResult helper methods (HasAgents,
HasSkills, IsMixed), and InstallOptions helpers (IsAgentMode,
HasAgentFilter).
2026-04-07 18:05:40 +08:00
Willie 8def337c05 feat(install): add Branch field to InstallOptions, SkillMeta, SkillEntry, SkillEntryDTO 2026-04-01 00:32:49 +08:00
Willie 666091a453 feat(install): add cross-path duplicate detection and same-repo skip
Prevent accidental duplicate installs when the same repo is already
installed at a different path (e.g., --into vs root). Same-repo
reinstalls now show a friendly skip indicator instead of an error.

- Add CheckCrossPathDuplicate() with URL normalization (HTTPS/SSH)
- Add ErrSkipSameRepo sentinel for graceful skip flow control
- Add checkExistingConflict() with repo URL comparison
- Fix --force hint to use repo URL (not per-skill subpath) and
  include --into when applicable
- Add dedup check to Web UI install endpoints (HTTP 409)
- Group skipped skills by directory with repo label in summary
2026-02-28 03:44:02 +08:00
Willie 87abb6e049 feat(install): replace spinner with tree-style progress and summary output
Switch config install and search install UI from plain spinner to
TreeSpinner with StepResult summary showing installed/skipped/failed
counts and elapsed time. Add git clone progress callback to spinners
so users see real-time cloning status.

- Add Quiet field to InstallOptions for suppressing per-skill output
- Add Skipped field to ConfigInstallResult for accurate summary
- Update integration test assertion to match new summary format
2026-02-27 05:39:49 +08:00
Willie 9b3d0d0b23 feat(install): show skill description in SkillBox
Enrich the single-skill install SkillBox with the SKILL.md frontmatter
description field, giving users useful context instead of repeating the
skill name. License line appended when present.

- Add Description field to SkillInfo struct
- Use ParseFrontmatterFields to read description + license in one pass
- Extract buildSkillBoxDesc helper for the two single-skill call sites
2026-02-25 19:39:28 +08:00
Willie f1b5b0b263 refactor: polish install facade delegation comments
Follow-up cleanup after install.go split.

Changes:
- clarify that install.go is a thin facade with delegated implementations
- add explicit docs for non-progress discovery internal adapters
- normalize internal query helper comment wording to match impl naming

No behavior change intended.

Verification:
- go test ./internal/install -count=1
- go test ./cmd/skillshare -run 'TestRenderInstallWarnings_CompactSuppressesExtraDetails|TestRenderBlockedAuditError_TrackedRepositoryContext' -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY=/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare go test ./tests/integration -run 'TestInstall_Subdir|TestInstall_Track_BlocksCritical' -count=1
2026-02-25 07:02:54 +08:00
Willie 3ae2a16440 refactor: split install implementation into focused files
Restructure the install package to reduce install.go size and isolate responsibilities without changing exported API signatures.

Changes:
- convert internal/install/install.go into a thin facade (types, test hook, exported wrappers)
- extract install flows into install_apply.go
- extract discovery flows into install_discovery.go
- extract update flow into install_update.go
- extract audit logic into install_audit.go
- extract git helpers into install_git.go
- extract tracked repo flow into install_tracked.go
- extract updatable/tracked query helpers into install_queries.go
- extract copy helpers into copy.go

Compatibility:
- exported API signatures are unchanged
- package remains flat as package install
- behavior is intended to remain equivalent; only code organization changed

Verification run before and after split:
- go test ./internal/install -count=1
- go test ./cmd/skillshare -run 'TestRenderInstallWarnings_CompactSuppressesExtraDetails|TestRenderBlockedAuditError_TrackedRepositoryContext' -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY=/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare go test ./tests/integration -run 'TestInstall_Subdir|TestInstall_Track_BlocksCritical' -count=1
- go test ./...
2026-02-25 07:02:54 +08:00
Willie c60d101f42 fix: clarify tracked audit block messaging
Clarify audit blocking output for tracked repository installs and updates.

Changes:
- update tracked install audit block errors to state findings were detected in tracked repository
- update tracked update audit block and rollback messages with tracked repository context
- when tracked install is blocked by audit, show spinner state as Blocked by security audit instead of Failed to clone
- enhance blocked audit summary rendering to append in tracked repository when the error context indicates a tracked repo
- add unit test coverage for tracked repository context in blocked audit rendering

Verification:
- go test ./cmd/skillshare ./internal/install -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY=/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare go test ./tests/integration -run TestInstall_Track_BlocksCritical -count=1
2026-02-25 07:02:54 +08:00
Willie 792d236485 feat: optimize tracked subdir installs and devcontainer isolation
Implement remaining Issue 46 optimizations and developer experience fixes.

Install and update optimization:
- optimize install --track for subdirectory sources by attempting sparse checkout first while preserving git metadata
- fallback to existing tracked clone strategy on sparse capability or sparse path errors
- clean sparse created destination before fallback clone to avoid destination already exists failures
- improve tracked install spinner wording for subdir sources
- add tracked subdir unit tests for sparse success and sparse to full clone fallback

Progress user experience:
- normalize git progress lines by stripping volatile transfer rate suffix
- dedupe and throttle spinner and tree spinner update frequency to reduce tty flicker
- add unit tests for spinner progress normalization and throttling behavior

GitHub API messaging:
- improve rate limit guidance to suggest setting token env vars or using gh auth login

Devcontainer isolation:
- make ssenv enter command mode run from isolated environment cwd
- fix setup global init detection to use skillshare status global mode
- add auto mode hint in devcontainer wrapper when workspace project config takes precedence

E2E and tests:
- expand Issue 46 runbook with install, install track, update, no token fallback, sparse paths, and isolation checks
- update compact warning output test expectations to match current grouped warning rendering

Verification:
- go test internal install package
- go test internal install sparse and tracked subdir tests
- go test internal ui package
- go test cmd skillshare package
- go build skillshare binary and run integration TestInstall_Subdir
- run tracked subdir tests inside devcontainer
2026-02-25 07:02:54 +08:00
Willie b014f8c6dc feat: optimize large-repo install and update flows
Implement Issue #46 across install/update paths to reduce perceived hangs and improve subdir installation performance on large repositories.

Main changes:
- Add git progress streaming primitives in internal/install/git_progress.go.
  - runGitCommandWithProgress supports stderr streaming callbacks in TTY mode.
  - scanGitProgress handles both CR and LF progress delimiters.
- Thread InstallOptions.OnProgress through clone/pull/discovery/install/update paths.
  - Keep non-TTY behavior quiet to avoid noisy logs.
  - Add TreeSpinner.Update for live message updates.
- Add progress-aware git update APIs in internal/git/info.go:
  - PullWithProgress and ForcePullWithProgress (keep PullWithEnv/ForcePullWithEnv for compatibility).
- Introduce shared GitHub client utilities in internal/github/client.go.
  - Centralize token lookup, request construction, and rate-limit handling.
  - Refactor internal/search/search.go to use shared client while preserving compatibility aliases.
- Add GitHub/GHE API subdir fast path in internal/install/github_download.go.
  - github.com => api.github.com
  - github-like enterprise hosts => https://<host>/api/v3
  - On API failure, emit warning and fallback to git-based flows.
- Add sparse checkout fallback for non-GitHub subdir sources in internal/install/sparse_checkout.go.
  - Use filter+no-checkout+depth=1 then sparse-checkout set + checkout.
- Extend discovery/install metadata plumbing.
  - DiscoveryResult now includes CommitHash and Warnings.
  - install/discover subdir paths preserve warnings and commit hashes from API/sparse/full-clone flows.
- Preserve compatibility and UX expectations.
  - Keep existing action strings (for tests/UI stability).
  - Keep legacy discover/pull APIs as wrappers around new progress-aware variants.
- Improve --track download efficiency.
  - Track clone now attempts --filter=blob:none --depth 1 --single-branch first.
  - Falls back to full clone only on remote capability mismatch, not on auth/not-found errors.

CLI wiring:
- cmd/skillshare/install.go
  - TTY handlers now pass progress callbacks and use with-progress discover APIs.
  - Subdir handler shows API-vs-clone stage messages and renders discovery fallback warnings.
- cmd/skillshare/update.go and cmd/skillshare/update_project.go
  - Use PullWithProgress/ForcePullWithProgress for tracked repos.
  - Ensure reinstall/update install flows forward progress callbacks.

Tests added/updated:
- internal/install/git_progress_test.go
- internal/install/github_download_test.go
- internal/install/sparse_checkout_test.go
- internal/install/tracked_clone_test.go
- internal/install/source_test.go (GitHubOwner/GitHubRepo coverage)
- internal/git/info_test.go (PullWithProgress/ForcePullWithProgress)
- tests/integration/install_subdir_optimization_test.go
- tests/integration/install_online_test.go (GitHub API subdir case)

Validation performed:
- go test ./internal/install -count=1
- go test ./internal/git -run 'Test.*Pull.*' -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY="/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare" go test ./tests/integration -run 'TestInstall_Subdir|TestUpdate_' -count=1
- go build -o bin/skillshare ./cmd/skillshare && SKILLSHARE_TEST_BINARY="/Users/williehung/Developer/Apps/github/skillshare/bin/skillshare" go test ./tests/integration -run 'TestInstall_Track_|TestUpdate_TrackedRepo' -count=1
- go test -tags online ./tests/integration -run TestInstall_GitHubSubdirViaAPI -count=1
- make lint
- make test
2026-02-25 07:02:54 +08:00
Willie 537e293721 feat(ui): add SectionLabel, fix StepFail ANSI passthrough, skip short elapsed
- SectionLabel(): dim section headers for visual grouping in batch output
- StepFail(): preserve pre-styled ANSI labels instead of double-wrapping
- Spinner Success/Warn: skip elapsed suffix when <50ms (avoids noise in tests)
- InstallOptions.AuditVerbose field for --audit-verbose flag plumbing
- Update install integration test assertions for batch compact format
2026-02-24 01:47:38 +08:00
Willie cd5902c590 feat: unify update audit threshold gate and docs 2026-02-23 04:18:01 +08:00
Willie 3ad814d3ba fix: add audit gate to install --track and tracked repo updates
InstallTrackedRepo and updateTrackedRepo had no security audit,
allowing --track to bypass all supply-chain checks. This adds
auditTrackedRepo (removes repo on block for fresh installs) and
auditTrackedRepoUpdate (git reset rollback for updates), plus
input validation, testable removeAll, and hardened error handling
across audit/install/uninstall paths.
2026-02-23 04:18:01 +08:00
Willie 41c80f32f5 fix: harden error handling in security-critical audit paths
- Check rollback (ResetHard) errors instead of ignoring them; report
  accurate status ("rolled back" vs "malicious content may remain")
- Add audit.ErrBlocked sentinel error; refactor isSecurityError to use
  errors.Is instead of fragile string matching
- Replace fmt.Scanln with bufio.NewReader for robust input reading
- Propagate walk/hash errors in ComputeFileHashes instead of silently
  skipping, ensuring complete integrity baselines

Addresses PR #43 review items from Gemini Code Assist.
2026-02-23 04:18:01 +08:00
Willie 2171dc4db0 feat: add --diff and audit visibility for regular skill updates
Regular skills (non-git, metadata-based) now support --diff flag using
hash-based file comparison, display audit results after update, and
properly enforce the audit gate by not passing Force to inner Install.
2026-02-23 04:18:01 +08:00
Willie 62bd821cba feat: content hash pinning and integrity verification (#39)
Pin sha256 file hashes in .skillshare-meta.json during install/update.
Audit now detects content-tampered (MEDIUM), content-missing (LOW),
and content-unexpected (LOW) findings. Backward-compatible: skills
without file_hashes in meta are silently skipped.
2026-02-23 04:18:01 +08:00
Willie a5f84c2485 feat: auto-audit gate after update with rollback and --diff summary (#39)
Supply-chain hardening Phase 2:
- Add post-pull audit gate: HIGH/CRITICAL findings auto-rollback in
  non-interactive mode (fail-closed), prompt in TTY mode
- Use full 40-char commit hashes for reliable rollback (avoids short-hash ambiguity)
- Add --skip-audit flag to bypass the gate when risk is accepted
- Add --diff flag to show file-level change summary after tracked repo update
- Add GetChangedFiles() and ResetHard() git helpers
- Add audit gate in install --update git-pull path to prevent bypass
2026-02-23 04:18:01 +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 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 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 da50912307 feat: fuzzy resolve subdirectory when exact path not found in repo
When installing from a monorepo where skills live in a nested directory
(e.g. skills/vue-best-practices/), specifying just the skill name as
subdir (owner/repo/vue-best-practices) would fail because the exact
path doesn't exist at the repo root. Now resolveSubdir scans all
SKILL.md files and matches by basename, falling back gracefully with
an ambiguity error when multiple candidates share the same name.
2026-02-16 00:54:10 +08:00
Willie 5739e59ab6 docs: clarify dev workflow and fix sandbox/dev runtime issues
- Distinguish two dev workflows: make ui-dev (local Go) vs
  dev-docker-up + pnpm run dev (no Go required)
- Add auto-init to dev profile so container doesn't crash on first run
- Add --cap-add ALL to playground volume init (cap_drop blocks chmod)
- Document port 19420 conflict between playground and dev profile
- Add docker-build vs docker-build-multiarch explanation and GHCR pull examples
- Increase git command timeout to 180s for constrained Docker networks
- Increase online test timeout to 300s
- Align Makefile help text formatting
2026-02-13 15:52:53 +08:00
Willie 9ee5324689 feat: enhance security audit thresholds, logging, and UI 2026-02-13 14:21:36 +08:00
Willie aa43f94892 feat: add --into flag for skill install command
Allow installing skills into subdirectories for organized folder
structures. Works with all install modes (direct, discovery, tracked)
in both global and project mode.

- Add Into field to InstallOptions and IntoPath() validation
- Update 4 dest-path construction points in CLI with destWithInto()
- Update InstallTrackedRepo for --into prefix in dest and gitignore
- Rewrite ReconcileProjectSkills to use filepath.WalkDir (recursive)
- Add --into to Web UI install handler, API client, and form
- Add 5 integration tests covering local, multi-level, validation,
  project mode, and no-source rejection
2026-02-13 14:21:36 +08:00
Willie f50847eb6c feat: support nested skills in check/update and add organizing guide
GetTrackedRepos() and GetUpdatableSkills() now walk subdirectories
recursively so skills organized in folders (e.g. frontend/vue/) are
detected by check and update commands. Previously only direct children
of the source directory were scanned.

Also adds:
- Short name resolution for `update` (e.g. `update vue-best-practices`
  resolves to `frontend/vue/vue-best-practices`)
- Fix ReadMeta nil check in updateSkillOrRepo to ensure fallback fires
- Remove logo from `check`, replace with mode-aware header
- New docs guide: Organizing Skills with Folders
- Rename screenshot to organizing-skills-comparison.png
2026-02-13 14:21:36 +08:00
Willie 0b280d0864 fix: normalize backslash path separators for Windows (fixes #18)
On Windows, filepath.Join produces backslash separators that were
written directly into .gitignore and JSON metadata files. Git does
not match backslash patterns, and metadata subdirs with backslashes
corrupt source URLs during updates.

Use strings.ReplaceAll(s, "\\", "/") at write boundaries — matching
the existing pattern in sync.go — to ensure config/metadata files
always contain forward slashes regardless of OS.
2026-02-11 03:30:14 +08:00
Willie f2017a35aa feat: fix tracked repo discovery, improve naming, and unify project list
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.
2026-02-10 03:13:21 +08:00
Willie 8ec53065b5 feat(install): fix hidden-dir discovery, add fuzzy search, and improve install UX
discoverSkills() skipped all dot-prefixed dirs, causing repos like
openai/skills (which use .curated/ and .system/) to find 0 skills.
Fix: only skip .git, traverse all other hidden dirs.

CLI --skill flag now falls back to fuzzy matching (via lithammer/fuzzysearch)
when exact match fails. Single fuzzy match auto-selects; ambiguous matches
show "did you mean" suggestions.

UI SkillPickerModal gains a filter input (autofocus, substring on name+path)
that appears for >5 skills. Select All toggles only filtered skills.

Batch install toast fix: always show summary toast even when some skills
are blocked by security audit (previously early-returned with no feedback).
Audit dialog now targets only blocked skills for force-retry.

CLI output for mixed results: use warning banner instead of success,
show failures first, condense >10 successes into a single line.
2026-02-10 02:23:16 +08:00
Willie 4d17ff5d57 feat: add security audit — scan engine, CLI, install hooks, web UI, and docs
Scan skills for prompt injection, data exfiltration, credential access,
destructive commands, obfuscation, and suspicious URLs. CRITICAL findings
block installation by default; HIGH/MEDIUM shown as warnings.

- Scan engine: internal/audit with regex-based pattern matching
- CLI: `skillshare audit [name]` with per-skill progress and summary
- Install hooks: auto-scan after copy, block on CRITICAL unless --force
- Web UI: AuditPage with run/rescan, InstallForm shows ConfirmDialog
  for audit blocks (force-retry) and warning details
- ConfirmDialog: add `wide` prop, hide cancel when cancelText is empty
- Reduced false positives: rm -rf only flags root/glob, skip localhost
  URLs, exclude `fetch` as English word, hidden-unicode downgraded to HIGH
- README: add audit section, update screenshots, unify image sizes,
  add audit to Why/Comparison/Daily Commands
- Docs: audit command page, install security scanning section, FAQ,
  common errors, daily workflow, sidebar, landing page, intro
- Blog specs: add audit sections to Dev.to and Medium drafts
2026-02-10 01:53:55 +08:00
Willie 0c49860d63 feat: add project mode labels, privacy-first messaging, and UI polish
- Add (project) labels to status, sync, collect, target, and uninstall
  headers for clear mode distinction (matching list/target list pattern)
- Add ui.WithModeLabel() helper for shared functions that run in both modes
- Update uninstall confirmation prompt: "from the project?" in project mode
- Add "Privacy-first" to README Why section and website homepage
- Replace "Unified Source" card with "Privacy-First" card on website
- Unify Quick Actions card heights with h-full in DashboardPage
- Add frontend rebuild note to Docker sandbox docs
2026-02-09 21:08:03 +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 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 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 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 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 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