Bare `skillshare install` already restores everything .metadata.json records
but the disk lacks, yet the dashboard could only re-clone missing tracked
repos through a separate rehydrate path. Expose the CLI's install-from-config
flow instead (GET /api/install/missing, POST /api/install/from-config) so both
surfaces share one detection and one installer, and drop the old
missingTrackedRepos plumbing from update responses.
The install summary now counts tracked repos and their skills apart from
standalone skills, since "Installed 1 skill" hid a whole repo. New tracked
repos are named `_<owner>-<repo>` so two `skills` repos no longer collide;
existing installs keep their names. `check` passes the stale status through
so the dashboard can offer to prune skills deleted upstream.
Codex review of #481 round two: POST /api/update looked up an exact skill
with the raw name before resolving a repo. The shared helper now accepts
`org/team/`, so with a skill at org/team beside org/_team the raw lookup
missed the skill and the shorthand updated the repo. Clean the name once
at the top of updateSingleByKind so the skill lookup and repo resolution
see the same name.
Codex review of #481 found three problems with the shorthand change:
- `update org/team -p` and the dashboard stream updated the org/_team
repo even when a skill exists at org/team, which used to win because
the shorthand was not rewritten there. FindTrackedCheckoutUnlessSkill
skips the nested shorthand when a directory exists at the typed path;
plain names keep their repo-first behavior.
- Global `update team/` cleaned the name for repo matching but not for
skill matching, so it silently updated `_team` instead of reporting the
skill/repo collision that `update team` reports. resolveByBasename now
cleans the name once for both.
- The update.md example sits in the Project Mode section but lacked -p
(also in the four translations).
Keep exact checkout lookup first, but permit legacy basename metadata only when its group matches the checkout parent. This prevents unrelated sibling adoption while preserving custom source, branch and hashes during migration; add a regression for the Codex P2 finding.
A repo installed with `--track --into org` lives at `org/_team`. Only
POST /api/update accepted `org/team`; the dashboard stream and
`update -p` prefixed the whole name (`_org/team`), and global `update`
compared the full name with the basename, so each reported not found.
Move the candidate rule (the name as typed, then `_` added to the last
segment, never leaving the source root) into install.FindTrackedCheckout
and the basename match into install.MatchTrackedRepos, and use them from
the single update, the stream, project and global CLI update. A shorthand
resolves to its own `org/_team`, never to a top-level `_team`; plain names
and full paths keep their behavior.
Prevent nested tracked repositories from borrowing and migrating a top-level entry with the same basename. Preserve GetByPath fallback for ordinary skills and cover persisted metadata across two reconcile passes.
#474 made install.IsTrackedCheckout (a _-prefixed git repo) the rule for what
a tracked repo is, but several paths still treated any git checkout as one, so
the same directory was classified differently depending on the entry point. An
unprefixed checkout, including a submodule or worktree whose .git is a file,
could be pulled as a tracked repo from the dashboard batch stream, the CLI
--group and project-mode name resolution, and the dashboard single update's
direct-path lookup, and reconcile wrote tracked: true for it.
All of them now use IsTrackedCheckout, so an unprefixed checkout updates as a
regular skill or is skipped, while _-prefixed repos, including --into repos
such as org/_team, still update as tracked repos.
Reconcile no longer registers an unprefixed checkout as tracked or creates an
entry for it from the git remote. An existing entry that an older reconcile
flagged tracked on such a checkout is kept with its source and branch; only the
flag is cleared on the next reconcile, so no user data is removed.
Fixes#476
Track phrase exclusions as built-in rule metadata so a full custom regex replacement retains normal whole-line exclusion behavior. Keep phrase exclusions when only severity or enabled state is overridden.
Add raw-content and Markdown regression coverage. Verified with make check, four CLI E2E steps, the five-locale website build, and the context-router check.
With --into repos from #472, org/_team and a top-level _team can share a
basename. When org/_team had no entry of its own, the root-skill hash
refresh found _team's entry through GetByPath's basename-only fallback and
overwrote its hashes, which later broke _team's integrity and up-to-date
checks. The refresh now only touches the repo's own entry (exact key, or a
legacy basename key with the matching group).
resolveTrackedRepo built the prefixed --into candidate with filepath.Join,
so on Windows the dashboard result came back as org\_team while #472 made
every other repo name slash-form, and the UI could not match the row.
Parse complete Markdown source without HTML blocks for shell analysis so blank lines inside raw HTML cannot split taint flows. Retain rendered context separately for SDK severity decisions. Normalize tab-separated fence metadata with strings.Fields so shell blocks remain auditable. Cover both regressions in unit tests and the CLI runbook.
Resolve the conflict in getTrackedReposImpl by keeping both sides: the
IsTrackedCheckout rule from this branch and the slash-form paths #472
returns for --into repos (org/_repo). Add a GetUpdatableSkills test for a
rewritten --into checkout next to a top-level one.
Avoid blocking legitimate Markdown SDK parameters and ambiguous disclosure advice by default while retaining visible HIGH findings and strict-policy gating. Preserve explicit concealment, custom severity overrides, and shell dataflow coverage in HTML and comments. Add regression coverage and document rule-ID compatibility.
Simplify and code-review passes over #474 found the fix spread over
several definitions of "tracked repo" and three holes in the repair.
One install.IsTrackedCheckout (a _-prefixed git checkout) now backs
GetTrackedRepos, GetUpdatableSkills, the dashboard routing and the repair.
GetUpdatableSkills skipping such entries replaces the two CLI resolver
filters, so `skillshare check` and the dashboard Updates tab no longer list
a rewritten repo a second time as a regular skill. The repair checks that
one path instead of walking the whole source tree.
- Reconcile sets tracked on a checkout again without dropping type or
repo_url, so a rewritten entry that went through it was never cleaned.
The repair now also runs when those regular-install fields remain.
- The repair used GetByPath, whose basename fallback can return another
top-level item's entry; it now uses the repo's own key.
- A tracked entry whose checkout is gone fell through to the basename
fallback of resolveTrackedRepo and pulled a different repo with the same
basename. It now reports the repo as missing on disk.
The old dashboard update rewrote a tracked repo's metadata entry as a
regular install: tracked was dropped and type, repo_url and version were
added. Those repos stayed broken after the routing fix, because
`skillshare update <repo>` found the name twice (as a repo and as a
regular skill) and refused it, and nothing restored the entry.
The shared tracked-repo update now restores such an entry to what
install --track records (source, branch, group, tracked) when its path is
a checkout GetTrackedRepos lists, so regular skills are never touched.
CLI name and glob resolution skip a regular-skill match whose path is
already a tracked repo, so the update can reach that repair.
Codex review: the routing fix sent every git checkout with metadata to
the tracked-repo update, including standalone skills installed as a full
checkout, whose regular update records the new version and commit.
Their version stayed stale and update checks kept reporting an update.
Only tracked entries and _-prefixed checkouts now skip the regular path.
A tracked repo's own metadata entry carries a Source, so updateSingleByKind
sent it to updateRegularSkill. The reinstall reported isRepo false and
rewrote the entry without tracked: true, after which `skillshare update
<repo>` found the name twice (as a repo and as a regular skill) and refused
to update it. Route tracked entries and git checkouts to the tracked-repo
update before the regular-skill branch.
Closes#473
The CLI removed any skill or folder inside a tracked repo on its own:
`skillshare uninstall _team/foo` moved the skill out of the repo's
checkout, and `_team/vendor/_lib` (a submodule) was even treated as a
tracked repo because the CLI marks every git checkout as one. Either way
the repo was left dirty for the next update. The dashboard already
refused single skills inside a repo, but the rule lived only in its
handler.
The rule now lives in internal/uninstall, which both the CLI and the
dashboard go through: an item below a "_"-prefixed git checkout fails
with ErrInsideRepo in Preflight and Run, even with --force. A followed
source link is the user's own checkout, so skills below it can still be
removed one at a time.
The uninstall reference documents the rule and how to name a repo
installed with --into, with ja/ko/zh-Hans/zh-Hant translations.
Batch uninstall treated any name whose last segment starts with "_" and
is a git checkout as a tracked repo. A submodule such as
_team/vendor/_lib inside a tracked repo matched, so the dashboard could
move it out of the repo's checkout, leaving the repo dirty for update.
The fallback for "_"-prefixed names had the same hole before --into
support. --into folders cannot start with "_" (validate.IntoPath), so a
repo name may have "_" only in its last segment; both checks now use
that rule.
Also, the list TUI gave the root skill of an --into repo (RelPath equal
to RepoName, e.g. org/_team) the group "org"; it now has no group, like
a top-level repo's root skill.
Codex review of #472 found three views still deriving a skill's repo
from the first path segment:
- Skill counts in `list`, human-readable `status` and the dashboard
overview matched `<repo>/` prefixes, so an `org/_team` repo whose only
skill is its root SKILL.md counted zero, and `status` disagreed with
`status --json`. They now compare RepoRelPath with the repo name.
- The list TUI took the group as the second path segment, so a skill at
org/_team/skills/vue got group `_team` instead of `skills` and the
`g:` filter missed it. The group is now the first segment below
RepoName. Test fixtures that used a RepoName unrelated to RelPath now
use the repo path, as real entries do.
- The dashboard tree treated only top-level `_` folders as repo roots,
and merged `org / _team / skills` into one row, so an --into repo had
no update or uninstall actions in Tree view. buildTree now marks repo
roots from each skill's repo path, and a merged chain stops at one.
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.
Batch uninstall now accepts nested repo names such as org/_team. If org
is a link that the follow policy does not follow, the name resolves to a
repo outside the source. uninstall's sourcefs move-out check already
refuses it; this test pins that boundary so a later change to name
resolution cannot remove a repo outside the source.
`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
Tracked repo metadata is keyed by the repo directory (e.g. "_skills"),
but skills inside the repo are discovered with their full path
("_skills/skills/engineering/tdd"). The lookup found no entry for them,
so /api/resources returned an empty source and the dashboard's update
cards showed "tracked" without owner/repo. Repos whose SKILL.md sits at
the root matched the key directly and looked fine, which is why the
issue appeared to correlate with partial clones.
Nested repo skills now fall back to the repo's tracked entry. They also
ignore a bare-basename match, which GetByPath keeps for legacy short
keys but which can belong to an unrelated top-level skill of the same
name. GetByPath itself is unchanged because update, uninstall and check
depend on its current behavior.
Fixes#467
An empty or cache folder in claude's skills folder was reported as a
skill OpenCode loads, and any same-named path in OpenCode's folder hid
a real one. OpenCode loads only folders with SKILL.md, so check for it
on both sides.
Refs #458
configProjectRoot matched only <root>/.skillshare/config.yaml, so a
project that keeps its config in the visible skillshare/ folder was
treated as a global config and its MCP saves skipped the project
boundary entirely, config.yaml included. Match every project config
folder name through projectdir.IsName.
A project config can name any YAML file in sources.mcp. A cloned
repository could point it at a file outside the project, such as the
global config or the global MCP source, and the next project-mode MCP
change or 0.23.0 migration rewrote that file. Saves now check the
external source against the project root, as config.yaml already is.
Reading a shared file outside the project still works.
The check also needs the right root. Deriving it from the external
file's path would accept a sibling of the project, so the root is now
passed in. A global config acting for a project in mcp.projects is no
longer treated as a project config, so a dotfile link to it keeps
working instead of being refused.
The leak check compared only source skills, so a skill the user keeps
in ~/.claude/skills (which merge mode preserves) passed as harmless,
although OpenCode loads it. Read the writer's folder too and count
entries sync did not put there and OpenCode's own folder lacks.
The wording no longer says these skills are left out by filters, and
the suggestion asks to sync them to opencode, which fits both causes.
Refs #458
disabled_by_env keyed env switches by path, so OpenCode's lists were
written twice (global and project) and every key had to match a path
listed above it, guarded only by a test. Each entry now holds a
folder's global path, project path and off_when_env together.
The loader expands entries into the same global/project lists as
before; a dump of all 79 targets is identical, order included.
Refs #458
The rule that OpenCode loads one skill per name lived in a Go map
while its other facts (also_scans, disabled_by_env) live in
targets.yaml. Move it there as one_skill_per_name so a newly verified
runtime needs only a data change.
Also fold doctor's two cross-target warning branches into one, so the
leak and generic messages cannot drift apart, and reuse cmp.Or for the
symlink-mode check.
Refs #458
With OPENCODE_DISABLE_CLAUDE_CODE_SKILLS set, OpenCode does not read
.claude/skills, yet doctor still warned that skills leak in through
it, so a user who had already fixed the leak could never clear the
warning.
Record in targets.yaml which environment variables turn off each
also_scans folder and skip those folders in RuntimeScanPaths when a
variable is true in skillshare's environment, read the way OpenCode
reads it. doctor, sync, the dashboard and readsFrom then agree, and
doctor says which variable caused the skip, because OpenCode may run
with another environment. The doctor hint now comes from the same
table.
Refs #458
A symlink-mode target folder is the source itself, so it also exposes
skills that .skillignore hides. Doctor, sync, and the dashboard pass
discovery results without those skills, so a symlink-mode claude
target looked harmless to OpenCode even when OpenCode loaded an
ignored skill through it. Treat that pairing as unknown and keep the
previous warning, unless OpenCode links the source as well.
Refs #458
OpenCode loads skill files concurrently, so which copy of a name wins
is not fixed; its own folder does not reliably win. A source skill
synced to both folders is harmless anyway because both copies have
the same content. Count only source skills in OpenCode's folder, so a
local skill there no longer marks a same-named skill from another
folder as already present.
The comparison used each target's filtered selection, which skips the
target_naming: standard validation and collision handling sync applies.
When two skills named dev collide in OpenCode's standard folder, sync
writes neither there, yet a claude target filtered to one of them
still delivered it to OpenCode and no warning appeared. Use the
resolved skills that sync writes instead.
Refs #458
OpenCode reads .claude/skills and .agents/skills first and its own
skills folder last, keeping the last skill of each name. A skill synced
to both opencode and claude therefore loads once, yet doctor and the
sync summary warned on every setup with both targets, with no way to
silence it.
The real effect is different: skills kept out of opencode by targets:
or include/exclude still reach it through another target's folder.
For opencode, count only those skills, name them in doctor, and point
at OpenCode's OPENCODE_DISABLE_CLAUDE_CODE_SKILLS and
OPENCODE_DISABLE_EXTERNAL_SKILLS. Other runtimes keep the old check
until their rule for same-named skills is verified.
Refs #458
The containment check appended a separator to the project root. For a
project at / or C:\ the root already ends with one, so the prefix became
// or C:\\ and every save of that project's config was refused as
linking outside the project.
The legacy target migration wrote to the predictable path
config.yaml.tmp next to the validated destination. A cloned project
could ship that name as a symlink to a file outside the project, so
merely loading the project overwrote the outside file and the rename
then replaced the project config with the link.
Create the temp file with os.CreateTemp in the destination directory,
which never follows an existing name, and remove it if any step fails.
PUT /api/config wrote the raw editor content with os.WriteFile, which
follows a symlinked config.yaml. In project mode a link to a config
outside the project was overwritten, bypassing the boundary the other
config writers now enforce. Route this write through ConfigWritePath
and answer 400 with the link named.
ConfigWritePath followed only one hop of a dangling link and resolved
only an existing parent directory. A project link to an in-project
link pointing outside, or to a missing file under an in-project
directory link that leaves the project, passed the containment check,
and the save then wrote or created the file outside the project.
Follow every link of a dangling chain, with a hop limit, and resolve
symlinks in the longest existing prefix of each path so a missing
directory cannot hide an escaping link above it.
Saves follow a symlinked config.yaml to its target so dotfile links
survive. For a project config that also lets a cloned repository point
.skillshare/config.yaml at any file the user can write, including one
that does not exist yet, and every project save, plugin change, hooks
change, MCP change, or legacy migration would then rewrite or create it.
All five writers now resolve the destination through one helper,
utils.ConfigWritePath. A global config keeps writing through its link.
A project config must resolve inside its project; otherwise the save
fails and names the link so the user can replace it with a regular
file. The one-time legacy migration skips persisting instead, and the
next save reports the link.
FoldHomePathWith writes ~\plug on Windows and a bare ~ for the home
directory itself, but canonicalSource only expanded ~/, so with
preserve_tilde_on_save those sources came back relative on the next
load and update or sync could not resolve them.
When config.yaml is a symlink whose target does not exist yet, as a
dotfiles manager may create before first use, EvalSymlinks fails and
the save renamed over the link again. Follow the link to its intended
target so the first save creates that file, as Config.Save already does.
Refs #460
Plugin saves wrote a temp file next to config.yaml and renamed it over
the path. When config.yaml is a symlink into a dotfiles folder, the
rename replaced the link with a regular file, so the shared config
never received the change and the machine silently forked. The plugin
writer also skipped preserve_tilde_on_save, saving sources as absolute
home paths. The one-time legacy target migrations for global and
project configs used the same temp+rename and replaced links as well.
Plugin sources were compared as raw strings. The snapshot owner marker
records the absolute path from add, so a config that spells the same
folder as ~/... failed every update with "snapshot ownership conflict".
For Agents whose snapshot location hashes the source, the new spelling
silently created a second snapshot instead.
Resolve the symlink before writing, normalize sources once where the
plugin section is decoded so owner checks and snapshot paths agree,
and fold sources back to ~ on save when preserve_tilde_on_save is set.
Refs #460
Refs #461
The CLI and dashboard update a tracked repo through update.TrackedRepo,
which never looked for submodules. A pull that turned a skill directory
into a submodule reported success and the skill vanished on the next
sync. TrackedRepoResult now carries the skipped-submodule warnings and
both callers show them.
Refs #433
CLI search results install a repo-root skill through installFromGit without discovery, so the skipped-submodule warning has to come from that path too.