GitHub links to tree/HEAD/... when it means the default branch. Since
URL refs became clone refs, HEAD was taken as a branch name: with a
subdir the ref lookup failed, without one git clone --branch HEAD
failed. These URLs installed fine before, so keep them on the default
branch.
Refs #293
* 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>
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
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
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
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.
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.
Allow project targets to set mode individually (merge or symlink),
mirroring global behavior. Default remains merge.
- Add Mode field to ProjectTargetEntry with YAML marshal/unmarshal
- Add mode branching in project sync (reuses syncMergeMode/syncSymlinkMode)
- Support --mode flag in target info for project targets
- Mode-aware unlink in target remove
- Unify project sync UI with global sync output format
- Update docs to reflect per-target mode support
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.