Previewing a hub from the builder landed on an empty "pick a hub" state:
the builder and the browser kept separate copies of the drafts and the
browser's copy went stale. Merging both into one page removes the split,
so your own hub is shown exactly as others will see it and edited in place.
Hub entries can now be added from any repository URL, not only from
installed skills, with a branch or tag picked from the remote. The version
is written into the source URL, the only place the hub format keeps it,
and a new /api/hub/refs endpoint lists refs and rewrites sources so the UI
never builds tree/<ref> URLs itself. Skills added from installed ones keep
the version they were installed from.
Draft reads and saves read refs from the URLs only, so opening a hub never
waits on a remote. Added hubs get unique labels, since the default hub is
stored by label.
* feat(install): pin GitHub tree/blob URLs to their ref
Hub entries only carry a source URL, so a team hub had no way to pin a
third-party skill to a reviewed tag or commit. The parser already read
tree/<ref>/ and blob/<ref>/ URLs but discarded the ref, installing from
the default branch instead of the version the URL names.
Keep that ref as Source.Branch. An explicit --branch (CLI) or branch
(API body) still overrides it; the server handlers now only override
when a branch is given. Batch installs group by repo and ref so two
pinned versions of one repo get separate clones.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs(install): describe pinning hub sources to a tag or commit
Explain that a GitHub tree/<ref>/ source URL pins the install, in both
the hub index guide and the install reference.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(install): pin GitLab/Bitbucket URLs and resolve refs containing "/"
Pinning should not depend on the host, so GitLab (-/tree/<ref>/) and
Bitbucket (src/<ref>/) web URLs now keep their ref too.
Taking the first path segment as the ref broke branch names containing
"/": tree/feature/x/skills/foo cloned branch "feature" and failed. When
the first segment is not a branch or tag on the remote, the longest
matching one is used instead. A ref the remote does not have fails
with a hint to use --branch, rather than silently installing the
default branch. A saved branch that covers more of the path (from
--branch or config) moves the subdir without asking the remote.
The grouped-install round-trip test pinned -/tree/main/ against a repo
on master; the ref used to be ignored, so its branch is now renamed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* docs(install): cover GitLab, Bitbucket and "/" branches in URL pinning
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(install): keep web URL refs correct on reinstall, --branch and grouping
Review of the slash-branch resolution found four gaps:
- A saved branch equal to the whole URL tail (tree/feature/x) did not
move the subdir back, so every reinstall or update looked for "x".
- An unrelated --branch with a slash-branch URL kept the parse-time
subdir (x/skills/foo) instead of the URL's real one.
- Grouped installs copy the source to a repo root; resolution then put
the subdir back and discovery looked under a doubled path. Grouping
also keyed on the unresolved first segment, so tree/feature/x and
tree/feature/y could share one clone. Web URLs with a ref now install
on their own, and resolution leaves a repo-root copy at its root.
- A skill named after the parse-time subdir kept that name once the
path turned out to be all ref (tree/feature/x named the skill "x").
The unknown-ref error now reads as a missing ref first, since a stale
ref (tree/master after a rename) is more common than a slash branch.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix(update): keep legacy installs on the default branch
Skills installed before URL refs were honoured got the default branch
and recorded no branch. Single-skill update re-parses the recorded
source, so it moved them to the URL's ref (or failed on a stale one,
with a hint to pass --branch, which update does not accept), while
update --all rebuilds from RepoURL and kept the default branch.
ApplyRecordedBranch treats an empty recorded branch as the remote
default and drops the URL's ref. It replaces the branch handling at
every site that reinstalls from recorded metadata: CLI and server
update for skills and agents, and tracked-repo rehydration.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* perf(search): share one clone across pinned hub skills from a repo
Any web URL with a path after its ref installed on its own, so a hub
listing many tree/<tag>/ skills from one repo cloned it once per skill.
groupByRepo now resolves each URL's ref before grouping, with a
RemoteRefs cache that lists each remote's refs once, and groups by
repo and resolved ref. Only refs containing "/" (whose subdir the
discovery match cannot re-derive) and refs that fail to resolve still
install alone. A resolved source is marked settled so the grouped
clone does not resolve it again, and ApplyRecordedBranch settles the
subdir from a recorded branch without asking the remote.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Willie <egg358358@gmail.com>
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.
Source parsing only treated inputs starting with /, ~, ./ or ../ as local
paths, so Windows paths such as D:\folder fell through to git URL parsing
and failed with "unrecognized source format" (or were expanded into a
bogus GitHub shorthand when written with forward slashes).
Refs #269
Trim SKILL.md suffixes without filepath.Dir so traversal segments remain visible to SEC003 subdir validation. Add regression coverage for GitHub, GitLab, and Bitbucket blob-style skill URLs.
Reject unsafe subdirs that contain path traversal (..), NUL bytes,
control characters, backslashes, absolute paths, and URL-encoded
traversal (single, double, or overly deep encoding). Validate derived
source names and CloneURLs for NUL and control characters.
SEC003: github.com/owner/repo/../../etc/passwd previously produced a
Source with Subdir containing traversal segments. Now rejected.
The web UI skill preview always fetched SKILL.md via api.github.com, so skills from GHE or other non-github.com hubs showed only index metadata (name, description, tags) instead of the full rendered content.
FetchPreview now resolves the source platform: github.com and GHE use the host's REST Contents API, while other platforms (GitLab, Bitbucket, Azure, SSH) fall back to a shallow clone. Sources whose content can't be retrieved degrade gracefully with a clear notice in the modal.
Fixes#193
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
- fix(gitea): use shortHash instead of undefined shortCommitHash
- fix(gitea): use strings.LastIndex for robust SSH URL parsing
- fix(discovery): preserve warnings in Gitea API discovery fast path
- feat(auth): add detectPlatformFromHost with configured host support
Support Gitea (gitea.com and self-hosted instances) as a git hosting
platform for installing skills. Includes both core platform integration
and a Gitea Contents API fast path for direct file downloads without
full git clone.
Platform support (P0):
- auth.go: add PlatformGitea, detect gitea hosts, resolve GITEA_TOKEN
- config.go / project.go: add gitea_hosts config field with normalization,
env var merge (SKILLSHARE_GITEA_HOSTS), and EffectiveGiteaHosts()
- source.go: add isGiteaHost() and GiteaHosts to ParseOptions
- install.go: pass GiteaHosts from config to source parsing
- install_git.go: include GITEA_TOKEN in auth error hints
API fast path (P1):
- gitea_download.go: Gitea Contents API recursive directory download
(GET /api/v1/repos/{owner}/{repo}/contents/{path}), matching the
GitHub Contents API pattern
- install_apply.go / install_discovery.go: hook Gitea API fallback
after sparse checkout, before full clone
Support CNB (Cloud Native Base, cnb.cool) as a git hosting platform for
installing skills. This adds platform detection, token authentication
via CNB_TOKEN, host configuration (cnb_hosts / SKILLSHARE_CNB_HOSTS),
and URL parsing for both direct and web URLs (including /-/tree paths).
Changes:
- auth.go: add PlatformCNB, detect cnb.cool hosts, resolve CNB_TOKEN
- config.go / project.go: add cnb_hosts config field with normalization
and env var merge, plus EffectiveCNBHosts() accessor
- source.go: add isCNBHost() and CNBHosts to ParseOptions
- install.go: pass CNBHosts from config to source parsing
- install_git.go: include CNB_TOKEN in auth error hints
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
Two related improvements for issue #124:
1. Source parsing now tracks ExplicitSkill when a blob URL points
directly at a SKILL.md file. Discovery constrains results to
the root skill only, skipping the orchestrator pack/selection
prompt entirely — the user clearly wants that one skill.
2. Single-select (radio) checklist TUI reworked: selection follows
the cursor automatically, space keeps exactly one item active,
enter confirms the focused item. Pre-selected items set the
initial cursor position. This gives immediate visual feedback
and eliminates the confusing empty-selection edge case.
Refs: #124
URLs like https://github.com/owner/repo/blob/main/SKILL.md previously
became subdir="SKILL.md" and created an install folder literally named
"SKILL.md". Treat a trailing SKILL.md segment on blob URLs as a pointer
to its containing skill directory:
blob/main/SKILL.md → subdir "", name = repo
blob/main/skills/foo/SKILL.md → subdir "skills/foo", name = foo
Also apply the same rule to GitLab (-/blob/...) and Bitbucket (src/...)
web URLs for consistency.
Refs: #124
Source.Branch threads the branch parameter through discovery.
cloneRepo() passes --branch to git clone when set.
source.Branch is set from parsed.opts.Branch in cmdInstall.
Ref: #90
JihuLab (jihulab.com) is a GitLab distribution that supports nested
subgroups but its hostname doesn't contain "gitlab". Add "jihulab" to
the built-in host detection so URLs like jihulab.com/group/sub/project
are parsed as full-path repos without requiring gitlab_hosts config.
Support CI/CD pipelines that need gitlab_hosts without a config file.
The env var is comma-separated and merged (deduplicated) with config
file values in both global and project modes.
Also cleans up from review:
- Extract isValidGitLabHostname to share validation logic
- Remove redundant ToLower before EqualFold in isGitLabHost
- Revert 3 no-opts call sites back to ParseSource()
- Add parseOptsFromProjectConfig helper to reduce inline duplication
- Fix project mode LoadProject missing env var merge
- Add install.md tip about custom GitLab domains
Self-managed GitLab instances on custom domains (e.g., git.company.com)
without "gitlab" in the hostname were parsed with 2-segment owner/repo
split instead of full-path repo. Users can now declare extra GitLab
hostnames in config so the parser treats them like gitlab.com (nested
subgroup support).
- Add `gitlab_hosts` field to both global and project Config structs
- Validate entries at load time (reject scheme, path, port, empty)
- Add `ParseOptions` / `ParseSourceWithOptions` to thread hosts into parser
- Add `isGitLabHost()` helper combining built-in + custom host detection
- Extend `InstallContext` interface with `GitLabHosts()` method
- Update all ParseSource call sites (install, search, update, server)
- Add JSON schemas for both config files
- Add unit tests for config validation and source parsing
- Add E2E runbook for devcontainer verification
- Document in configuration reference and URL formats appendix
The initial GitLab subgroup fix treated all multi-segment HTTPS paths as
full repo paths, regressing GHE and generic host subdir installs like
github.mycompany.com/org/repo/path/to/skill.
Add host-based heuristic: hosts containing "gitlab" use full-path-as-repo
behavior; all other hosts retain the original 2-segment owner/repo split
with remainder as subdir. This preserves backward compatibility for GHE,
Gitea, Gogs, and other non-GitLab platforms while correctly handling
GitLab nested subgroups.
Replace rigid 2-segment HTTPS regex with flexible path parsing that
treats the entire URL path as a repo when no explicit boundary exists.
Use .git suffix as the canonical repo/subdir delimiter, preserving
/-/ (GitLab) and /src/ (Bitbucket) web URL markers.
This fixes install failures for URLs like
onprem.gitlab.internal/org-group/sub1/sub2/project which previously
misinterpreted extra path segments as monorepo subdirectories.
Azure DevOps uses 4-segment paths (org/project/_git/repo) which the
existing 3-segment gitHTTPSPattern misparses. Add dedicated patterns
for modern HTTPS (dev.azure.com), legacy HTTPS (visualstudio.com),
and SSH v3 (ssh.dev.azure.com) formats. Also add ado: shorthand
(e.g. ado:org/project/repo) for quick installs.
Includes TrackName support (org-proj-repo format), 16 new test cases,
and url-formats.md documentation with platform support table update.
file:// URLs with subdirectory paths (e.g., file:///repo/skills/alpha)
were passed whole to git clone, which fails because the full path isn't
a git repo. Add // separator support matching the existing SSH convention:
file:///path/to/repo//skills/alpha → CloneURL=file:///path/to/repo, Subdir=skills/alpha
Also updates E2E runbook Steps 10-11 to use the // syntax and improves
cli-e2e-test skill with cleanup prompt, cd /workspace note, and Go test template.
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
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.
Corporate environments using SSH-only Git access couldn't specify a
skill within a monorepo. Extend gitSSHPattern regex and parseGitSSH()
to capture an optional //subdir suffix, matching the convention used
by Terraform and Go modules.
Example: git@host:owner/repo.git//path/to/skill
- 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
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.
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.