The i18n module guaranteed parity between locales and left the rest to
callers. `t` takes any string, so a mistyped key rendered as the key and
nothing caught it; internal/plugin sends translation keys that nothing
compared with en.json; and about 130 call sites chose between `.one` and
`.other` by hand.
- keys.test.ts reads the dashboard source and fails on a key that is not
in en.json. A key built at run time is checked by its fixed head, and a
string that only looks like a key is named in a short documented list.
- internal/plugin/i18n_keys_test.go fails when a "plugins." literal the
package emits is missing from en.json; the one key completed at run
time lists its values.
- plural(key, count) in the i18n module picks the form, with the same
"exactly 1" split the call sites used, so every rendered string is
unchanged. No locale file changed.
Refs #448
The raw write ratchet listed the os calls of downloadFile,
giteaDownloadFile and cnbWriteBlob. Those now go through
writeDownloadedFile, so the list names that function instead, with the
same clone reason.
The GitHub, Gitea and CNB content API fallbacks wrote every file as
0644, so a skill's scripts lost their exec bit whenever sparse checkout
was not available. The APIs do not report the git mode, so a file that
starts with #! is now written as 0755; anything the kernel could run
directly carries one. The mode is set on both branches, because
O_TRUNC keeps the mode of a file that already existed.
Refs #439
Both schemas reject unknown keys, but plugins, cnb_hosts and
gitea_hosts were missing from both, the global schema also lacked
extras_source and log, and skillEntry had no kind, so editors flagged
valid configs. A test now compares the yaml tags of Config and
ProjectConfig with the schema properties.
Refs #438
Two handlers checked for a project's own config by statting
.skillshare/config.yaml directly, so a project created with
init -p --visible (directory skillshare/) was reported as not having
one, and the MCP page missed its override conflict. Both now ask
projectdir.Find, which the CLI already uses.
Refs #437
Keep bundled CommonJS converters working inside ESM projects. Show concise sync failures with expandable original diagnostics and clarify that the last-sync card covers skills and agents only.
Discovery and the package loads read the tree separately. A nested skill
created in between was published only as a file of its parent, with no
entry of its own. Discover again after the loads and rebuild, up to three
times, until both agree.
The closing --- was matched after trimming spaces, so an indented line,
which is YAML content, closed the frontmatter. It now has to be exactly
---, like the opening one; a CRLF ending is still fine.
Files were checked with Lstat and then opened by path, so one replaced
by a link in between was followed and published. Each read now checks
that the opened file is the one Lstat described, and skips the skill
otherwise.
A parent lists its nested skills' files under the same URIs and was
loaded after them, so a file changed between the two reads had the
nested skill's entry overwritten by the parent's newer digest, and reads
of it no longer matched what the nested skill advertised. The parent is
now skipped for that build and served after the next refresh.
The Streamable HTTP handler had no cross-origin check, so a web page
could call a loopback server that runs without a token. It now uses the
SDK's CrossOriginProtection, which refuses cross-site browser requests
and leaves non-browser clients alone.
Changing the served target rebuilt the command from the dashboard scope,
so editing `skillshare mcp serve -p --target old` in the global
dashboard silently dropped -p; the command now keeps its own flag.
Skill names were trimmed before validation, so a name and directory
padded with the same spaces passed. Names are no longer trimmed, and the
spaces fail the character rule.
Splitting the file into lines cost one string header per line, so a
16 MiB newline-heavy body allocated about 256 MiB per parse. The parser
now scans lines up to the closing --- and keeps only offsets.
The name rules are checked after NFKC, but the directory is the skill
path's last segment, which the Skills extension requires to equal the
name. A fullwidth abc in directory abc passed and was published under
a URI that did not match its name; the comparison is now exact.
The review fixes left the per-file size and digest split across two
packages: a stat-based budget in the walk, a second bounded read in the
catalog, a SKILL.md special case hashed once per file, and the digest
format written out three times. skillpkg.Load now reads every file once
within one package budget and records its digest and size, so the
catalog only maps them, and skillpkg.Digest is the one digest format.
Also: Build settles skills in one deepest-first loop, the skills/list
cursor uses sort.Search, ParseFrontmatterMap splits the file once, mcp
serve names each value flag once, and the migration report is not
called twice in main.
The Agent Skills reference validator accepts lowercase Unicode letters
and digits after NFKC normalization and counts the 64-character limit in
characters, so names such as 技能-審查 or café were skipped although they
are valid. ValidateName now applies the same rules. sync's target naming
shares it and accepts those names too. golang.org/x/text becomes a
direct dependency at the version already in the module graph.
SKILL.md was size-checked and then read whole, so a file that grew in
between was still read into memory; the read itself now stops past 16 MiB.
SKILL.md was parsed, then read again to hash, so a save in between paired
old frontmatter with the new file's digest and size, and hosts that
compare frontmatter against the file rejected the skill. The digest now
comes from the parsed bytes; a later read of a changed file is refused
until the next refresh.
The cursor was an offset, so a catalog rebuilt between pages shifted the
next page when a skill was added or removed ahead of it, repeating or
dropping entries. Skills are now ordered by URI and the cursor is the
last URI returned.
Hashing now stops past the package's remaining size budget, so a file
that grew after the walk is skipped rather than advertised over 16 MiB
or hashed without bound.
The size came from the directory walk and the digest from a later read,
so a file replaced in between was listed with an old size and a new
digest, which verifying clients reject. Both now come from the same read.
The manifest lists no links, so a skill whose SKILL.md is a link was
published without its own file and could not be read. It is now skipped
with a warning.
The Agent Skills reference parser requires the file to begin with ---
exactly, so an indented delimiter no longer opens frontmatter. A CRLF
file still parses.
The catalog is reused for up to 5 s, so a file edited after skills/list
was read live and failed the client's digest check. A read now hashes
what it returns and reports the file as changed when the digest no
longer matches; the next refresh lists it again.
Also: a BOM-prefixed SKILL.md is parsed from the stripped bytes instead
of being skipped, a non-text compatibility is rejected rather than
treated as absent, and an oversized SKILL.md is skipped before it is
read into memory.
The Agent Skills format caps compatibility at 500 characters, and hosts
that validate entries reject longer ones, so serve skips such a skill
with a warning, as it does for an overlong description.
metadata is deliberately not held to the format's string values: lists
there are common, tool-fallback clients read them fine, and skipping
those skills would hide them from every client to satisfy a few.
The first command after an upgrade reports legacy data it moved. For
mcp serve that notice landed on stdout ahead of the handshake, so it now
goes to stderr like serve's other messages.
A SKILL.md that opens frontmatter but never closes it could still parse,
so serve published a file hosts read as having no frontmatter; it is now
skipped with a warning.
A managed project's name may hold spaces, so the Skillshare tab built
`--target my app@claude`, which the save path split into two words and
serve rejected as an unknown target. The command is now joined from
quoted words.
The Agent Skills format caps a description at 1,024 characters, and
hosts validating entries reject longer ones, so serve skips such a skill
with a warning instead of advertising it. The docs list every skip reason.
Size and mtime cannot prove a file is unchanged (cp -p, rsync -t), and a
stale digest makes hosts that verify digests reject the file for good,
so every rebuild hashes every file again; 1,000 skills rebuild in about
140 ms, at most once per refresh interval.
Serve errors now go to stderr: stdout is the protocol stream, and a
startup error printed there is not JSON-RPC.
SKILL.md must begin with its frontmatter, as the Agent Skills format
requires; a later --- block no longer passes.
A root under mcp.projects is served from the global config, where its
project targets (app@claude) live, so the Skillshare tab now offers that
project's targets beside the global ones and saves no -p, which would
fail in a folder with no .skillshare/.
A nested skill skipped for any reason, not only one left unselected, now
skips its parents too: they were settled before the child was validated
and published its files as their own.
Also from review: a skill whose frontmatter JSON cannot carry (a
non-string key) is skipped instead of failing the whole skills/list page;
a listed file with a backslash in its name can be read; and stdio serve
exits 0 on SIGINT/SIGTERM without writing to stdout after the session.
Status, doctor, diff, the dashboard's target and diff handlers and analyze each
repeated FilterSkills followed by FilterSkillsByTarget, and only some dropped
disabled skills first. Routing them through SelectTargetSkills keeps their
answers identical to sync and mcp serve when a selection rule changes.
The callers that did not drop disabled skills get discoveries without them, so
their output does not change.
Agents on a disposable VM, in a hosted assistant or behind an MCP gateway can
reach an MCP endpoint but not the folder skills sync to, so they got tools and
none of the user's skills (#428).
`skillshare mcp serve` is a read-only server for the skills skillshare already
manages. It declares io.modelcontextprotocol/skills and implements skills/list,
skills/get and resources/read: one entry per skill, its URI from the source
path, the full frontmatter, and every file with a sha256 digest and size.
--target applies that target's selection, and the source is reread at most
every 5 seconds so install, update, enable and disable show up without a
restart; unchanged files keep their digest. stdio is the default; --http
serves Streamable HTTP and needs SKILLSHARE_MCP_TOKEN off loopback.
Skills the extension cannot carry are skipped with a warning instead of being
published incomplete: a name that breaks the Agent Skills rules or differs from
its directory, more than 512 files or 16 MiB, or a nested skill that is not
served. --check lists them without serving. The naming rules moved to
internal/skillpkg so sync and the server share them.
Few clients support the extension yet, so the server also offers list_skills
and read_skill tools. A client that declares the extension does not see them,
so it never gets each skill twice.
sync.SelectTargetSkills is the one place that turns discovered skills into a
target's selection (enabled, include/exclude, frontmatter targets).
Refs: #428
The windows-latest runner's TEMP is an 8.3 short path
(C:\Users\RUNNER~1\...), while the product reports the resolved long
path. Four tests compared the short form and failed only on the runner;
the local guest has no short names. Resolve the expected path first.
Refs #344
These packages were left out of the windows-test job because of failures
that came from test assumptions (POSIX paths, permission bits, HOME,
bash shims posing as git), not product behavior. Fix them and add the
packages to the list so they stay green.
Two failures were real product bugs:
- swapStagedIntoSource named its backup like the temp that
sourcefs.MoveIn creates beside it. On a coarse clock (Windows) both
names matched, the failed move removed the temp and with it the
backup, and the old skill was lost.
- MetadataStore.GetByPath looked up OS-native paths in slash-form keys,
so `update --group` missed nested skills on Windows.
The test sandbox now also sets USERPROFILE, which os.UserHomeDir reads
on Windows; tests were reading the real profile.
Refs #344
Reject unsupported client registration values and CIMD client or callback conflicts before syncing invalid settings to Pi. Keep dcr and custom Pi options supported, identify the legacy codemode alias, and document current Pi launch behavior.
Ten tests assumed POSIX behaviour:
- Five asserted os.ModeSymlink, but Windows links with a junction;
check utils.IsLinkMode instead.
- Two used `/abs/...` as an absolute path, which has no volume on
Windows; give the fixtures one.
- Windows has no permission bits to preserve, so the 0600 check is
skipped there.
- Reading a file as a directory reports not-exist on Windows, which
prune ignores, so that prune-error test is skipped there.
- A single-file extension relies on the shebang and the executable bit,
so ListExtensions finds only directory extensions on Windows, as the
extras docs describe.
Add ./internal/sync and ./internal/trash to the windows-test package
list so they stay green.
Refs #344
Three link tests assumed POSIX behaviour:
- alias/../checkout is resolved lexically on Windows, before the alias
is followed, so the traversal case cannot hold and is skipped there.
- Windows drops `..` when it creates a relative symlink, so the expected
link text is cleaned first.
- Windows stores `assets/note.txt` as `assets\note.txt`, so the nested
link target is compared in slash form.
Refs #344
A junction cannot point at a UNC path; mklink /J exits 1 for one. The
reparse-point API would instead write an unusable mount point, so return
an error up front and leave nothing behind, as mklink did.
Refs #420
With winsymlink=0 Go reports a junction as ModeSymlink instead of
ModeIrregular, so IsJunction returned false and the trash fallback
recreated the junction with os.Symlink again. Read the reparse tag for
both modes.
Refs #420
The junction substitute name is an NT path (\??\C:\x). A target given as
a Win32 extended path (\\?\C:\x or \\?\Volume{GUID}\x) kept its prefix,
so prepending \??\ produced an invalid name and the junction could not
be read through. Swap the prefix instead of stacking it.
Refs #420
The previous commit moved junction creation onto os.Mkdir and os.Remove
inside CreateJunction. The raw-write ratchet lists every such call, so
record them with the same reason as the neighbouring link helpers.
Refs #420
Quoting the paths for `cmd /c mklink` stops `&` from splitting the
command, but cmd.exe still expands `%VAR%` inside quotes, so a path with
a token such as `%TEMP%` pointed the junction somewhere else or failed.
Create the directory and set its mount-point reparse data with
FSCTL_SET_REPARSE_POINT instead. No shell parses the paths, which also
removes the need for quoting. Like mklink /J it refuses an existing
link path, and it removes the directory it made if setting the reparse
data fails.
Refs #420
CreateJunction passed both paths to `cmd /c mklink` as plain exec
arguments. Go quotes an argument only when it has whitespace, so a path
with a cmd metacharacter such as `&` was split into a second command:
the junction was not created, and a crafted name could run a command.
Build the command line ourselves and quote both paths. A Windows path
cannot contain a double quote, so the quoting cannot be broken out of.
The regression test uses unspaced paths with `&`, which fail without
this change.
Refs #420
When the skills source and the trash live on different volumes, the
cross-device fallback in moveLink and copyDir recreated a Windows
junction with os.Symlink. That needs Developer Mode or elevation, which
the junction was chosen to avoid, so `unlink` and `trash restore` could
fail after `link` had succeeded.
Recreate a junction as a junction through a shared helper, and keep the
original link in place when creation fails. CreateJunction moves from
internal/sync to internal/utils so trash can reuse it.
Refs #420
POST /api/source-links with enable: true left the new link in the source
when the config could not be saved, so the dialog reported a failure the
filesystem did not match and a retry failed with "already exists". Share
one sourcelink.Discard rollback between the CLI and the handler.
Update checks compare the source digest, not the version, so a repo that
pushes commits without bumping its manifest (ponytail ships dozens a day)
showed "4.12.0" with an Update button and looked like a stuck update.
Check now returns the source commit, and the version tag adds
"old → new" commits when the version itself did not move.
sourceLinks were built before discovery ran, so a target readable at its
root whose subtree failed during traversal stayed available: true with
no warning while sourceLinkWarnings already reported it as incomplete.
Build the items after discovery and treat a recorded skip as unavailable.
Rewrite frontmatter as bytes and read and write target assignments through sourcefs with the discovery follow policy. Refuse nested SKILL.md links with per-skill batch errors or HTTP 400 while regular followed skills remain editable and outside files stay unchanged.