The backup docs claimed per-skill symlinks were "resolved and followed" and
their real content backed up, which is now the opposite of what happens.
Adds a Backups & Disk Space section contrasting the three mechanisms that are
easy to conflate — .gitignore (git only), ignore: (sync), and backup (local
target content) — plus an ENOSPC troubleshooting entry, since disk space had
no coverage anywhere in troubleshooting despite being how this surfaced.
Also corrects two long-standing errors: the backup location was documented
under ~/.config in the built-in skill reference and in a `backup --list`
example, but backups live in the XDG data dir (config.DataDir()); and the
built-in skill claimed backup was global-mode only, when project mode does
support agent backups.
Refs #252
Pre-sync backups followed merge-mode skill symlinks and copied the resolved
content, so every snapshot duplicated the source — including gitignored
artifacts still sitting on disk (model weights, .venv, browser profiles).
Combined with retention that only ever ran on demand, backup directories grew
without bound; one user reported 500 GB and sync failing with ENOSPC.
A backup only needs to protect what sync can destroy: local content that
exists in the target but not in the source. Symlinks point into the source,
which is the single source of truth and already safe, and sync recreates them.
copyDir already skips symlinks, so copyDirFollowTopSymlinks is deleted.
Retention now runs after every automatic backup using the existing default
policy — in global sync and in both agent sync paths, since project agent
backups had the same unbounded growth.
Two related defects surfaced while wiring this up:
- Cleanup's size check could remove the newest snapshot, leaving no restore
point at all when a single snapshot exceeded the cap. It now always keeps
the newest.
- A target holding nothing but symlinks produced an empty snapshot that
consumed a retention slot and evicted snapshots that had content. Empty
snapshots are now discarded.
Behaviour change: restoring a merge-mode target recovers local content only;
run `skillshare sync` afterwards to recreate symlinks. Copy mode is unaffected
because those targets hold real files.
Refs #252
The enabled/disabled filter existed only inside the list TUI (`s` key,
`status:` search tag), so scripts had no way to ask for one status. They
had to know that `disabled` is omitted for enabled entries and filter the
JSON themselves; plain-text callers had to parse the `[disabled]` label.
`--status all|enabled|disabled` exposes the same concept outside the TUI.
`all` is normalized to an empty filter at parse time, which keeps the
default output, the JSON array shape, and the tracked-repositories summary
byte-identical to omitting the flag. Status combines with the pattern and
--type using AND semantics, and works in project mode and for agents.
The TUI still loads both enabled and disabled entries; --status only seeds
the initial `Status:` chip, so `s` can cycle back to All.
Implements proposals/244-list-status-filter.md.
Closes#244
air v1.67.3 raised its go directive to 1.26.0, which the sandbox image
cannot satisfy: it runs golang:1.25.5 with GOTOOLCHAIN=local, so the
toolchain is never auto-upgraded and `go install air@latest` fails the
docker-sandbox CI jobs. v1.67.0 is the last release on go 1.25.
checkTargetIssues resolved os.Readlink output with filepath.Abs, which
anchors relative links to the current working directory. In project
symlink mode the valid link ../.skillshare/skills was reported as
pointing to the wrong location. Use utils.ResolveLinkTarget, the same
helper the sync engine already relies on.
checkDuplicateSkills read the target directory through that symlink, so
every source skill also showed up as a target-local copy. Skip targets
whose skills directory is itself a link.
Closes#251
install.Install persists metadata through its own store instance, leaving
the server's cached skillsStore stale. Freshly installed skills resolved
to a nil metadata entry and rendered with an empty source/type (shown as
"Local" in the UI) until restart. The agent path already reloaded
agentsStore; mirror it for skills across all three install completion
points (batch, tracked repo, single install).
findRepoRoot walked up to and including the skills source root when
resolving a skill's tracked repo. When the source root is itself a git
repo (e.g. GitSync-backed), editing any nested skill's source rewrote
that repo's origin URL via SetRemoteURL. Bound the search strictly below
the source root — a tracked skill's .git always lives in a subdirectory —
and match the root prefix with a trailing separator to avoid sibling-dir
false positives.
--json implied --force, silently overwriting existing skills/agents
in source when collecting. Decouple confirmation-skip from the
overwrite guard, same fix as PR #243 for uninstall.
Validate global configs against the effective skills source so sync --global honors the default source when source and sources.skills are omitted.
Add unit and integration coverage for issue #238.
Apply config ignore patterns to copy-mode file traversal, checksum, mtime, CLI diff, and server sync/diff paths.
Add default ignores for .DS_Store, .git, and __pycache__ in global and project init configs.
Tests: go test ./... -count=1
Retry generic HTTPS clone failures by progressively treating additional path segments as part of a nested GitLab repository. Limit retry to repo-boundary errors and preserve the final fallback error for debugging.
Avoid presenting targets that share ~/.agents/skills as individually detected CLIs during init discovery. Show the universal shared-directory guidance instead and cover the re-init regression.
- List() now uses trashLogicalName() to produce slash-separated logical
names, preventing Windows backslash paths that validateTrashName rejects.
- ensureUnderBase/ensureStrictlyUnderBase now use filepath.Abs+filepath.Rel
instead of string prefix, fixing false escapes when base is '.'.
- Add regression tests for Restore(entry, '.'), nested List->Restore roundtrip,
sibling prefix rejection, and validateTrashName backslash enforcement.
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.
Reject project-mode installs that target the current project root and add a copy-layer guard that skips destination subtrees during recursive copies. This prevents install ./ -p from recursively copying .skillshare/skills into itself on Windows.
A corrupt or unreadable .metadata.json caused LoadMetadataWithMigration
to return a nil store whose error was discarded, so update --all
dereferenced a nil MetadataStore in GetByPath and crashed with a raw
stack trace. Guard GetByPath against a nil receiver and surface the
load failure as a resolve warning instead.
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.
TestBackup_AfterSync_ResolvesSymlinks failed ~7-10% of runs. The cause
is in the test, not production: `sync` takes a pre-sync backup of the
target before creating the agent-browser symlink, and the explicit
`backup` takes a second one. When the two land in different clock-seconds
there are two timestamp dirs, and `entries[0]` (lexicographically oldest)
points at the pre-sync backup that predates the symlink, so the
symlinked-skill assertion fails.
Select the newest backup dir (last entry, ascending sort) so the
assertion targets the post-sync backup that actually contains the
resolved symlink. Verified 0/80 failures under -race.
ref #226
Accept leading v prefixes during version checks, keep local metadata builds in dev mode unless they are clean exact release tags, and prevent cleanup warnings from leaking into JSON-mode stderr.
Return errors from branch refresh and checkout when git fetch fails instead of serving stale refs or proceeding with checkout.
Cover branch-list and checkout fetch failures with server regression tests.
Update tracked repo remotes before persisting source metadata so the API cannot report success while the on-disk git remote remains unchanged.
Cover both remote update failure and successful remote plus metadata updates.
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.
Return explicit comparison errors for non-numeric version segments instead of treating them as zero.
Fail closed in update checks when current or cached latest versions are malformed, and cover numeric, malformed, and cache-preserving cases.