- 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/.
- Project mode JSON sync now includes context_cost (was nil)
- Server handler respects symlink mode (skips include/exclude filters)
- checkBudget reports all targets exceeding threshold (not just worst)
- Budget warnings include target name in CLI and UI output
- ConfigPage indentation restored to original 2-space style
DiscoverSourceSkillsWithStats did not set collectContext=true, so
DescChars/BodyChars were always 0 when sync called buildAnalyzeEntries.
Add DiscoverSourceSkillsWithStatsAndContext that enables both ignore
stats and context collection in a single walk, and use it in sync.go
and sync_project.go.
Add --quiet/-q flag to suppress token summary and budget warnings.
Both global and project sync paths call buildAnalyzeEntries after
SyncSummary to display context cost and budget violations.
- Replace three switch statements with a single shells map[string]shellDef
- Add missing --add-agent-{include,exclude} and --remove-agent-{include,exclude}
flags to nushell target completion
- Fix nushell audit using 'target?' instead of 'subcommand?'
- Replace raw fmt.Println with ui.Info in post-install hints
- Use testutil assertion helpers in integration tests
- Verify --install actually writes the file to disk
Bash, zsh, and PowerShell completion scripts now auto-detect aliases
pointing to skillshare (e.g. alias ss=skillshare) and register
completions for them. Also adds powershell/nushell to the shell
options in all completion scripts.
- Add PowerShell and Nushell completion scripts
- Fix bash completion when bash-completion package is not installed
(fallback from _init_completion to manual COMP_WORDS parsing)
Add 'skillshare completion <shell>' command that generates shell
completion scripts. Supports --install flag to auto-write the script
to the correct platform path.
Covers all commands, subcommands, and per-command flags for bash,
zsh, and fish shells.
- install_project.go: pass AzureHosts to temporary Config (was only
passing GitLabHosts, so project-mode direct install ignored azure_hosts)
- update_agents.go: thread ParseOptions through batchUpdateAgents and
reinstallAgent, replacing bare ParseSource with ParseSourceWithOptions
- handler_update.go: use ParseSourceWithOptions with s.parseOpts() for
agent update in web UI
Without this fix, azure_hosts in .skillshare/config.yaml was silently
ignored during project install and agent update, causing on-prem Azure
DevOps URLs to be parsed incorrectly.
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
Refactors targetListJSON (global and project modes) to use the shared
buildTargetTUIItems + newTargetListJSONItem path, eliminating duplicated
item-building logic and ensuring both modes expose consistent metadata:
- targetNaming: effective naming strategy (flat/nested)
- sync: skill sync summary string
- agentSync: agent sync summary string
Adds assertions in target_agents_test.go and a new integration test
(TestTarget_List_Project_JSON_IncludesSyncMetadata) to cover the new fields.
Add agentLocalCount to target API and CLI JSON output so the UI can
display how many local (non-source) agents exist per target.
- Add LocalCount to AgentSummary, computed via FindLocalAgents
- Surface agentLocalCount in both CLI target list JSON and server API
- Show local agent counts in target detail summaries (CLI + UI)
- Collect button now appears for targets with local agents and routes
to CollectPage with scope=agent query param
- CollectPage reads scope from URL and auto-scans on mount
- Fix BatchUninstallPage: agents tab was collapsing individual agent
names into the repo name via buildApiNames(), causing 'agent not
found' errors; now sends each agent flatName individually
- Invalidate targets + diff queries after successful collect
Root SKILL.md in multi-skill repos has no directory boundary — the entire
repo root is its source, which drags in project infrastructure (src/,
assets/, CI, build scripts). Now when Path="." and descendants exist,
only the SKILL.md file is copied. Children install as independent flat
directories instead of nesting under the root.
Remove orchestrator nesting logic from installSelectedSkills — each skill
now installs at the top level regardless of whether the root is selected.
UpdateNotification() wrote to stdout via fmt.Printf, corrupting JSON
output when --json was passed to commands like search. Machine
consumers got invalid JSON with trailing human-readable text.
Three-layer fix:
1. Move UpdateNotification output to os.Stderr (safety net for any
caller that bypasses the main.go guard).
2. Add isStructuredOutput() that detects all machine-readable modes:
--json, -j, and --format json/sarif/markdown.
3. Skip the update check and trailing newline entirely in main()
when structured output is requested, honouring the contract that
stdout = pure structured data and stderr = empty.
Tests:
- Unit: isStructuredOutput table test (9 cases)
- Unit: UpdateNotification writes only to stderr
- Integration: versioned binary (1.0.0) with seeded cache (9.9.9)
exercises the real update path for search --json, list -j, and
audit --format json — asserts valid JSON stdout + empty stderr.
Closes#129
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
An orchestrator repository containing a root SKILL.md together with
child SKILL.md directories (e.g. iOfficeAI/OfficeCLI) previously
installed as a single bundled directory that mirrored the git clone:
copying the root dragged every child skill dir into it, and children
marked selected were silently skipped as "included in parent" while
their computed dest paths were never written to.
Make each discovered skill a first-class install:
- New copyDirExcluding() skips subdirectories by slash-normalized
relative path, so a skill directory is copied without duplicating
any nested skill that is itself being installed elsewhere.
- installFromDiscoveryImpl computes the descendant skill paths of the
skill currently being copied and passes them as excludes. For the
root of an orchestrator repo this drops every child skill dir; for
a non-root skill it drops any sub-skill nested inside it.
- installSelectedSkills stops skipping children after the root is
installed. The existing dest-path logic already places each child
under <parentName>/<childName>, so the children are written as
siblings to the root install.
After the fix, a multi-skill repo with N skills produces N independent
installed directories discoverable by sync, updatable individually.
Refs: #124
When a repo contains both a root SKILL.md and child skills, picking
"Select individual skills" previously excluded the root entirely, so
the orchestrator skill could never be installed from the multi-select
UI — users had to resort to --name as a workaround.
Include the root skill in the individual selection list (listed first)
so it is visible and selectable alongside its children.
Refs: #124