Installing a specific skill from a mixed repo dragged in every agent.
The -a/--agent handler implicitly set Kind=agent, but -s/--skill never
set Kind=skill, so installDiscoveredAgents could not tell that the user
had narrowed the install — and it looped over every discovered agent
without applying the -a name filter.
Fix the install path so agents track the user's intent:
- -s/--skill (without -a) installs only the named skills, no agents.
- -s/--skill with -a installs only the named agents, via selectAgents,
matching the pure-agent path.
- --all/--yes still installs everything.
- An unknown -a name fails the whole command before any skill is
installed (validated up front against the discovered agents, including
repos with no agents at all), so automation never sees a half-success.
Add integration tests covering each case.
Fixes#183
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
- handler_git: dashboard Pull auto-sync now uses EffectiveSkillsSource()
instead of the git_root scope dir, so it no longer mangles skill rel
paths (skills/foo -> skills__foo) when git_root is root/agents/extras
- extension: run the transform subprocess via CommandContext with a 30s
timeout so a hung extension can't block sync indefinitely
- md-toml.js (codex-agents, gemini-commands): escape values via
JSON.stringify so control characters produce valid TOML basic strings
- gitroot: quote paths in the commit/push mv guidance so paths with spaces
can be pasted safely
- extras list + extras server handlers: warn when an extension fails to
resolve instead of silently falling back and reporting false drift
Lock-contention suggestions on handleSetGitRoot/handleAbsorbNested are not
applied: this is a single-user localhost dashboard, and dropping the write
lock around .git-mutating operations trades safety for negligible throughput.
Root-scope git operations detected hazards but proceeded anyway, letting
preventable mistakes reach the remote:
- Nested git repos were only warned about, then committed/pushed as empty
submodules (silent data loss). Now commit/push abort (CLI non-zero exit,
server 400) until the nested repos are disabled, and the web UI disables
the commit/push buttons while any are present.
- The pre-stage safety sweep ran before the dry-run check, so `--dry-run`
wrote .gitignore and ran `git rm --cached config.yaml`. The sweep/guard is
now strictly read-only on dry-run and only reports what would change.
- Server git endpoints used EffectiveGitRoot() without validating git_root,
so a hand-edited invalid scope silently fell back to skills. They now share
a gitSource() guard that rejects invalid scopes with 400, mirroring the
CLI's resolveGitRoot.
The dashboard computed extension target status with EffectiveMode, which defaults an empty mode to merge, so a valid transform extension target (extension set, no explicit mode) was always reported as drift. Introduce sync.ResolveExtensionMode as the single source of truth (empty/copy resolve to copy, anything else errors) and use it across the CLI, sync, status, and diff paths.
An unknown git_root value silently fell back to the skills scope via ScopeDir's default case, so a typo like "agnets" made commit/push/pull operate on the wrong repository without any warning. Validate the scope at the commit/push/pull entry point (resolveGitRoot) and in ValidateConfig, reusing the existing ValidGitRoot check backed by a new ValidGitRoots list.
At the root git_root scope, `git add -A` over the config base directory
records any subdirectory that has its own .git (e.g. the skills source) as
an empty submodule, and can commit the machine-specific config.yaml.
- Detect nested repos and warn before commit/push (CLI) or surface them on
the Git Sync page with a one-click "Disable nested .git" action (UI),
which renames .git to .git.disabled (reversible) and drops any stale
gitlink from the index so the directory's files track as normal blobs.
- Keep config.yaml out of a root-scope repo automatically: ensure it is
ignored and untrack it (git rm --cached) before staging, on both the CLI
and the web UI commit/push paths.
- Expose nestedRepos/configTracked in GET /api/git/status and add
POST /api/git/absorb-nested (validated against detected nested repos).
The CLI addRemote ran a raw "git remote add origin <url>" with the
user-supplied URL, sharing the argv flag-smuggling risk just fixed in the
git package. Delegate to git.SetOrAddRemote so the --remote flag goes
through the same leading-dash rejection and "--" terminator, removing the
duplicated exec path.
Combining --git-root <scope> with --remote <url> on an already-initialized
setup now switches the scope and wires the remote onto the new scope's repo
in one command, instead of warning and ignoring --git-root. Reuses the
existing scope-switch and remote-configuration paths back to back.
Project init rejected --git-root (and other git flags) with a bare 'unknown
option', which is confusing when the user just forgot that git integration is
global-only — easy to hit when the current directory has a .skillshare/ and
init auto-detects project mode. Match git-related flags (--git-root, --git,
--no-git, --remote) explicitly and explain they are global-only, pointing at
'skillshare init -g <flag>'. Add TestInitProject_GitRootFlag_RejectedAsGlobalOnly.
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.
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.
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
Transform-extension sync previously wrote each generated file via
runExtensionFile unconditionally, so a regular local target file (e.g. a
hand-edited hello.toml) could be overwritten from hello.md without --force,
violating the same conflict contract that copy/merge modes honor.
- Split runExtension (subprocess → bytes) from runExtensionFile (writes),
and have syncExtraTransform apply the conflict/force rules: idempotent
when identical, skipped on conflict without --force, overwrite with
--force, and auto-replace leftover symlinks.
- Centralize the copy-only mode rule in SyncExtra so the API and CLI reject
extension+merge/symlink identically; align the server sync handler's mode
normalization (EffectiveMode's "merge" default no longer leaks through).
- CLI `extras list` no longer short-circuits to an "extension" status before
existence/drift checks. Status is now computed via output_ext-aware
CheckSyncStatus; a new Extension field carries the display label, decoupled
from sync status (plain-text + TUI rendering updated).
- Roll back the optimistic cache update in the UI mode-change handler on
failure (fixes the unused-var build break).
Adds regression tests covering conflict skip/force/idempotent/symlink-replace
and non-copy mode rejection.
CheckSyncStatus compared each source file against targetDir/<source-name>,
but a transform extension renames output (foo.md -> foo.toml), so the
.toml file was never found and the target was always reported as drift —
even right after a successful sync. Thread the extension's output_ext
through CheckSyncStatus so the expected target filename matches the
transformed output. The web list now resolves the spec to pass it.
The web UI sync handler, sync --all --json, and the extras TUI sync all
passed a nil ExtensionSpec to SyncExtra, so a target's configured
extension was silently ignored — files were copied verbatim (e.g. .md
stayed .md instead of being transformed to .toml). Resolve the per-target
extension on each path, mirroring the regular CLI sync. Add a server
regression test asserting the transform runs (output renamed to .toml).
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.
Add Config.GitRootMismatch() as the single source of truth for detecting
when the git repo lives at a different scope than git_root configures, and
reuse it across the CLI guidance, the server status response (scopeMismatch
/mismatchScope/mismatchDir), and a new warning banner on the Git Sync page.
Document git_root in the config structure-view field docs (fieldDocs) and the
GitStatus client type, and add the gitSync.scope.* / gitSync.mismatch.* i18n
keys across all locales to keep dictionary parity.
Cover the behavior with config, server handler, and CLI integration tests:
push/pull honor the root scope (agents files reach the remote, config.yaml
stays untracked), POST /git/root inits+persists the scope and rejects invalid
scopes and project mode, and git status reports scope mismatches.
- extract shared git.InitScopeRepo/WriteScopeGitignore/EnsureLocalIdentity (UI-free)
- cmd init delegates to the shared helpers (no logic duplication)
- handler_git operations use EffectiveGitRoot; status exposes the scope
- new POST /api/git/root inits a repo at the target scope dir + persists git_root
- writeInitGitignore now appends config.yaml to a pre-existing root .gitignore
if missing (enforces the safety guarantee instead of best-effort)
- single source of truth config.ScopeDir; EffectiveGitRoot/scopeDir/gitRootScopes delegate
- warn when --git-root is passed with --remote on an already-initialized repo
- use 0o644 and check WriteFile errors; add tests for the append + agents scope
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.
After Phase A (210605ea) fixed metadata + status display for tracked
repos with a root-level SKILL.md, three output gaps remained:
- 'Found 0 skill(s)' on install (should be 1 — root SKILL.md counts)
- 'tracked_repos[].skill_count' was 0 (same root-case)
- 'Run sync' suggestion appeared even when no skill was discovered
Root cause: install/update used discoverSkills(destPath, false) which
walks the tracked repo's own root, treating the root SKILL.md at
relPath='.' as ignored. But 'skillshare sync' walks the source
directory; the same SKILL.md inside _<name>/ has relPath='_<name>'
(not '.') and is discovered as a normal skill. The two walkers used
the same helper with different includeRoot settings and produced
inconsistent counts.
Changes:
- installTrackedRepoImpl and updateTrackedRepo: switch to
discoverSkills(repoPath, true) so SkillCount matches sync's view.
- buildTrackedRepoJSON: when counting skills per repo, accept both
RelPath='<repo>/...' (nested) and RelPath='<repo>' (root-only).
- handleTrackedRepoInstall: suppress the 'Run sync' next-step when
the repo had no skills/agents discovered.
Closes#163
Co-authored-by: Claude <noreply@anthropic.com>
When --track installed a repo whose SKILL.md sits at the repository root
(non-spec layout), the install reported success but:
- .metadata.json gained no entry (cross-machine recovery via metadata broken)
- status --json tracked_repos did not list the repo
Two coupled bugs caused this:
1. cmdInstall gated ReconcileGlobalSkills on len(InstalledSkills) > 0.
Tracked repos with no discoverable nested skills produced an empty
InstalledSkills slice, so reconcile never ran and never detected the
_<name>/.git directory to write a tracked entry.
2. extractTrackedRepos derived repo names from discovered skills, so
repos with zero discoverable skills were silently dropped from status
and list output.
Fix both by:
- Making the post-install reconcile unconditional on success. Reconcile is
idempotent and cheap; gating it on InstalledSkills > 0 created a path
where successful installs left metadata stale.
- Switching extractTrackedRepos to install.GetTrackedRepos (a directory
walk for _-prefixed git repos), the same source-of-truth used by check
and update. Shared across status, status_project, list, and list_project.
Closes#163
Co-authored-by: Claude <noreply@anthropic.com>
Detect overlapping target paths during sync — either two targets
sharing the same primary path, or cross-runtime discovery via the
also_scans table — and surface a brief one-liner pointing users at
`skillshare doctor` for the full breakdown.
Triggers in both CLI (sync.go, sync_project.go) and Web UI (sync API
warnings array, rendered by existing SyncPage warnings card). Detection
logic lives in internal/config/path_overlap.go and is shared between
both paths.
Quiet by design: no output when no overlap exists. JSON output mode
remains untouched.
Add two new doctor checks to detect duplicate-skill problems
surfaced in issue #135:
Layer 1 — checkSharedTargetPaths:
Warns when two or more enabled targets resolve to the same
filesystem path after tilde expansion. Pure metadata check; no
runtime probing. Catches universal/warp/witsy all sharing
~/.agents/skills.
Layer A — checkCrossTargetDiscovery:
Driven by a new also_scans field in targets.yaml that documents
paths a target's runtime reads beyond its primary skills
directory. Sourced from each tool's official docs. Populated
for amp, antigravity, codex, cursor, firebender, kimi, roo.
Warns when an enabled target's also_scans path is the primary
path of another enabled target. Example: enabling codex +
universal warns that Codex's runtime will see ~/.agents/skills
content.
Overlaps are grouped per scanner so a multi-overlap target
(e.g. firebender reading 5 brand dirs for cross-compat) emits
a single warning with indented detail lines.
config:
- New targetAlsoScans struct + AlsoScansGlobal / AlsoScansProject
accessors.
- targets.yaml schema is backward-compatible (optional field).
Layer B (sync engine routing) and Layer C (user-declared
authoritative roots) are intentionally deferred — diagnosis comes
first, behaviour changes only if users actually ask.
Fresh `skillshare init` (global) now writes the v0.19.16 `sources:` map
instead of the legacy top-level fields:
sources:
skills: ~/.config/skillshare/skills
agents: ~/.config/skillshare/agents
What changed:
- cmd/skillshare/init.go: construct Config with Sources{Skills, Agents}
rather than Source/ExtrasSource. The --subdir update path writes to
cfg.Sources.Skills accordingly. The --remote re-init path uses
cfg.EffectiveSkillsSource() for git operations so it works whichever
shape the existing config uses.
- internal/config/config.go: add `,omitempty` to Source field so configs
that only set sources.skills don't get a noisy `source: ""` line.
- tests/integration/extras_test.go: rename TestInit_SetsExtrasSource to
TestInit_WritesSourcesMap and assert the new shape (sources map
present, legacy source/extras_source/agents_source absent).
Existing configs are untouched — legacy fields keep working through
Config.Effective*Source helpers. No auto-migration on Save.
Make the v0.19.16 sources map actually do something: route all path
reads through Config.EffectiveSkillsSource() / EffectiveAgentsSource() /
EffectiveExtrasSource() so users who set sources.skills / sources.agents /
sources.extras get the configured paths everywhere.
Mechanical changes (~50 files):
- cmd/skillshare/**: replace cfg.Source / cfg.ExtrasSource reads with
cfg.EffectiveSkillsSource() / cfg.EffectiveExtrasSource()
- internal/server/**: replace s.cfg.Source / s.cfg.ExtrasSource reads
with the same helpers; server.skillsSource() / gitignoreDir() use the
global-mode helper
- internal/config/config_validate.go: validate using EffectiveSkillsSource
while still rejecting configs that set neither field explicitly
- internal/config/reconcile.go, registry.go: read via helpers
Behavioral fixes (paired with the migration):
- extras init / extras source / POST /api/extras no longer silently
backfill the legacy extras_source field — the runtime fallback inside
EffectiveExtrasSource() handles it. This stops surprise diffs in users'
config.yaml after running extras commands.
- extras source command writes back to whichever field the user already
configured (sources.extras if set, otherwise legacy extras_source) so
the update is not shadowed.
- source_type in /api/extras and extras list correctly reports "default"
vs "extras_source" by inspecting the raw (unresolved) configured value;
sources.extras counts as configured for this purpose.
UI:
- ui/src/lib/fieldDocs.ts: neutralize sources / sources.* descriptions
so they describe both project and global modes (Phase 5).
Preserved (intentional):
- Direct writes to cfg.Source / cfg.AgentsSource / cfg.ExtrasSource in
init, migrate.go, cloneForSave, and server.reloadConfig — these are
raw-field writes, not path reads.
- Updated test expectations for the removed backfills.
Project-mode 'check agents' previously fell back to .skillshare/agents
when LoadProject failed. With custom sources.agents this could scan
the wrong directory and report green while the configured source is
unchecked. Now returns the load error instead.
ValidateProjectConfig now resolves each target's skills/agents path
and rejects configs where a source aliases or nests with any target
path. Without this guard, sources.skills: .claude/skills with a
claude target makes sync --force delete the source.
check -p now returns an error on LoadProject failure instead of
falling back to .skillshare/skills.
Project-mode disable/enable and new previously fell back to default
.skillshare/{skills,agents} when LoadProject failed. With custom
sources this could write .skillignore/.agentignore or create new
skills in the wrong directory. Now both paths return an error
instead of silently using the default path.
Project uninstall previously fell back to default .skillshare/skills
when config was malformed. With custom sources this could trash skills
from the wrong directory. Now both skill and agent uninstall paths
return an error instead of silently using the default path.
Reorder handleUninstallRepo to move repo to trash before removing the
.gitignore entry, preventing accidental exposure of tracked content
when trashing fails.
ProjectGitignoreTarget now returns empty strings for source paths
outside projectRoot, since parent-relative patterns (../) are invalid
in .gitignore. All six callers guard on empty gitignoreDir and skip
gitignore management for external sources.
reloadConfig now updates s.cfg.Source and s.cfg.AgentsSource from the
refreshed ProjectConfig so project UI handlers see the latest source
directories after a config edit.
Add ProjectGitignoreTarget helper that computes the correct .gitignore
directory and entry prefix based on whether the source path is inside
.skillshare/ or a custom location. All gitignore write and remove
operations (reconcile, install, uninstall, server handlers) now use
this helper instead of hardcoded 'skills/' prefix.
Fix nil projectCfg panics in three server tests that simulate project
mode by setting projectRoot without projectCfg.
Add ProjectSources struct to ProjectConfig with optional skills, agents,
and extras fields. When set, project-mode commands resolve source paths
from these values instead of hardcoded .skillshare/{skills,agents,extras}/.
Config example:
sources:
skills: ./docs/skills
agents: ./docs/agents
Three EffectiveXxxSource(projectRoot) methods provide the central
resolution logic with fallback to defaults. The projectRuntime gateway
and server layer route through these methods, so most commands get
custom source support automatically.
Closes#153
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/.