* docs(proposals): propose agent-specific skill variants
Tracked repositories can ship different files for the same skill across
agents. Counting and syncing each copy independently sends incompatible
instructions to every target unless users maintain routing filters.
Propose repository-scoped logical identity and exact variant routing while
preserving source files, explicit controls, and existing naming behavior.
Leave activation and compatibility decisions for maintainer review.
Refs #648
* docs(proposals): clarify variant routing compatibility
Explain how recognition affects universal-only targets and how existing
per-variant overrides preserve the desired routing. Fix the precedence
between variant identity and generic host-style path inference.
Include analyze, move, and catalog consumers while preserving physical
identifiers and actual context-cost accounting.
Refs #648
* docs(proposals): clarify activation assumptions and scope
Make acceptance cases conditional on maintainer-approved recognition being
enabled for the tracked source. Separate the provisional implementation
estimate from this proposal-only PR so its size is clear.
Refs #648
* docs(proposals): qualify naming and opt-in assumptions
State that the reproduced routing behavior uses default flat target
naming. Leave any opt-in surface with the maintainer's activation decision
without ruling out future CLI or config fields.
Refs #648
* feat: recognize and route tracked agent skill variants
Count tracked variants as logical skills in source and repository summaries,
while preserving physical paths, sync operations, and context costs. Select
matching canonical agent variants, including account targets, through shared
discovery and selection with existing explicit routing precedence.
Refs #648
* fix: count logical skills in sync inventory summaries
Use shared logical and physical inventory counts in global and project sync
closing lines while preserving each target's operation totals.
Refs #648
* fix: preserve variant routing diagnostics across previews
Resolve target selections once so CLI and server previews keep ambiguity
reasons and physical skip counts. Explain managed variants removed by
automatic agent routing, and report logical inventory in doctor.
Keep warning rows read-only, document upgrade recovery in translated
filtering references, and remove the optional README-only addition.
Refs #648
* fix: align sync matrix previews with shared variant selection
Classify the full source selection once per target so matrix previews honor
canonical aliases, account identity, exact-agent routing, and ambiguous
variant skips. Preserve each rejected physical path's existing diagnostic
and draft filter disambiguation; skipped preview rows remain read-only.
Refs #648
* test: expect singular skill wording in doctor source checks
Keep the undiscovered-link count assertion aligned with logical source
inventory formatting for one skill in global and project mode.
Refs #648
* fix: retain selection diagnostics in catalog and diff verdicts
Report warning-only diff targets as requiring attention while preserving
local-only folder semantics. Reuse shared per-path selection diagnostics
in target-scoped catalogs without applying target naming to served paths.
Compute source counts once in summary callers and require variant counts
in the source status formatter.
Refs #648
* test: tighten tracked variant preview fixtures
Use a real committed tracked repository for status counts, verify sync
preview banners retain server warnings, and use emitted ambiguity reason
text in target preview fixtures.
Refs #648
* fix(sync): keep agent variants in shared target folders
Compatible targets sharing a skills folder need a combined selection so
Codex and universal do not prune one another in merge or copy mode.
Carry every shared reader through selection, pruning and previews,
including project targets, account identities and path aliases.
Require a matching skill suffix under two distinct agents before
inferring variants, keeping ordinary agent-named categories unrestricted.
Separate naming warnings from ambiguous selection in diff and explain
ambiguous removals. Add global/project regression coverage for repeated
sync, target-only sync, status JSON, diff and API consumers.
* fix(variants): align consumer counts, hints and diagnostics
Use logical source counts in list, tracked install and init summaries while matching audit caches against physical variants. Restore localized dashboard skip hints and explain symlink routing limits in status and doctor, including project and JSON output.
Document paired-agent detection and compatible shared-folder selection in the proposal, built-in skill and English plus translated command pages. Add focused regressions for the affected consumers.
* fix(sync): cover initial sync and ignored variant diagnostics
Init syncs a fresh in-memory config, so resolve shared target identities
before its first sync as well as when loading saved configuration.
A whole-directory symlink exposes ignored skills too. Diagnose agent
variants using physical inventory when active discovery has none, while
keeping logical counts and merge/copy selection restricted to enabled
skills. Cover global/project JSON status and doctor with regressions.
Reuse sourcewalk directory and canonical-path helpers so traversal guards
remain enforced and path resolution has a single existing owner.
* fix(variants): address conversion, counts and selection diagnostics
Ignore runtime agent identities when comparing convertible project targets and count logical skills during init. Keep selection warnings separate from naming warnings and preserve agent-named parent skills as ordinary skills.
Cover account sync/prune, project ambiguity and overrides in merge/copy modes, and init/status agreement. Focused verification ran in an isolated Linux Codex container, not the devcontainer, as authorized.
* refactor(variants): remove obsolete selection helpers
Remove the unused FilterSkillsByTarget wrapper and prune agent parameter, cache canonical target aliases once, and restore catalog skip ordering to avoid an unrelated behavior change. Completes the optional cleanup from PR 649 review.
* fix(ui): expose localized variant selection diagnostics
Show target warnings with source paths, localize ambiguity across preview and detail consumers, and let skipped preview rows add a physical exclude pattern. Show tracked repository variant counts alongside logical skills.
Drop display-only rendered cases while retaining mutation protection and plain TypeScript logic coverage. Inspect target states in Clean/Playful light/dark and Traditional Chinese.
* docs(variants): explain diagnostics and add sync runbook
Document doctor variant_routing and logical/physical counts, diff selection skips, and the nested parent-skill boundary. Keep all four command translations aligned and add isolated account/project E2E scenarios.
Both runbook steps passed in the authorized Linux Codex container with separate HOME/XDG/TMPDIR fixtures. Website typecheck and all five locale builds passed.
* test(config): use native paths in project conversion fixture
The shared-agent regression fixture appended slash-separated suffixes to Windows temporary paths, so project path matching returned no candidates. Build each path with filepath.Join and preserve all conversion assertions.
Focused project configuration tests passed in the authorized isolated Linux Codex container, not the devcontainer. Windows CI verifies the platform-specific fixture correction.
* fix(ui): recompute shared skill routing for filter previews
Evaluate edited include/exclude settings in the complete target map before
classifying the draft, so a formerly shared folder no longer keeps its old
union when the filters differ. Preserve the saved target configuration.
* fix(mcp): keep parent skills when peer variants route elsewhere
Do not treat an otherwise eligible variant for another agent as an unserved
nested skill. Continue blocking parent publication for explicitly filtered,
disabled, ambiguous, or invalid children so filters still hide their files.
* fix(ui): distinguish agent selection from naming skips
Expose separate naming and selection skip counts on target summaries.
Show each applicable remedy in target details and sync previews so ambiguity
keeps its filter/override guidance alongside naming and collision hints.
* fix(list): include disabled rows in tracked repository counts
Count the complete inventory that list displays, including ignored skills
and physical variants, without changing the enabled counts used by status,
install, or sync. Clone rows before counting to preserve disabled state.
* docs: align variant counts and routing recovery guidance
Show logical skill and physical variant counts in list/install documentation
and keep the four translations aligned with the filtering examples. Explain
that agent-named skill parents keep ordinary nested skills and retain the
devcontainer-only runbook environment. Removal warnings now recommend a
source-local override, since include filters cannot undo agent routing.
* fix(mcp): preserve explicit target restrictions on nested variants
Limit the differently routed child exemption to automatic layout inference.
Frontmatter targets and dashboard source-local overrides must still prevent
a parent from publishing files explicitly restricted to another target.
* fix(ui): fill target name in naming warning guidance
Pass the current target name when rendering localized warning hints so the
same naming guidance shown beside the controls does not expose a placeholder
in the warning banner. Verified in the populated target preview.
---------
Co-authored-by: Willie <egg358358@gmail.com>
* fix(sync): replace copy-mode copies with links when switching back to merge
Switching a target from copy back to merge left every copy whose entry name
did not change as a real folder. Merge sync treated it as the user's own
folder, so status and doctor kept saying "run skillshare sync" while sync
changed nothing, and only `sync --force` turned it into a link.
Copy mode already replaces merge-mode links with copies on its own, so merge
sync now replaces a folder the manifest records with a checksum (a copy-mode
copy) with a link, without --force. Folders the manifest does not record, or
records as a link, stay untouched. The pre-sync target backup is unchanged.
The CLI and dashboard diffs name these entries as copies sync replaces
instead of suggesting --force, and the sync-modes docs describe the switch.
* fix(sync): keep copy-mode copies the user edited when switching to merge
The first version replaced any folder the manifest recorded as a copy-mode
copy. The manifest checksum is only a record, so a copy edited since copy
mode made it was deleted too, and `sync --json` and project-mode dashboard
sync take no pre-sync backup to restore it from.
Replace the folder only while it still hashes to the recorded checksum
(Manifest.OwnsCopy). An edited copy is kept and `sync --force` still
replaces it; diff keeps suggesting --force for it. A copy whose name: was
rewritten by prefixed naming, or that was made with custom ignore patterns,
no longer hashes to the source checksum and is kept the same way.
* fix(ui): say a copy-mode copy in a merge target is replaced by a link
The Sync page picks a row's text from the diff item's action alone. The
copy-mode copy that merge sync now replaces comes from the server as an
update, which the page worded as "Link is broken or points elsewhere. Will
be relinked" even though no link exists yet.
Match the server's reason and show "Copy made by copy mode. Will be replaced
by a link" instead, in all eleven dashboard languages.
* docs(sync): say only unedited copy-mode copies are replaced on merge sync
The sync-modes paragraph promised that copies copy mode made are replaced
with links without --force. Merge sync keeps a copy that no longer hashes to
the checksum copy mode recorded, so an edited copy, or one whose name: copy
mode rewrote for prefixed naming, still needs --force.
State the three cases in sync-modes and qualify the diff Modified and Local
override labels, in English and the ja, ko, zh-Hans and zh-Hant copies.
* fix(sync): keep the copy until its replacement link exists
Replacing a copy-mode copy removed the folder first and then created the
link. If creating the link failed (no symlink or junction rights on a
Windows or network filesystem), sync returned an error with the skill gone
from the target. This path now also runs on a plain sync, not only on
--force.
Park the folder beside the entry, create the link, then delete the parked
folder; on failure the folder is moved back. A parked folder left by a run
that died mid-way may be the only copy, so the next sync stops with a message
instead of deleting it. The manifest also forgets the copy-mode mtime and
naming records of an entry that is now a link.
* test(sourcefs): register replaceWithLink's target writes in the raw-write ratchet
The previous commit moved the merge-mode folder replacement into
replaceWithLink, which the ratchet reports as new raw os calls and the old
os.RemoveAll allowance as stale. All of them act on the sync target, not the
skills source, like the neighbouring entries.
* fix(sync): bound the parked copy's name and document the naming exception
The folder parked while a link is created was named after the entry, so an
entry near the 255-byte filename limit (a long flattened nested skill)
could not be moved aside and its replacement failed. The parked name is now
a fixed-length hash of the entry name.
sync-modes also says what happens when `target_naming` changes in the same
sync: the copy gets a new entry name and the prune pass removes it as an
orphan whether or not it was edited, as it did before this change.
* fix(sync): close gaps found while simulating the prefixed naming switch
Simulating the #497 reporter's switch from merge + flat to copy + prefixed
turned up four problems:
- `target X --mode copy --target-naming prefixed` applied only --mode, since
the setter dispatch returned after the first flag. Both flags given
together now check the final pair, then apply in an order that keeps the
saved pair valid (copy mode first, any other mode last).
- Skipped skills were only counted, so a prefixed name over 64 characters
vanished with "1 skill(s) skipped". Sync now names the first five with
their reason; the cap keeps huge sources from flooding the output.
- In copy mode a merge-mode link to the skill was not a managed entry, so
when a local folder held the new name the old link was pruned and the
skill left the target, contrary to the documented "old managed entry is
preserved". Copy mode now migrates such links like managed copies.
- PATCH /api/targets validated the mode/naming pair against the current
skills state, so disabling skills while changing mode was rejected. It now
checks the state the request leaves the target in.
* docs(target): drop stray space in the Japanese mode+naming sentence
* fix(diff): save paired target settings once and report kept legacy entries
- `target X --mode M --target-naming N` ran the two setters, each saving
the config, so a failed second save left half the change behind (Codex
on #504). Both fields are now set and saved once, after the final pair
is checked.
- When a local folder holds the name a skill's naming now gives it, sync
keeps the skill under its old entry and leaves the folder alone, even
with --force. diff still called the folder a "local copy" and suggested
`sync --force`, which does nothing for it. CLI and Web API diff, copy
and merge mode, now report the folder and the entry the skill stays at.
* fix(sync): migrate only links the manifest records as merge-made
Copy mode treated any link to the skill's source at an old naming's name as
the entry merge mode left behind, so a user's own link was renamed and
replaced with a copy (Codex on #504). A link now migrates only when the
manifest records it as "symlink", which merge mode writes for links it makes;
other links stay as the user left them. The value is now a named constant.
* fix(diff): mark kept legacy entries as unaffected by force
Two problems Codex found on #504:
- The Web API diff sent a local folder on a skill's new name as a "skip",
which the dashboard shows as an edited entry that Force replaces. Sync
keeps that folder and the legacy entry even with force, so the preview
promised a change that never happens. It is now its own "kept" action,
shown with its reason and not counted.
- `target X --mode M --target-naming N` printed the target's own naming as
the old value, so a target inheriting standard or prefixed showed
"flat -> ...". It now prints the naming the target had in effect.
* fix(diff): keep kept-name conflicts out of the sync count
Two problems Codex found on #504:
- A local folder on a skill's new name counted toward "N to sync" and
fell through to the plain `skillshare sync` hint, though sync changes
nothing there until the folder is renamed or removed. Such rows now
carry a kept flag, count as neither sync nor local, and print their own
hint; a target whose only row is kept still shows that row.
- The dashboard grouped targets by row name and icon only, so two targets
keeping the same skill at different old entries merged and showed one
target's old location for both. The row detail is now part of the key.
* fix(diff): do not list a kept local folder's files as deletions
A kept row (a local folder on a skill's new name) still pointed at that
folder, so `diff --stat` and `--patch` listed each of its files as removed,
though sync never touches the folder (Codex on #504). Kept rows no longer
point at a target directory, so no file-level diff is built for them in the
CLI or the TUI.
* fix(diff): report kept skills consistently in every diff view
An exhaustive review of the kept-row change (prompted by two Codex findings
on #504) found the same gap in several places:
- A target whose only rows were kept was summarized as "in sync", and mixed
summaries left it out of every count. Such targets now count as "N kept
under old name" with a warning mark, and the scan progress counts them.
- Plain output and the TUI hid where the skill stays; rows now read
"name (stays at old-name)". The TUI also lacked the kept Next hint and
called kept-only targets "differs"; it now matches the plain output.
- `diff --json` emitted kept rows as "remove", indistinguishable from
local-only folders; it now emits "kept", as the Web API does. The diff
docs' JSON example also showed actions the CLI never emits.
- Renamed rows whose old entry is a merge-made link showed a bogus file
stat, because the link was walked as a file; a link now stands for the
folder it points to.
- A dry-run migration printed "Would copy" to the old path; it now names
the new one.
* fix(sync): stop reporting kept folders and skipped skills as pending work (#509)
Three reports told users to do something sync cannot do, or hid what it
did:
- Copy and merge sync kept a folder the user made on a skill's name but
counted it as "up to date" with no hint. Sync now counts it as local and
adds one capped line per target naming the folders and saying that
`sync --force` replaces them. The line is added in SyncSkillTarget, so
the dashboard gets it too.
- status and doctor counted skills that sync skips on purpose (invalid
names under standard or prefixed naming, name collisions) as "not
synced — run skillshare sync". Running sync can never add them, so the
advice looped. They now compare against the skills sync places.
- diff marked a target whose only items were local-only folders as "to
sync" and `synced: false`. Those items are still listed, but they no
longer make the target pending.
* fix(target): apply every setting flag, require flag values, report no-ops as unchanged (#507)
* fix(target): apply every setting flag, require flag values, report no-ops as unchanged
`skillshare target <name>` dispatched --mode, --agent-mode and
--target-naming through an if-chain that returned after the first match,
so `--agent-mode copy --target-naming prefixed` applied one setting and
silently dropped the other. Filters, --skills and --dry-run had the same
early-return problem.
- Check --mode, --agent-mode and --target-naming as a whole and save
once, in global and project mode (one targetSettingsUpdate replaces six
per-flag functions).
- Reject --mode/--agent-mode/--target-naming combined with filters or
--skills, and --dry-run without --skills, instead of dropping them.
- A value flag followed by another flag (or an empty string) now reports
"<flag> requires a value"; `--target-naming -p` used to report an
invalid naming '-p'.
- A value the target already has is reported as unchanged and the config
is not rewritten.
* fix(target): leave the skills pair alone on agents-only changes
A target with skills off may keep target_naming prefixed with a merge
mode it cannot sync; validateGlobalTarget and validateProjectTarget only
check that pair for enabled skills. The combined settings update ran the
pair check for every setting, so `target claude --agent-mode copy` was
refused on such a target although the old agent-mode handler never looked
at skills settings. Check the pair only when --mode or --target-naming is
given.
* docs(target): show combined settings in --help and the built-in skill
The combined --mode/--agent-mode/--target-naming form is now the way to
move a target to copy + prefixed in one step, but neither the help
examples nor the built-in skill's target reference showed it.
The legacy lookup stat'ed the skill's current entry before looking for old
names, adding syscalls to every flat sync; it now stats only the candidate
names other than the current one (usually none exist) and checks the
current entry only once an old managed entry is found. ReadManifest now
always returns a Naming map, Manifest.Remove drops an entry's records in
one place, copySkillToTarget takes the name to write instead of deciding
it, and diff reads the manifest only for copy targets.
The legacy lookup checks a skill's flat, standard and prefixed names. With
a manifest that has no naming records yet, aaa/dev looked at "dev", found
the top-level dev skill's managed copy and synced into it, because nothing
said the entry belonged to someone else. A skill that already has its
current entry now skips the lookup, and names other skills sync to in the
same run are never treated as old names.
Two tracked repos that ship a skill with the same name cannot both reach a
tool today: standard drops both, flat keeps both folders but tools list
skills by name:. Prefixed gives a skill inside a tracked repo the folder and
name: <repo>-<name> in the copy, so both stay usable and the name shows
where the skill came from. It is copy-only because a merge symlink points
at the source, where name: must not change; config validation rejects it
elsewhere, per target, like extension does.
Switching naming used to know only the flat name as the old one, so
standard <-> prefixed would orphan entries. The migration now checks the
skill's name under every naming, and the copy manifest records the naming
that produced each entry: a switch finds the exact old entry, and a renamed
copy is re-copied so its name: matches even when the source is unchanged.
Manifests without the record fall back to flat, standard, prefixed in turn.
A rename is written to the manifest at once, so a later failure cannot
leave the renamed folder looking user-owned.
The dashboard showed the CLI's raw line, "api-server@claude: include pattern
"*review*" matches no skill in the source", once per target. It named a
config field, did not say the target ends up with no skills, and gave no way
to fix it. Sync now returns these as structured entries; the Sync page
groups a project's targets into one localized notice that says what happens
and links to where the filter is edited. The CLI line also says the filter
adds nothing to the target.
GetTrackedRepos returned OS-native paths, so every caller that compared
them with slash paths (RepoRelPath, dashboard repoPath, metadata keys)
had to convert first. Two callers in install_queries already did, and
this branch added four more. It now returns slash paths on every OS,
matching GetMissingTrackedRepos; filepath.Join and filepath.Base accept
them on Windows, and `update org/_repo` now also matches by full path
there. The per-call-site conversions are gone.
Smaller cleanups in the same code:
- repoOf takes the slash relPath and looks up prefixes by substring, so
the walk no longer splits and joins per directory;
- repo .skillignore matchers are keyed by the same slash rel path, so
isSkillIgnored no longer needs walkRoot;
- batch uninstall uses utils.IsTrackedRepoDir instead of a literal "_";
- the dashboard uses repoOf where it spelled out isInRepo && folderOf;
- the new tests reuse postBatchUninstall and share one --into sandbox.
`install --track --into org` clones to org/_repo, but skill discovery
only marked a skill as in-repo when the first path segment started with
"_". Everything downstream also assumed the repo name was that first
segment. Skills of such a repo were therefore treated as loose skills:
no source in the dashboard, not grouped under the repo, a skill count of
0 in `status`, and an install hint that pointed at the wrong name.
Discovery now records each skill's tracked repo root (RepoRelPath). A
first-segment "_" folder still counts as before; a deeper one counts
only when the walk saw it as a git clone, so a plain org/_drafts folder
stays a folder. The repo's .skillignore is looked up by the same root.
Consumers move from "first segment" to that root:
- the API exposes it as repoPath, and the dashboard groups, updates and
uninstalls repos by it;
- `list` and `status` use it for repo names and counts;
- batch uninstall accepts a nested repo name, so the dashboard can still
remove an --into repo now that its skills are in-repo;
- repo names sent to the dashboard by check and update-all use slash
paths, so they match repoPath on Windows too;
- the install hint suggests `skillshare update org/_repo`.
Fixes#470
canonicalPath relied on filepath.EvalSymlinks, which since Go 1.23 leaves
a Windows junction component in place. A link whose target is itself a
junction, or sits below one, was followed as the unresolved junction:
the walk saw no descendants while the inventory counted as complete, so
target entries from that link could be pruned, and a sync target spelled
through a junction could evade the overlap guard. Every existing path
component is now resolved hop by hop, and a target that still ends in a
link marks the link unavailable instead of being followed.
The policy also kept the source root as spelled, so a relative global
source was discovered but never resolved for writes or audit. Root,
first-level and Resolve comparisons now use the same canonical absolute
form. Copy and checksum roots get the same one-hop resolution so a
followed junction that is itself a skill no longer trips the cycle guard.
Keep the canonical skills source root and logical relative tail when creating or reformatting project links, including Windows relative links and junction fallback. Shared agent and extra links retain full canonicalization, and global Unix link text stays unchanged.
Allow group walks outside the source only for an enabled first-level link validated by Follow.Resolve, remapping children to logical paths and metadata keys while retaining nested-link guards and root-skipping semantics. Resolve copy and checksum operation roots before walking to avoid false cycles, and preserve followed source links during forced collect with per-item warnings.
Regression coverage verifies second-sync ownership, status, prune, unlink, format changes, linked-root copying, group guards, and forced collect preservation. Linux build, vet, sync and command tests, sourcewalk ratchet, server collect tests, context validation, and Windows cross-build passed; Windows runtime was not verified. No new raw-walk allowance was needed.
Users link a checkout directly under the skills source (e.g.
skills/_dev-skills -> ~/code/dev-skills) and expect it to behave like any
other first-level entry. sourcewalk resolved only the root, so these links
were invisible to discovery, sync, update, and the dashboard.
follow_source_links (global and project config, default false) enables a
per-operation sourcewalk.Follow policy. Walk, WalkDir, and ReadDir report a
followed link under its own name as a directory and descend into its
target, so names, RelPath, FlatName, SourcePath, tracked-repo detection, and
metadata keys stay logical. Only entries directly under the source root are
followed. The policy is built from config and passed explicitly to every
discovery caller in the CLI, server, and reconcile, so counts agree; the
server keeps a per-instance snapshot refreshed on config load and save
instead of a process-global flag.
A link is skipped, with one warning per operation, when its target is
missing or unreadable, is the source or a parent of it, or overlaps an
active skills target. A missing or unreadable target marks the operation
incomplete: sync then skips pruning and copy-orphan deletion, and reconcile
keeps metadata, so an unmounted drive or a re-clone in progress cannot
erase target entries or install records. A link to an existing file is not
a directory link and stays an ordinary entry; treating it as incomplete
would disable pruning for anyone sharing a file such as .skillignore.
doctor keeps raw link identity: with the key off it still says the link is
not followed and names follow_source_links: true; with it on it reports
followed links and skipped links with the reason.
The raw-walk allowlist gains entries for the policy path in Walk and
WalkDir: the source root walk with a policy, and the walk of a validated
link target whose paths are remapped to the logical link path. Both live
in sourcewalk itself, the package that owns source traversal.
Refs #274
The unmatched include warning from #326 was written straight to
DiagOutput. The dashboard sync never showed it because DiagOutput is the
server's stdout, and an interactive CLI sync could redraw its progress
area over it. Return the warnings with the merge and copy results so
SyncSkillTarget adds them to the target's warnings, which both the CLI
and the API already report. Prefix them with the target name, since the
API returns one list for all targets.
A top-level skill name has no path separator, so the suggestion cut off
its first character and suggested "alpha" for a typo like "lpha". Compare
the whole name in that case.
Refs #325
Target include/exclude patterns are matched with filepath.Match against the
source-path flat name, while target_naming: standard shows the bare SKILL.md
name in the target directory. A pattern written with the name the target shows
selects nothing, so sync prunes the entries a working pattern had linked, and
the only trace is the echoed include: line, which never says that any of those
patterns matched zero skills.
Add FindUnmatchedIncludes and render one diagnostic per include pattern that
selects no discovered skill, suggesting the flat names whose last path segment
is the pattern. exclude is left alone: an exclusion that blocks nothing is the
normal state of a spare filter, while an include that selects nothing is always
a mistake and is the destructive direction. The diagnostic goes to DiagOutput,
so --json output is unchanged, and no filtering, naming, or pruning behavior
moves.
Closes#325
Since #315, a live link into the source is pruned only when the manifest
tracks it. The ManagedOnly comments still said any link into the source
counted as skillshare's, which no longer matches what the leftover-dir
cleanup removes.
Merge-mode prune removed any target entry that was a symlink or junction
resolving under the skills source, without checking whether skillshare had
created it. Links made by hand or by another tool were therefore deleted by
name, silently and outside trash, so they were not recoverable through
restore.
Ask the manifest, which the directory branch of this same function and all
of copy-mode pruning already treat as the ownership record: a live link into
the source is pruned when it is tracked there or when --force is set, and is
kept and reported as a local entry otherwise. Broken links into the source
and the force escape hatch behave exactly as before.
Some tools only need skillshare for AGENTS.md, MCP or agents, while their
skills folder is managed elsewhere or shared through another target.
Syncing skills into those folders duplicated what the tool already reads,
so a target can now turn skills off (`target <name> --no-skills`, the
dashboard switch) and sync, diff, status and doctor skip its skills.
Switching off warns about the other tools that read the same folder.
The target list also gains tools that were missing, with colored vendor
logos where their licenses allow it, and zencoder/replit default paths
follow their current documentation.
The dashboard's target pages get the matching UI: universal is pinned as
the shared folder when adding a target, the add dialog lists what will be
written, and the AGENTS.md tab shows where the file comes from in one card
with an in-place switch between shared files.
Since Go 1.23, os.Lstat reports NTFS junctions as irregular files instead
of symlinks (winsymlink, active for go 1.25 in go.mod). Every check that
looked only at os.ModeSymlink therefore missed the junctions skillshare
itself creates on Windows: linked skills could be treated as local folders,
backed up, copied through, or left behind on prune.
Detect links through utils.IsLinkMode, which also asks the OS about the
reparse tag of irregular entries, and count only real symlinks and
junctions as links so OneDrive placeholders and deduplicated files stay
regular files. restore.go also used os.Stat for its link check, which
follows the link and never matched.
Refs #299
Flat target naming turns a source skill under a dot directory
(e.g. .system/example) into a hidden target entry (.system__example).
Target scans skipped every hidden name, so diff, doctor, status and the
dashboard reported these synced skills as missing, and prune never
removed them after the source skill was deleted.
Hidden entries are now skipped only when the target manifest does not
record them as managed, so files like .skillshare-manifest.json or
.DS_Store are still ignored.
Refs #294
The analyze numbers were drifting from what tools really see. Symlink-mode
targets expose the whole source folder, so .skillignore'd skills still load
but were left out; merge/copy targets often hold skills the user dropped in
by hand that skillshare never counted; and chars/4 undercounted CJK text by
roughly four times.
Route the CLI, TUI, web handler and sync summary through one
sync.TargetSkills so the three copies of the filter logic cannot disagree
again. Disabled skills stay in the discovery with Disabled=true and are
priced for symlink targets; unmanaged folders in a target are reported as
Local. Token estimates now charge one token per wide rune.
The dashboard keeps the chosen target in the URL so target and project
pages can deep-link into the analysis, lists project targets after own
targets with their tool icon, and tags local/disabled rows. Select gives
single-select icons a key to silence a React warning.
Both tools now document ~/.agents/skills and <project>/.agents/skills as
their skills locations and keep the old directories only for backward
compatibility. Writing to the old path next to `universal` makes them read
every skill from two places.
Global configs pin absolute paths, so they are unaffected and keep their
overlap warning. Project configs store target names only, so an existing
project follows the new default on its next sync while the links it created
in .goose/skills or .openhands/skills would stay behind and show up as
duplicates. Project sync now removes those leftovers from also_scans
directories that no configured target writes to.
That directory belongs to another tool, so the cleanup runs the prune with
ManagedOnly: only symlinks into the source and manifest-tracked folders are
removed. The flat-name heuristic would otherwise delete hand-made folders
such as `_drafts`. Targets with an explicit path are skipped, and --dry-run
only previews.
Refs #135
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
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.
Two correctness improvements from Codex review:
1. EvalSymlinks before relative-link decisions: shouldUseRelative and
createLink now resolve symlinked ancestors via EvalSymlinks so that
a project opened through a symlinked workspace, or a target dir that
traverses a symlink, produces correct relative paths (or falls back
to absolute when paths diverge from the project root).
2. Atomic reformat via reformatLink: instead of remove→create (which
loses the link on createLink failure), reformat now creates a temp
link and renames it over the original. On Unix this is atomic; on
Windows it falls back to remove→create when rename fails.
Tests added for symlinked project root, divergent target symlink,
and reformatLink atomic swap.
filepath.Abs(dest) on a relative readlink result resolves against CWD,
not the symlink's parent directory. This broke the 'already correct'
check when comparing relative symlinks to absolute source paths.
Add resolveReadlink() helper that joins relative targets with
filepath.Dir(linkPath) before calling filepath.Abs.
Also check os.Remove errors in all reformat paths instead of ignoring
them silently.
Addresses PR #122 review feedback.
sync previously skipped symlinks that pointed to the correct source,
even if their format (absolute vs relative) didn't match the expected
mode. This meant existing absolute symlinks in project mode were never
converted to relative on subsequent syncs.
Add linkNeedsReformat(dest, wantRelative) helper that checks whether
the raw readlink result has the wrong format. All four 'already
correct' skip points now check format and recreate when mismatched:
- SyncTargetMergeWithSkills (skills merge mode)
- SyncTarget (skills symlink mode)
- syncExtraSymlinkMode (extras directory symlink)
- syncOneExtraFile (extras per-file merge)
Global mode is unaffected: shouldUseRelative returns false, so
linkNeedsReformat never triggers on absolute links.
Also fix macOS /var → /private/var path mismatch in
TestSyncProject_RelativeSymlinks by EvalSymlinks on expected path.
SyncTargetMerge, SyncTargetMergeWithSkills, CreateSymlink, and SyncTarget
now accept projectRoot. When non-empty, createLink uses relative symlinks
for paths under the project root.
All existing callers pass empty string (global mode, no behavior change).
Ref: #120
Unix: computes filepath.Rel from link dir to source, falls back to
absolute on error.
Windows: tries os.Symlink with relative path first (Developer Mode),
falls back to mklink /J with absolute paths.
All existing call sites pass false (no behavior change yet).
Ref: #120
- Enable frontmatter parsing in DiscoverSourceSkillsAll so /api/skills
returns saved targets (fixes target display reverting to All)
- Skip tracked-repo skills in batch/single target handlers to prevent
dirty git state; reject with 400 for single-skill endpoint
- Add RefreshMetaHashes to recompute audit hashes after SKILL.md edits;
batch handler refreshes outside the write lock
- Show 'Uninstall Repo' with confirm dialog for tracked-repo members
instead of the always-failing individual uninstall action
- Return 409 Conflict when enabling a skill disabled by glob pattern
in .skillignore/.skillignore.local instead of false success
- Preserve IsInRepo flag for root-skillignore-disabled skills so they
remain visible in the Tracked tab after disable
- Update changelog and website changelog for v0.18.7
With 25000+ skipped skills (standard naming + name collisions),
the CLI sync output was flooded with per-skill warning lines.
Now prints a concise summary:
12345 skill(s) skipped (naming validation)
456 name collision(s) excluded
Applied to both merge and copy sync modes.
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
New discovery function that includes .skillignore-d skills marked with
Disabled=true. Existing discovery functions are unchanged — Disabled
defaults to false for backward compatibility.
Populate LintIssues during skill discovery (collectContext path) and
propagate them through analyzeSkillEntry so JSON output includes lint
findings per skill.
Press R on a selected target to show a confirmation overlay.
Confirming exits the TUI and dispatches the full target remove
flow (backup + unlink + config update), matching the existing
exit-with-action pattern used by the skill list TUI.
Supports both global and project modes.
- 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
Unify ~160 lines of duplicated walk logic from DiscoverSourceSkills and
DiscoverSourceSkillsLite into a single discoverSourceSkillsInternal
function controlled by discoverOptions (parseFrontmatter, collectIgnored,
collectTracked).
Add DiscoverSourceSkillsWithStats which returns IgnoreStats populated
with root/repo .skillignore file paths, active patterns, and ignored
skill relPaths. When collectIgnored is true, CanSkipDir is bypassed so
the file-level Match check can record every ignored SKILL.md path.
Add Patterns() method to skillignore.Matcher to expose the original
pattern strings stored during Compile().
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.
Skip entire ignored directory trees during walk instead of filtering
at SKILL.md level. Support root-level .skillignore at source root
for globally muting skills or excluding patterns.
Root patterns checked first (can skip entire tracked repos), then
repo-level patterns. Both layers use filepath.SkipDir for performance.
Ref: #83
- Extract duplicate .skillignore filtering block into isSkillIgnored()
- Use utils.IsTrackedRepoDir consistently in DiscoverSourceSkillsLite
- Fix unchecked os.WriteFile in skillignore test
DiscoverSourceSkills and DiscoverSourceSkillsLite now load .skillignore
from tracked repos and skip matching paths during walk. This prevents
false warnings in doctor/status/list for vendored SKILL.md files
(e.g. .venv/ inside a tracked repo).
Extract shared skillignore package from internal/install so both
install-time and source discovery use the same filtering logic.
copyDirectoryWithState did not skip .git/ dirs, causing collect to fail
on git-cloned repos (e.g. obra/superpowers) — filepath.Walk would abort
on .git pack files, leaving only empty directories in source.
Add copyDirectorySkipGit() variant and use it in PullSkill. Existing
copyDirectory (used by copy-mode sync) is unchanged.
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.
Address code review feedback from PR #67:
- Move all dry-run diagnostic messages (internal/sync) from stdout to
stderr so they don't pollute JSON output
- Suppress UI output (spinners, headers, warnings) in uninstall --json
mode by adding jsonOutput guards across all phases
- Return nil after writeJSONError to prevent dual output (JSON + plain
text error) in install and sync commands
- Handle json.MarshalIndent error in writeJSONError with stderr fallback
- Merge duplicated discovery logic (JSON vs non-JSON branches) in sync,
sync_project, diff, and collect using nullable spinner pattern
- Remove checkRepoDirty alias in status.go, call isRepoDirty directly
- Remove extractJSON test workaround — tests now assert stdout is valid
JSON directly, enforcing the clean-stdout contract