* fix(project): refuse to re-init a project that lost its config.yaml
Every project-mode command auto-initializes when .skillshare/config.yaml
is missing. That is right for a repository with no project directory at
all, and for the shared skills repo produced by 'init -p --config local',
which gitignores config.yaml so each developer regenerates their own.
It was wrong for the case in between. A .skillshare/ that already held
skills or agents, whose config.yaml was simply gone, was re-initialized
into an empty config. Every configured target was dropped, the target
symlinks were left behind pointing at a project the config no longer
described, and the command exited 0. Nothing said anything had happened.
Add ensureProjectConfig, which replaces the open-coded auto-init at every
project command entry point. It initializes as before when there is no
project directory, and when config.yaml is gitignored, so both intentional
cases keep working untouched. When the directory holds skills or agents
and its config is neither present nor gitignored, it now returns an error
pointing at version control or an explicit 'skillshare init -p' instead of
writing over the project.
The gitignore check is treated as inconclusive on error, so a repository
that cannot be inspected is guarded rather than overwritten.
* feat(project): support a visible skillshare/ project directory
Project mode is identified only by .skillshare/config.yaml, and trash,
backups, logs and audit-rules.yaml anchor to that same hidden directory.
The sources option (#153) made project content relocatable, but the
marker and operational state stay hidden, so repositories that treat
skills as reviewable content still carry a hidden directory whose only
job is to hold config.yaml.
Resolve the project directory through a new leaf package that checks
.skillshare/config.yaml first and skillshare/config.yaml second, and
derive every config, state, source-default and gitignore path from the
result. The hidden name wins whenever both exist, so an existing project
never moves and no migration is needed. The package imports nothing else
internal because internal/audit cannot import internal/config without a
cycle.
Add init -p --visible to create the visible layout. Default init -p
behaviour and output are unchanged.
Two ambiguities the visible name introduces:
- The global config directory is also called skillshare
(<config-home>/skillshare), so the two places that infer scope from a
config path now exclude the global location by full path rather than
by directory name. TestLogDir_Global asserted a fixture path without
declaring a config home, which hid this; it now sets XDG_CONFIG_HOME.
- An unrelated directory named skillshare/ must not be adopted as a
partially initialized project, so the visible name is only claimed
when it carries a marker of its own: a skills/ or agents/ directory,
or a .gitignore that ignores config.yaml.
The missing-config guard added in the previous commit is generalized to
resolve through the new package, so it covers both layouts. The
gitignored-config marker matters there too. A repository shared by
'init -p --visible --config local' before any skill was committed clones
with nothing but that .gitignore, because git drops the empty skills/
and agents/ directories; recognizing it keeps the repair pointed at the
visible directory instead of writing a hidden one beside it.
Refs #256
* fix(project): reconcile visible directory support with main
Consolidate the missing-config guard and regression tests already merged in #260. Preserve both directory layouts and document and test resyncing target links after a rename. Follow-up for #258.
---------
Co-authored-by: Willie <egg358358@gmail.com>
Avoid discarding all file hashes when a directory symlink cannot be read as a file. Preserve file symlink hashing and error propagation for broken links and other hash failures.
Add regression coverage for directory symlinks, file symlinks, and broken links. Verified with make check in the devcontainer.
Refs #272
ReadMatcher splits on "\n" and parseRule/Compile only trimmed " \t", so a
.skillignore saved with CRLF line endings compiled every rule with a
trailing \r that could never equal a path segment. status still reported
the patterns as loaded, so the file silently ignored nothing. The same
trim in write.go made HasPattern miss existing entries, AddPattern
duplicate them and RemovePattern fail to find them.
The pre-Matcher ReadPatterns used TrimSpace and handled CRLF; this
regressed in 4214cb10 (v0.17.4). Trim \r alongside the existing
whitespace, matching how git reads CRLF .gitignore files.
Refs #275
The agent discovery already parsed the `targets` frontmatter list into
DiscoveredResource.Targets, but no agent sync path ever applied it, so an
agent declared for one tool was still delivered to every agent-capable
target. Agents have no shared schema across harnesses, so this gives authors
a way to keep a per-tool variant of the same agent without cross-polluting
targets. Applied in CLI sync (global and project), the dashboard sync
handler, doctor's expected count and the target summary so all views agree.
Refs #267
SourceBadge only recognised github/github-subdir metadata types, so skills
installed from Gitea, GitLab, self-hosted or SSH git sources fell through
to the Local badge. Add a Remote badge for any non-local install source,
matching the CLI list view.
Refs #270
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
Skills installed from a non-default branch record that branch in metadata,
but the grouped update path (update --all) cloned the remote default branch,
so the skills were either downgraded or reported as removed upstream and
pruned. The web UI update and check handlers had the same gap, comparing
against the remote HEAD instead of the installed branch.
Group batch updates and web UI checks by URL+branch, pass the branch through
to the clone, and resolve remote tree hashes for that branch as well.
Refs #268
The grouped update path (update --all) removed the existing skill directory
before copying the new content, and the audit-block cleanup then removed the
freshly copied content as well. A rejected update therefore deleted the
previously installed, already-audited version and left a stale metadata
entry that update --all could no longer discover.
Stage the new content in a temp directory when updating, audit it there, and
only swap it into place once the audit passes, matching the single-skill
update path.
Refs #271
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.
The star history chart in the README stopped rendering because the service that served it can no longer fetch GitHub stargazer data. Point the chart image and its wrapping link at a working mirror so the graph renders correctly again for new visitors.
CodeGraph writes a 55MB database, a pid file and sockets into .codegraph/.
Committing the tool's own self-ignoring .gitignore keeps all of it out of
git for everyone, instead of each machine rediscovering the noise.
isConfigGitignored returns (false, err) on every failure path, so the
err != nil disjunct was already implied by !gitignored. A comment states
the fail-safe intent without making readers verify the downstream
contract to be sure the guard is reached.
Also renames the guard's test file to match ensureProjectConfig.
Every project-mode command auto-initializes when .skillshare/config.yaml
is missing. That is right for a repository with no project directory at
all, and for the shared skills repo produced by 'init -p --config local',
which gitignores config.yaml so each developer regenerates their own.
It was wrong for the case in between. A .skillshare/ that already held
skills or agents, whose config.yaml was simply gone, was re-initialized
into an empty config. Every configured target was dropped, the target
symlinks were left behind pointing at a project the config no longer
described, and the command exited 0. Nothing said anything had happened.
Add ensureProjectConfig, which replaces the open-coded auto-init at every
project command entry point. It initializes as before when there is no
project directory, and when config.yaml is gitignored, so both intentional
cases keep working untouched. When the directory holds skills or agents
and its config is neither present nor gitignored, it now returns an error
pointing at version control or an explicit 'skillshare init -p' instead of
writing over the project.
The gitignore check is treated as inconclusive on error, so a repository
that cannot be inspected is guarded rather than overwritten.
Discovery skips well-known target dot-dirs (.claude, .cursor, ...) so that
target-synced copies are not mistaken for source skills. filepath.Walk visits
the walk root first, so pointing an install directly at such a directory —
`skillshare install user/repo/.claude` — matched the guard on the root itself
and returned SkipDir before scanning anything, yielding zero skills.
Exempt the walk root from the dot-dir filter in discoverSkills and
scanAgentDir: it was requested explicitly, so filtering it can only discover
nothing. .git stays unconditionally skipped, and repo-root walks are
unchanged, preserving the original guard.
Batch update looks up each skill's subdir in the discovery map, but
discovery deliberately skips target dot-dirs (.claude, .codex, ...) to
avoid counting target-synced copies as source skills. A skill installed
from such a subdir therefore never appears in the map and is falsely
reported as stale (deleted upstream), steering users toward --prune on a
healthy skill. Fall back to a direct SKILL.md stat in the cloned repo --
mirroring the single-skill update path -- before declaring the path
missing.
Fixes#261
The v0.20.24 entry described the second workaround as symlinking the
whole skills directory, which is not what the troubleshooting docs
recommend. Point at Antigravity's Skill Custom Paths setting instead,
so the changelog matches common-errors.md.
Every pattern ended in "skills", which the preceding base-name check
already matched, so the loop could never run. One entry also referenced
a path no target has used since the antigravity restructure.
The hint picked its example target by ranging a map, so the same config
produced a different suggestion on each run, and it could name a target
whose runtime handles symlinks fine — telling users to change something
that was not broken. Restrict the choice to the targets known to skip
symlinked skill directories, in the documented priority order.
Also correct the sync docs: the hint is printed by doctor, not sync.
Antigravity and Gemini CLI read different global skill directories, so
folding gemini into antigravity as an alias made one of them wrong for
every user. Antigravity loads ~/.gemini/config/skills; Gemini CLI loads
~/.gemini/skills. Restore gemini as its own target so both resolve
correctly.
Also document that Antigravity's skill scanner skips symlinks entirely
(surfacing as "Incorrect function" on Windows, silent absence elsewhere)
along with the two available workarounds.
Closes#255
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.