297 Commits
Author SHA1 Message Date
Willie 54ae7b04e2 fix(install): reject project-root self-install via web UI
The project-root self-install guard lived only in the CLI handler, so the
web UI could still copy the project root into its own .skillshare/skills/
subtree in project mode. Extract the check into a shared
install.RejectProjectRootLocalInstall and apply it in handleInstall and
handleInstallBatch, returning 400 with the same guidance.

Also restructure the rejection message into a cause line plus an
actionable "Run '...'" hint, matching the project's error convention.
2026-06-16 10:04:57 +08:00
Willie 3ad54abb6e chore: release v0.20.13 2026-06-11 16:15:25 +08:00
Willie 060886c281 chore: release v0.20.12 2026-06-11 01:18:10 +08:00
Willie 10d94a3542 fix: suggest install for missing tracked repos 2026-06-10 15:54:23 +08:00
Willie 63adb16bbb docs: document disabling skills by folder glob
Surface the existing .skillignore glob support in the enable/disable
command reference and the folder-organization guide. Users reported
(issue #209) only finding it buried in reference/filtering, assuming
disable accepted skill names only.

Add "frontend/**" folder examples, a dedicated "Disable a Whole Folder"
section, and shell-quoting guidance.
2026-06-09 12:44:30 +08:00
Willie e4ba03334a chore: release v0.20.8 2026-06-05 13:56:07 +08:00
Willie ccbe941291 feat: add Zed editor target
Zed added agent-skills support in vercel-labs/skills v1.5.8, using the
universal ~/.agents/skills (global) and .agents/skills (project) paths with
a flat-only skill layout. Register it as a built-in target and document it.

Since Zed shares the universal .agents/skills project path, it is auto-grouped
under the universal target by GroupedProjectTargets(); the docs note reflects
this. Verified in devcontainer: internal/config tests pass and zed resolves
via KnownTargetNames().
2026-06-03 00:21:29 +08:00
Willie e7be4c60c4 docs(extras): sync quick-reference and built-in skill with per-target flags 2026-06-02 17:39:23 +08:00
Willie b0732b75bb docs(extras): document --add-target/--remove-target; drop 'extras mode' subcommand 2026-06-02 17:22:56 +08:00
Willie 1d0ee69955 feat: support SSH hub sources for private and GHE hosts
Hub index fetch previously handled only unauthenticated HTTP(S) GET or
local file paths, leaving private and GitHub Enterprise repos out of
reach — raw HTTPS URLs redirect to login before token headers apply, and
SSH-style hub URLs were unrecognized.

Resolve SSH hub sources by shallow-cloning the repo with the user's SSH
keys and reading the index from it. The in-repo index path uses the
existing //path subdir convention (consistent with `install`), defaulting
to skillshare-hub.json at the repo root. Both scp-style and ssh:// URLs
are accepted. In the web dashboard, SSH clones are restricted to saved
hubs so a request-supplied URL can't drive an arbitrary clone.

Ref #185
2026-06-02 16:29:25 +08:00
Willie 594a767734 chore: release v0.20.3 2026-06-01 16:31:13 +08:00
Willie 6c29934a4f feat: add agents path to copilot target
Copilot CLI uses the same .agent.md format Skillshare already syncs to
Claude and OpenCode, so no transformation is needed — only a missing
registry path. Add global (~/.copilot/agents) and project (.github/agents)
agent paths per GitHub's documented custom-agent locations.

Closes #184
2026-06-01 15:08:22 +08:00
Willie 85cc972f95 docs(doctor): document suggestions field; refine remediation wording
Follow-up to eb99118d (doctor overlap suggestions):

- Document the optional `suggestions` JSON field in doctor.md with an example

- Clarify shared-paths wording: the listed targets are all current collisions, not "the others"

- Print the cross-target suggestion after overlap detail lines for a more natural read order
2026-05-31 20:56:37 +08:00
Willie 1183e0a366 fix: improve codex agent extension validation 2026-05-31 13:39:41 +08:00
Letiancheng Lee ad9ffde242 fix codex agent extension validation 2026-05-31 13:07:25 +08:00
Willie def12c51ca chore: update docs 2026-05-30 19:23:12 +08:00
Willie 314e2b2df4 feat(init): switch git_root scope headlessly on an existing setup
Previously 'skillshare init --git-root <scope>' on an already-initialized
setup either errored with 'already initialized' (no --remote) or warned and
ignored the flag (with --remote), so there was no non-interactive way to
change the scope after init — only the web UI or a manual config edit.

handleExistingInit now treats 'init --git-root <scope>' (without --remote) as
a headless scope switch via switchGitRootScope: it inits a repo at the new
scope directory (reusing one already there, sharing doGitInitIfAbsent with the
fresh-init and server paths) and persists git_root. It does not relocate an
existing repo — switching scope means 'version a different directory', not
'move history'. Combined with --remote the flag still falls through to the
remote path, now pointing users at the standalone form instead of a bare
'ignored' warning.

Update the mismatch guidance to offer 'skillshare init --git-root <scope>' as
the first fix, and revise the git_root docs (configuration + init) to document
the headless switch, superseding the earlier 'must re-run init / not supported'
wording. Add TestGitRoot_SwitchScopeAfterInit.
2026-05-30 19:23:12 +08:00
Willie 9fb7b1eca4 docs(git-root): clarify how to change scope after init; fix misleading mismatch guidance
The mismatch guidance told users to re-run 'skillshare init', but init warns
and ignores --git-root once a repo already exists, so it never relocates the
repo. Reword the CLI message to state the real options: run 'git init' at the
new scope dir for a fresh history, or 'mv <old>/.git <new>/.git' to keep
history, or set git_root to match the existing repo.

Add a 'Changing the scope after init' section to the git_root config reference
and point the commit/push/pull pages at it, replacing the same misleading
're-run init' phrasing.
2026-05-30 19:23:12 +08:00
Willie 32fd08c692 feat(list): filter skills by enabled/disabled status in list TUI
Large skill lists made it hard to spot which skills are disabled via
.skillignore. Add a status filter to `skillshare list`: press `s` to
cycle the All -> Enabled -> Disabled view, shown as a `Status:` chip
beside the tab bar. The `s:enabled` / `s:disabled` filter token is also
supported for combining status with other tags (e.g. `t:tracked
s:disabled`). Toggling a skill's state while a status filter is active
re-applies the filter so it leaves the view.

Closes #172
2026-05-30 19:23:12 +08:00
Willie f59d5e905b refactor(extensions): simplify reference converters 2026-05-30 19:23:12 +08:00
Willie bb0f3c2a0b docs(extras): correct list output and document transform conflict safety
- Fix the `extras list` plain-text example to match current output: real
  header/separator, `✓` icons, no trailing "synced" word on synced rows, and
  an extension target labeled `extension: <name>`.
- Note the per-target `extension` field in `--json` output.
- Document the transform overwrite-safety contract (symlink auto-replace;
  regular file/directory skipped without --force; --force replaces a
  conflicting directory wholesale).
- Add a one-line pointer to transform extensions in the built-in skill.
2026-05-30 19:23:12 +08:00
Willie fcbfd39be2 refactor(extensions): describe and rename built-ins by output
md2codex / md2gemini named the *input* (markdown) and read poorly. Rename
the bundled extensions after what they produce: codex-agents and
gemini-commands. Turn the BuiltinExtensions catalog into structs carrying
a human-readable description so the dashboard can explain each one before
install, and propagate the new names across tests and docs.
2026-05-30 19:23:12 +08:00
Willie c0609011e4 feat(extensions): map model field and document Codex agents recipe
The md2codex reference converter now carries the agent's `model`
frontmatter into the generated TOML, matching what Codex agents expect.
Document the extras + extension recipe for converting markdown agents to
Codex TOML so the conversion works without a built-in agents target.
2026-05-30 19:23:12 +08:00
Willie 9e4563d143 chore(extensions): port reference scripts to Node.js and validate extras extension schema
Port the md2gemini and md2codex reference extensions from Python to
Node.js for broader portability (Node ships uniformly across Windows,
macOS, and Linux). Add the extension field to extraTargetConfig in the
global and project JSON schemas so editors accept it, with a schema test
guarding its presence.
2026-05-30 19:23:12 +08:00
Willie 5c3a3dff30 docs: document extras extension transforms 2026-05-30 19:23:12 +08:00
Willie 7941ef295a docs: document git_root scope and --git-root flag 2026-05-30 19:23:12 +08:00
Willie e44896b518 docs(getting-started): restructure for scenario clarity
- index: open with a Mermaid source→targets diagram and describe the
  three kinds of skills that coexist in a source repo (authored,
  vendored, tracked) so readers form a mental model before commands
- first-sync: keep the linear walkthrough as the primary path; add
  Variation sections for restoring on another machine (idempotent
  clone + tracked re-install) and headless setup (CI / devcontainer
  post-create) with the non-interactive flag table
- from-existing-skills: split into single-CLI migration, multi-CLI
  consolidation, and connect-existing-repo paths; surface a backup
  caution before collect since it mutates target directories

Trim filler prose and favor copy-pasteable commands.
2026-05-29 01:12:22 +08:00
Willie d32a15fd94 chore: release v0.19.24 2026-05-27 17:03:13 +08:00
Willie a2f958d288 feat(ui): background mode, in-place upgrade, and PWA support
Three user-visible additions to the web dashboard, plus the CLI surface
needed to drive them.

* `skillshare ui start` / `skillshare ui stop` — run the dashboard as a
  managed background process. Re-running start reuses the existing
  healthy process; stop uses the remembered host/port. Foreground
  `skillshare ui` keeps working unchanged. Process tracking lives in
  ui_process_{unix,windows,other}.go via a PID + current-state file.
* `--app` — opens the dashboard in a Chromium app-mode window (Chrome,
  Edge, Brave) on macOS, Windows, and Linux for a separate Dock/taskbar
  entry without browser chrome.
* In-place upgrade from the browser — the Update dialog and the Doctor
  page's Version card now expose an Update now button. Backed by two
  new endpoints (POST /api/upgrade, POST /api/restart in
  handler_restart_upgrade.go); the browser polls GET /api/health and
  reloads once the new server is ready. Dev builds short-circuit with
  `devMode: true` and a simulated restart so the flow can be exercised
  without rebuilding the binary.
* Progressive Web App — site.webmanifest, app icons (192/512), and a
  minimal service worker registered from main.tsx. Supporting browsers
  can install the dashboard as a standalone desktop app.
* Doctor Version card redesign — state-coloured icon (blue when an
  update is available, green when up to date), explicit
  `current → latest` delta, Update button only when there is something
  to upgrade.
* i18n — translate "DEV mode" in zh-TW / zh-CN / ko (previously left
  as raw English).

Adds CHANGELOG.md and website changelog entries for v0.19.20 and
refreshes website/docs/reference/commands/ui.md to document the new
modes, --app flag, new REST endpoints, and the in-place upgrade flow.
2026-05-24 01:21:06 +08:00
Willie 37819bf76b docs: v0.19.17 changelog + doctor path overlap section
- CHANGELOG entry covering doctor warnings, sync hint, and cline path fix
- doctor.md: new "Path Overlap" section documenting shared_target_paths
  and cross_target_discovery checks with example output and resolutions
2026-05-22 01:00:59 +08:00
Willie f01a679c56 fix(targets): revert cline paths to brand-specific dirs
Cline's official docs (docs.cline.bot/features/skills) list only
.cline/skills (project) and ~/.cline/skills (global) as supported skill
directories. The previous change to ~/.agents/skills was based on the
incorrect assumption that Cline scans the universal .agents/skills path,
which it does not.

Restore cline paths to:
  - global:  ~/.cline/skills
  - project: .cline/skills

Also remove cline from the universal-grouping sentence in the website
target reference, since cline no longer shares the .agents/skills root.

Existing users with cline enabled should manually remove stale cline
entries under ~/.agents/skills after upgrading.
2026-05-21 23:18:27 +08:00
Willie caf22760b3 docs: global config sources map (Phase 7)
- CHANGELOG.md + website changelog: Unreleased entry for v0.19.16
  covering the global `sources:` map feature plus the two behavior
  changes (extras init no longer silently backfills extras_source;
  extras source command writes to whichever field the user already
  configured).
- website/docs/understand/source-and-targets.md: add "Custom Source
  Directories" section for global mode mirroring the project-mode
  writeup, with examples, backward-compat notes, and a cross-link to
  the project-skills page.
2026-05-21 15:13:36 +08:00
Willie b1907cd611 docs: document custom project source directories
- Add 'Custom Source Directories' section to project-skills.md covering
  the sources map, common layouts, and constraints (no target alias,
  external paths skip gitignore, .skillshare/ for ops dirs, init seeds
  default paths).
- Add troubleshooting entries for the two new error classes: malformed
  project config (fail-closed) and source/target path overlap.
2026-05-20 18:39:16 +08:00
Willie 3b9cb44be6 chore: release v0.19.14 2026-05-20 14:07:51 +08:00
Willie 9307fc521c chore: release v0.19.12 2026-05-14 23:43:43 +08:00
Willie 3b2f062cf0 docs: add v0.19.11 changelog, preserve_tilde_on_save docs, fix CI test
- Add changelog entry for v0.19.11 (preserve_tilde_on_save, backups gitignore)
- Document preserve_tilde_on_save in configuration reference, cross-machine sync, FAQ
- Fix TestFoldHomePath/unrelated-abs: use /opt/unrelated/foo instead of /tmp/foo (CI sets HOME=/tmp)
- Add iFwu to README contributors
2026-05-14 13:22:23 +08:00
Willie fb821b7328 fix(project): add backups/ to .skillshare/.gitignore managed dirs
Project mode agent backup (sync --agents, backup -p) creates
.skillshare/backups/ but it was not gitignored — backup artifacts
could be accidentally committed.

Agent backup was added in 95c46ca8 (2026-04-06), after the gitignore
fix in 90c096b8 (2026-03-16) which only covered logs/ and trash/.
2026-05-13 03:49:40 +08:00
Willie 1acfd4b9fe docs: add --quiet flag to sync flags table and context_cost to JSON example
Also documents context_budget config block in configuration reference
with field types, defaults, and cross-link to sync docs.
2026-05-11 21:34:38 +08:00
Willie b1c29c5c9d docs: document context budget warnings and --quiet flag 2026-05-11 21:34:38 +08:00
Willie 084cc01792 docs: add completion command documentation (#148)
- New website/docs/reference/commands/completion.md page
- Update commands index with completion entry
- Update quick-reference with completion shortcut
- Add shell completion to README highlights
2026-05-08 16:01:16 +08:00
Willie e48a301623 feat: add azure_hosts config for Azure DevOps Server on-premises
Add azure_hosts config parameter (analogous to gitlab_hosts) that allows
users to register self-hosted Azure DevOps Server hostnames so they
receive proper URL parsing without appending .git to clone URLs.

- Add AzureHosts field to Config and ProjectConfig structs
- Add SKILLSHARE_AZURE_HOSTS env var support with merge semantics
- Generalize hostname validation into shared normalizeHostList/mergeHostsFromEnv
- Add azureOnPremPattern regex and parseAzureOnPrem for /_git/ URL routing
- Add isAzureHost for config-based host detection (no auto-detect)
- Update TrackName to handle on-prem Azure DevOps clone URLs
- Wire AzureHosts through InstallContext, ParseOptions, and Server
- Add JSON Schema, UI fieldDocs, and website documentation
- Add 19 new tests covering config, source parsing, and server

Closes #147
2026-05-05 18:33:07 +08:00
Willie 57b0649d20 feat(targets): add 8 new agent targets and update cursor project path
Add AiderDesk, CodeArts Agent (Huawei), Code Studio (Syncfusion),
Devin for Terminal (Cognition), Dexto, ForgeCode, Rovo Dev (Atlassian),
and Tabnine CLI as built-in targets (56 → 64).

Update Cursor's project-level skill path from .cursor/skills to
.agents/skills to match Cursor's official documentation, which now
lists both paths as supported with .agents/skills as the ecosystem
standard convention. Global path (~/.cursor/skills) and agents paths
are unchanged.

All paths verified against official documentation or source code.
Codemaker excluded — no official docs confirm SKILL.md support.
2026-05-05 11:55:26 +08:00
Willie 806045d392 docs(agents): expand docs + skillshare SKILL.md for agent workflows
- skills/skillshare/SKILL.md: mention agents commands/flags in description
- website: document agents source dir, agent backup/restore, ignores,
  file structure, config fields, and project-mode agent rules
2026-04-11 00:41:29 +08:00
Willie 788f9bc6e9 feat(agents): JSON output + audit gate for install/update
Extend install/update with agent-aware --json output and apply the same
audit block-threshold gate skills already use.

Install:
- install --json: imply --force; imply --all only when neither
  --skill nor --agent is set (so explicit selectors still work)
- project-mode install now routes through cmdInstallProjectParsed
  so --json suppresses UI and emits a pure-JSON payload
- agent installs propagate SourceDir so metadata lands in the
  agents root, not the install subdir
- validation error lists --agent / --kind / --branch explicitly

Update agents:
- update agents supports --force, --skip-audit, --audit-threshold
- tracked agent repos + metadata-backed single-file agents now run
  the same audit gate as skills; blocks roll back from a temp stage
- JSON output returns the final per-agent status
  (updated/skipped/failed/up_to_date/...) by merging check results
  with batch update outcomes

Audit:
- auditInstalledAgent shares one helper with auditInstalledSkill
  (scan + cleanup callbacks); single-file agent scans now use
  audit.ScanFile / ScanFileForProject instead of staging the file
  into a temp directory
- UpdateAgentFromDiscovery stages to temp, audits, then renames
  atomically (rename already overwrites on POSIX)

Refactors pulled in while reworking these paths:
- extract jsonUISuppressor helper in json_output.go and use it
  from install/update/update_agents; collapses 4 copies of the
  suppress/restore closure dance and the per-error failJSON block
- drop relPath plumbing from installAgentFromDiscoveryInternal
  now that ScanFile doesn't need a staged relative path
- list.go render functions now use theme.ANSI() so NO_COLOR is
  respected in plain-text output

Tests:
- add TestInstallAgentFromDiscovery_HighFindingBlocked (unit)
- add TestUpdate_Agents_HighFindingBlockedByThreshold (integration)
- add TestInstall_Project_JSON_Agent_PureJSON,
  TestUpdate_Agents_JSON_ReportsFinalStatus
- fix TestList_SKILLSHARE_THEME_Light / TestList_NO_COLOR to
  write a config before invoking list
- fix TestTargetList_NoTUI_FallsBackToPlainText assertion to match
  the new structured Mode: merge output
- fix TestDoctor_AllGood_PassesAll by pinning SKILLSHARE_THEME=dark
  so the no-TTY theme fallback warning doesn't fire
- add list_tui_content_test.go covering light/dark glamour base
- list detail pane now picks LightStyleConfig on light terminals

Docs:
- update install.md, update.md, understand/agents.md for the new
  flags, JSON shapes, and agents update workflow
2026-04-10 23:27:26 +08:00
Willie d4bd0a66df docs(sync,diff): fix agent sync description and add agent diff section
- Fix sync.md: 'sync' defaults to skills only, not skills+agents
- Fix --all flag description: syncs skills + agents + extras
- Add 'sync agents' to usage examples
- Add Agent Diff section to diff.md with usage examples
2026-04-09 23:56:03 +08:00
Willie 294be5f08a docs(ui): update sync page and API description for kind param
- Sync page now has scope selector (Skills / Agents / Both)
- POST /api/sync accepts kind param
2026-04-09 23:53:25 +08:00
Willie 22e7028747 docs: update target/filtering docs for agent filters and metadata.targets
- Add --agent-mode, --add-agent-include/exclude flags to target command docs
- Update filtering reference with agent filter examples and storage paths
- Prefer metadata.targets over top-level targets in all examples
- Note agent filter limitations (merge/copy only, requires agents path)
- Update skill-format docs with metadata.targets precedence note
- Update built-in skill references/targets.md with agent filter examples
2026-04-09 03:14:58 +08:00
Willie 081348d39b refactor(collect): unify skills/agents flow with collectPlan + generics
Replace duplicated runCollectSkills/runCollectAgents (~110 lines of 95%
identical code) with a single runCollectPlan function driven by a
collectPlan struct + toCollectResources[T] generic converter.

Key changes:

- Add collectPlan/collectResources types and runCollectPlan unified flow
- Add toCollectResources[T] generic to bridge typed slices into the
  shared pipeline (scan → display → dry-run → confirm → pull → render)
- Replace fragile err.Error() == "already exists in source" string
  matching with ErrAlreadyExists sentinel error + errors.Is()
- Move os.MkdirAll from per-agent PullAgent to PullAgents (call once)
- Add FindLocalAgents/PullAgent/PullAgents to match FindLocalSkills API
- Add target selection, --force/--dry-run/--json support for agent collect
- Add integration tests for agent collect (target filter, dry-run, force,
  JSON, oplog, project mode)
- Update collect.md, agents.md, ui.md docs for agent collect support
2026-04-09 00:36:39 +08:00
Willie 36ee2fe15f fix: tone down doctor target colors — only status word is colored
Split status word from detail in displayTargetStatus. Only the status
word (merged/drift/linked) gets color, detail text uses dim. Reduces
the "wall of green" effect in doctor output.
2026-04-08 22:26:18 +08:00
Willie baea54d938 docs: update status, doctor, diff docs for unified agent layout
status.md:
  - Fix synced→merged for agents, add [merge] mode prefix
  - Remove synced from status table
  - Update project mode example

doctor.md:
  - Update example outputs with sub-item format (target name header + skills/agents indented)
  - Add agents source to environment checks table
  - Update targets section description
  - Single-line extras format
  - Remove leading spaces from output examples
2026-04-08 22:25:00 +08:00