Sync's registry prune logic removed entries for installed skills whose
files were missing from disk. This was wrong: the registry is the
authoritative record of installations managed by install/uninstall.
Remove PruneStaleSkills calls from sync (CLI global, CLI project, and
web UI handler). Reconcile (called during install) still uses prune
with full metadata context, which is correct.
Fixes: running 'sync' after 'install' would clear registry.yaml when
the installed skill's source files were not yet on disk.
Tracked repos have no .skillshare-meta.json, so reconcile could not
read branch from metadata. Now falls back to git rev-parse --abbrev-ref
HEAD for tracked repos, ensuring branch is written to registry.yaml
for cross-device rebuild.
Added gitCurrentBranch() helper in config package (cannot import
internal/git due to circular dependency).
Added registry assertion to TestInstallBranch_TrackedRepo.
TestSync_TargetNamingStandard_InvalidSkillWarnsAndSkips now checks
for summarized output 'skill(s) skipped (naming validation)' instead
of per-skill warning line.
- NewMetaFromSource: set meta.Branch from source.Branch
- installFromDiscoveryImpl: forward discovery.Source.Branch when building
per-skill Source struct for metadata
- installFromGitSubdir: pass source.Branch to sparseCloneSubdir (was
hardcoded empty string, causing subdir installs to ignore --branch)
- ReconcileGlobalSkills: sync meta.Branch to registry on both new and
existing entries
- toSkillEntryDTOs: include Branch field in DTO conversion
- updateRegularSkill / updateSkillFromMeta: restore source.Branch from
meta before reinstalling, so updates pull from the originally-specified
branch
Tests: TestInstallBranch_MetadataPersistence, TestInstallBranch_UpdatePreservesBranch
Source.Branch threads the branch parameter through discovery.
cloneRepo() passes --branch to git clone when set.
source.Branch is set from parsed.opts.Branch in cmdInstall.
Ref: #90
cloneTrackedRepo(), cloneRepoFull(), and sparseCloneSubdir() now accept
a branch parameter. When non-empty, --branch <name> is passed to
git clone. Fallback chain (partial → full) preserved.
Ref: #90
Add --branch / -b flag to install command:
- Flag parsing with value-required and non-empty validation
- Mutual exclusion: --branch rejected for non-git (local path) sources
- Help text added to printInstallHelp()
- Integration tests covering all three error paths
Add per-target target_naming setting that controls how skill directories
are named in sync targets. 'flat' (default) preserves the existing
flattened __ separator behavior. 'standard' uses the SKILL.md name field
directly, following the Agent Skills specification.
Standard mode:
- Validates SKILL.md names match directory basenames
- Detects and skips name collisions with warnings
- Auto-migrates managed entries when switching from flat to standard
- Preserves legacy entries when bare name is already occupied
Also includes:
- Per-target toggle via CLI (--target-naming), TUI (N key), and Web UI
- Collision output redesigned as deduplicated compact summary
- Config inheritance: global target_naming → per-target override
- JSON schema + UI validation for the new field
Closes#110
Support case-insensitive substring filter on skill relPath.
When --filter is set, JSON output includes filtered_summary with
always_loaded, on_demand, and total token counts for matched skills.
Ref: Discussion #99
Verify MigrateRegistryToSource behaviour end-to-end:
- old-only: registry.yaml is moved from config dir to source dir
- both-exist: old file is kept, new file unchanged, warning printed
- global mode fresh sandbox: registry.yaml never written to config dir
- Fix nil pointer panic when WindowSizeMsg arrives before data loaded
- Fix TestAnalyze_Verbose: create 12 skills to match analyzeTopN=10
- Unify left panel with shared renderPrefixRow (▌ prefix bar style)
- Right-align token counts in skill list rows
- Pre-compute colored dots to avoid per-render lipgloss allocations
- Add category tab bar at top for future analysis categories
- Improve target bar separator (│ → ·) and footer spacing
- Extract renderFooter to eliminate viewSplit/viewVertical duplication
- Add analyze command reference page and sidebar/index entries
- Remove early return in dry-run so linked/copied counts are populated
correctly (P1: UI preview no longer hides Sync Now button)
- Use local quietDryRun flag instead of mutating global DiagOutput
to suppress per-skill messages (P2: safe under parallel sync)
- Use "Will create" for dry-run, "Created" for actual sync (P3)
- Include dir_created in allUpToDate check so empty source + missing
dir still shows Sync Now in the preview modal
v0.17.5 blocked sync when target directories didn't exist, which
prevented first-time users on fresh CLI installs from syncing.
Sync now auto-creates missing directories and reports what it did
in CLI output, dry-run preview, and the Web UI. Init also creates
target directories when it detects an installed CLI tool.
Web UI: Sync Preview modal stays open after sync with a success
banner instead of immediately closing, so users can review results.
Closes#87
Verify that the new metadata.targets format works end-to-end
through the full sync pipeline: filtering, mixed format
coexistence, and metadata-over-toplevel priority.
Tests were failing because config validation now requires target paths
to exist before sync. Updated tests to create target directories
properly and adjusted expected error messages.
- TestExclude_GlobalSymlinkMode_Ignored: use CreateTarget instead of RemoveAll
- TestSync_SymlinkMode_CreatesSingleSymlink: same
- TestSync_SourceNotExist_ReturnsError: use CreateTarget, update error message
- TestLog_SyncPartialStatus: use read-only dir to trigger partial failure
Verify that sync command correctly reports ignored skills in text output,
includes ignored_count and ignored_skills in JSON output, and produces
no ignored output when .skillignore does not exist.
Surface .skillignore visibility in the status command so users can
see active patterns and how many skills are being ignored without
needing to run doctor.
Text output shows an indented line under Source when .skillignore
exists; JSON output adds a skillignore object inside source with
active flag, file paths, patterns, and ignored skill details.
Add checkInfo status constant for informational (non-pass/warn/error)
doctor checks. Info checks count toward total but are tracked separately
in the summary.
Add checkSkillignore to doctor: reports .skillignore state as either
info (no .skillignore found) or pass (active with pattern/ignored counts
and details). Switches discovery from DiscoverSourceSkills to
DiscoverSourceSkillsWithStats to collect .skillignore statistics in the
same walk.
Replace the naive string matcher (~40 lines) with a proper gitignore
implementation (~200 lines, no external deps) supporting **, ?, [abc],
!negation, /anchored, pattern/ (dir-only), and \#/\! escapes.
New Matcher API (Compile, ReadMatcher, Match, CanSkipDir, HasRules)
replaces the old Match/ReadPatterns functions (kept as deprecated
wrappers). Call sites in sync.go and install_discovery.go updated.
Also fixes isDir=true for install discovery (skill paths are dirs).
100% test coverage on skillignore package (~150 table-driven cases).
Added 7 sync discovery tests and 5 install integration tests covering
**, !negation, pattern/, [Tt] char class, and combined patterns.
Without this fix, running `init --subdir` in a directory with
.skillshare/config.yaml would auto-detect project mode and fail
with "unknown option: --subdir" because the project parser doesn't
support it. Adding --subdir to hasGlobalOnlyInitFlags() ensures
correct routing to global mode.
Also adds 5 integration tests covering --subdir end-to-end:
config path, list discovery, sync symlinks, mode routing, dry-run.
Previously, `init` silently defaulted source to ~/.config/skillshare/skills/
with no way for users to discover customization without reading docs. Now
interactive mode asks whether to customize the source path (Y/N gate + text
input), with tilde expansion and filepath.Abs normalization. The success
message also hints at --source and config path for future changes.
- promptSourcePath() follows same Y/N pattern as useSourceSubdir()
- TTY guard ensures non-interactive (piped stdin, --source flag) is unaffected
- Integration test verifies success message contains source hint
- Updated init.md flowchart, --source option note, and first-sync.md steps
Enable teams to use one project as a shared skills repo where each
developer manages their own targets independently.
- Add `--config local` flag to `init -p` that gitignores config.yaml
- Auto-detect shared repo on clone via .gitignore check (no flag needed)
- Fix partialInitRepair to run interactive prompt instead of auto-select
- Export GitignoreContains, add UpdateGitIgnoreFiles for file-mode entries
- Refactor gitignore helpers to share addGitIgnoreEntries private helper
- Add 5 integration tests covering all new flows
- Add recipe docs page, update init reference, changelogs, release notes
Add ability to change sync mode of an extra's target across all three
interfaces: CLI (`extras mode`/shorthand `extras <name> --mode`),
TUI (`M` key with mode picker overlay), and Web UI (inline Select
dropdown per target with PATCH /api/extras/{name}/mode endpoint).
Fix sync behavior so symlinks from a previous mode are auto-replaced
without --force, while regular files still require explicit --force.
Consolidate sync mode list into config.ExtraSyncModes single source
of truth. Fix Select component missing disabled prop and add viewport
collision detection with useLayoutEffect.
Includes 8 integration tests covering mode command happy path, error
cases, shorthand syntax, and mode-switch sync behavior.
Extras diff is now automatically included when extras are configured.
No need for explicit --extras or --all flags — simpler UX.
- Remove showExtras/showAll from diffRenderOpts
- Replace flag check with len(cfg.Extras) > 0
- Update integration test, built-in skill refs, website docs, changelog
Extras commands had multiple issues with tilde (~) path handling — Go
doesn't expand ~ (that's shell behavior), so paths like ~/.claude/rules
were treated as literal relative paths, creating bogus ~/ directories.
Key fixes:
- Export config.ExpandPath() and call it before os.Stat / sync operations
in extras_list, sync_extras, extras_collect, and doctor
- Unify extras output headers to match target list style (single "Extras"
header instead of per-extra headers, fix double-icon bug in list)
- Add per-target reachability warning in doctor for unreachable extras
targets with expanded path display
Update all 3 E2E runbooks to use extras/<name>/ path layout, add /tmp
cleanup for idempotent re-runs, add migration test step, and create new
comprehensive extras_commands_runbook (18 steps covering init/list/remove/
collect/doctor/tilde/project-mode).
Improve cli-e2e-test skill with 4 new checklist items and 2 rules learned
from test friction (/tmp isolation, symlink write-through, cat>>
idempotency, extras path layout).
Wire up the existing extras init TUI wizard so `extras init` without
arguments launches the interactive 5-phase flow. Add --no-tui flag for
scripting. Guard against silently swallowing --mode when launching TUI.
Redesign extras status output to match Targets section style using
ui.Status with per-target rows showing [mode] path (N files). Extract
shared printExtrasStatus helper to eliminate duplication between global
and project status. Add (project) label to project-mode header.
Clean up: delete duplicate extrasEffectiveMode in favor of
sync.EffectiveMode, remove redundant os.Stat TOCTOU in doctor.go
checkExtras, handle zero-targets edge case with a warning.
- Move checkExtrasSyncStatus to sync.CheckSyncStatus (shared)
- Add sync.EffectiveMode helper to replace inline mode defaults
- Add config.ValidateExtraMode to centralize mode validation
- Fix sync --all --json outputting two separate JSON objects
by merging extras into the skills JSON output
- Fix swallowed JSON decode error in handleExtrasSync
- Remove dead symlink check in CollectExtraFiles (filepath.Walk
follows symlinks so the check was unreachable)
- Fix integration test extras paths to use extras/<name>/ layout
The detail panel header was rendered on L00 (same row as the list title),
making the skill name invisible. Push content to L01 with a leading newline
and use colorSkillPath for consistent group/name coloring matching the left
panel. Compress status/date/targets into a single metadata line to save
vertical space. Show full source URL and synced targets in Quick Facts.
Also suppress devcontainer stderr redirect message in --json/--format modes
and fix audit summary field name (analyzerCount → activeAnalyzers).
Keep sync dry-run diagnostics on stdout by default to avoid non-JSON behavior regressions. Introduce sync.DiagOutput so JSON mode can silence diagnostics via io.Discard at command entry and restore after execution. Update search JSON integration assertion to match fully silent progress behavior.
Extract buildTrackedRepoJSON() that runs git.IsDirty concurrently via
goroutines + WaitGroup instead of sequential subprocess spawns per repo.
Also deduplicates the tracked-repo JSON loop between global and project
status paths, and optimizes skill counting to a single pass with a map.
suppressUIToStderr was redirecting UI to stderr, but in environments
where stdout and stderr share the same terminal (e.g. docker exec),
all the spinner/progress/header output was still visible alongside
the JSON. Replace with suppressUIToDevnull which opens os.DevNull
for both os.Stdout and ui.ProgressWriter, producing zero visible
noise in --json mode.
Also add status --json support for project mode, reusing the same
JSON schema as global mode (source, skill_count, tracked_repos,
targets, audit, version).
install --json: logo, spinners, and step output leaked to stdout,
corrupting machine-parseable JSON. Add suppressUIToStderr() around the
entire install flow, restoring stdout before writing JSON.
diff --project --json: spinner and progress display polluted stdout.
Skip spinner and progress creation in JSON mode, matching the existing
cmdDiffGlobal pattern.
uninstall --json: five error paths (discovery failure, no skills found,
glob detection, validation, preflight) returned plain-text errors instead
of JSON error envelopes. Wrap each with writeJSONError().
Add 8 integration tests (5 new failure cases + 3 confirming existing
behavior) with an assertPureJSON helper that validates stdout contains
only valid JSON with no leading/trailing noise.
writeJSONError now returns a jsonSilentError sentinel that main()
recognises — it exits with code 1 without printing plain-text output
to stdout. This fixes a regression where --json errors (config load
failure, missing source dir, discovery failure) returned exit 0.
All writeJSONError call sites changed from the broken pattern:
writeJSONError(err); return nil // exit 0, wrong
to:
return writeJSONError(err) // exit 1, correct
Also applied the same fix to update.go error paths which had the
older pattern of writeJSONError(err) followed by return err (which
would print both JSON and plain text).
Added regression tests for sync and install error paths verifying
both non-zero exit code and valid JSON error output on stdout.