ac4af582301a4e8a29245dbba767eba31334ddf9
11
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
77bda84a6f |
library: a check offers the skills a git repository or folder added since
refeccd (Discord): skills added from a repository or a folder only had
the existing ones updated; ones the source added later never reached
the library. GitHub sources already had this (findNew); git repositories
on other hosts and folders on this machine did not, and a folder install
didn't even remember the folder it came from.
- git: when ls-remote gives the ref a head, findNewGit reads the fetch
the check shares and offers skills under newBase that the library
doesn't have and hasn't offered. Once per head while its finds are
kept (gitLooked). The address is kept as the library has it (.git and
all), so an Add lands on the same repo@ref key.
- folder: an install from a folder now records "folder:<path>" in
SeenSkills (offered), which is how the library knows where to look
again. findNewFolder reads it as Add from folder does and skips a
folder the library links, has offered, or has a skill by that name of.
- A check never adds or writes a skill: each is offered with Add and
Ignore, as GitHub's are. A skill the user removed or set aside isn't
offered again, and a folder edit is never written over.
- View.CheckFolders shows Check for updates with only linked skills and
makes checkDue true; its title says it looks in folders too. A find's
row shows its folder (pathLink) or git address. The old head note
("on GitHub beside skills you have…") is gone; the new title is in all
five languages.
- docs/subsystems/library.md says so.
Old data: a folder added before this kept no folder: key, so it is
looked in only after the user adds from that folder once more (the
picker then lists the new skills, and the install records the folder).
Run (mote, at
|
||
|
|
b0361f7850 |
skills: a routing SKILL.md beside the skills it routes to hides none of them
Adding skills from zhaoxuya520/reverse-skill listed one candidate: its skills folder holds a SKILL.md of its own, reverse-skill-router, an entry that routes to the skills beside it, and the search stopped there. The ~50 skills under it (skills/apk-reverse, skills/ ida-reverse, ...) were all hidden behind it, from the repository's root, from its skills folder's page, and from the check for new skills (#4572). Cause. candidates() (skills.go) lists a folder with a SKILL.md and stops there, and skillDirsIn() (skillnew.go) drops a folder with a SKILL.md that sits inside one. The stop is right for a SKILL.md kept inside a skill — dbs-save/inner in dontbesilent2025/dbskill is part of dbs-save, not a skill of its own (TestCheckSkillsFindsNewOnes) — but a skills folder that is a skill and a collection at once is both, and one file swallowed the whole subtree. Change. A folder with a SKILL.md that holds several skills under it — two or more folders directly beside its own with a SKILL.md of their own — is a collection with a router: it is listed, and the walk goes on below it. A lone SKILL.md inside another skill stays swallowed, as before (skills/pentest-tools/src-hunter in the same repository, one folder deep, is none of its own). The same rule now lives in skillDirsIn(), so the check for new skills reads a tree the way the probe reads a folder: a collection lets its skills through, and its router is offered beside them. The new test lays out the repository's shape: a router, two skills under it, and a skill holding a lone SKILL.md one folder deeper. The repository's root and its skills folder both offer the router and the skills, and the tree side agrees; without the fix each lists the router alone. Issue #4572 Generated-by: GLM-5.3-Flash (ZCode) Broken by hand: with the skills.go and skillnew.go hunks reverted, TestRepoWithARoutingSkillListsItsSkillsToo is red on all three sides (candidates [skills], skills in the tree [skills]). TestCheckSkillsFindsNewOnes (dbskill's lone inner SKILL.md) stays green in the full run. |
||
|
|
20482d71ff |
library: a skill by a name the library has from elsewhere goes in beside it
mora1n on Discord: anthropics/skills' skill-creator and openai/skills'
are two skills by one name, and only the first could be added; the
second was skipped as "another skill called skill-creator, left as it
is". The library keyed being had by name in every place that asked.
Now being had is decided by source (hadSkill): the same source under any
name here, or a skill with no source (taken in from an agent's folder)
by that name with the very same files. Another skill from GitHub or a
git repository whose name is taken goes in beside it as
<name>-<owner> (skill-creator-openai), then owner-repo, repo, a number,
at most 64 bytes (freeSkillName in skill_beside.go). The library's copy
of its SKILL.md gets that name in the front matter's top-level name:
line (nameSkill), so no agent sees two skills by one name; Skill.Called
keeps the name it came with, and the carried bundle carries it. Its hash
is of the renamed copy, and checks (GitHub and git) and updates compare
what they fetch renamed the same way (fetchedHash), so it doesn't read
as edited and an update keeps the name.
The class: probe (Candidate.Have now means this skill; Candidate.As is
the name it has or would get), installFrom (listed and unlisted folder
by that name), the new-skills check (no longer drops a skill because
its name is taken), the market's had check (by name only for a skill
with no repository: none or a folder), carry, the TUI's probe list and
the GUI's probe list ("adds as {name}" with why in its title, "In the
library as {name}"; zh, zh-TW, ja, de; the tag is cut short in its row).
Old data: nothing is renamed. A skill already in the library keeps its
name, folder, SKILL.md and agent links; library.json without "called"
reads as before. Only a skill added from now on can get another name.
Not changed: a folder of the user's own is linked as it is and its
SKILL.md can't be named apart, so one by a taken name is still skipped,
now saying to rename it in its SKILL.md; and an agent's own skills
folder still holds one skill per name (an agent's own skill by the
library's name is settled by Use library / Keep agent's as before).
Run (mote, at c6fd4b37c on origin/main
|
||
|
|
033b17bafe |
library: every skill named in another script is listed, under its folder's name
|
||
|
|
33ccc61884 |
library: one market skill from a huge repository installs alone; GitHub's file list is never cut (#2794)
Adding clean-code from sickn33/agentic-awesome-skills in the market failed with "GitHub's list of sickn33/agentic-awesome-skills's files wasn't understood: unexpected end of JSON input" (CaiusLuo; stablyai/ orca the same, ye4241). The repository's download is over 200 MB, so its skills are fetched file by file from GitHub's list of its files (#1941), and that list is 11.3 MB: apiGet cut every answer at 8 MB and dropped the read's error, so JSON was handed a cut-off body. From ye4241's patch on the issue (made on |
||
|
|
6b3ee5a03b |
library: a repository that keeps its skills again under a plugin's folder lists each once (碳碳双键 on Discord)
tw93/waza keeps its eight skills in skills/ and again in plugins/waza/skills/. Some of the plugin copies lag the top ones. Typing "tw93/waza" in Library → Skills listed "16 skills", each one twice. unhiddenFirst only folded a copy in a hidden folder (.claude/ skills, #1964) into the unhidden one; two unhidden copies both stayed. It now keeps one copy of each skill. It prefers the copy outside hidden folders, then the one fewest folders deep, then the first. That covers both candidates (the probe and install) and skillDirsIn (the new-skill check). Run: - TestRepoWithAPluginCopyListsEachSkillOnce uses waza's real paths. Against the old skills.go it is red (9 lines: 16 candidates, the plugin's descriptions, 16 tree dirs); with the fix it is green. TestMarketInstallsASkillKeptInClaudesFolder (#1964) is green too. - Real use: ProbeSkills("tw93/waza") against GitHub in a sandbox HOME lists skills/check … skills/write, 8 in all, each once. - gofmt -l clean; go vet -tags nogui ./... clean for darwin, linux and windows. - Full suite: go test -timeout 45m ./... at load average ~115 (other sessions' suites). 63 packages ok. internal/agent and internal/gateway timed out at 45m with no test hung (TestOpenCodeAndCrushKeep… and TestStrictAffinity… had each run 0s), and go list -deps shows that neither imports internal/library. internal/gui's TestPanelJoinsFullScreenSpaces is #2450, red on main already. |
||
|
|
776c255f56 |
library: a market skill kept only in a repository's .claude/skills installs (#1964, UFO404)
The market lists ui-ux-pro-max from nextlevelbuilder/ui-ux-pro-max-skill, whose SKILL.md is only at .claude/skills/ui-ux-pro-max. candidates() skipped every hidden folder, so the install said "has no skill ui-ux-pro-max any more". candidates() now looks into a hidden folder only for its skills folder (.claude/skills, .agents/skills, .codex/skills ...), the same agent folders the skills CLI behind skills.sh reads. A skill found there that the repository also has outside hidden folders (that repo keeps brand, design, slides... in both .claude/skills and cli/assets/skills) is listed once, as the one outside, as the skills CLI does by name. skillDirsIn, which the new-skills check reads from GitHub's tree, follows the same rule, so the two paths agree. A hidden folder that isn't an agent's skills folder (skills/.hidden, .claude-plugin/x) is still skipped. TestSkillsFromATooBigRepository (#1941) expected hindsight's own .claude/skills/ship-it to be left out; it is listed now, as the skills CLI lists it. Run: - TestMarketInstallsASkillKeptInClaudesFolder, with the repository's real paths. On the old code it fails with "has no skill ui-ux-pro-max any more". Turning off the de-duplication and the skills-folder rule by hand each turns it red. - A throwaway test (not committed) installing ui-ux-pro-max from the real GitHub repository in a sandbox HOME: installed, candidates are the six cli/assets skills plus .claude/skills/ui-ux-pro-max. - go test ./internal/library (nogui), gofmt -l, go vet for darwin, linux and windows. Not tried: the GUI Market page itself. |
||
|
|
4794de398e |
library: a skill installs from a repository too big to download whole, by fetching only its skills' folders (#1941, Goalonez)
What changed: fetch still downloads a repository as one codeload
tarball first. When its files pass the 200 MB limit (untar's errTooBig),
it now falls back to fetchSkillFiles: one request to GitHub's API for
the repository's file list (git/trees?recursive=1), then every file in
a folder with a SKILL.md, from raw.githubusercontent.com, each checked
against the git hash the list gives. The repository's folders are made
empty, so candidates, origin, a probe of a subfolder and an update check
read the result as they read a whole download. The 200 MB limit now
applies to what is actually fetched: skills that are themselves over it
still say so. A private repository's files come from the API's
git/blobs with the Settings token (it never goes to raw). A repository
found too big is remembered for the run, so the install after its probe,
and update checks, don't download 150 MB again before falling back.
gitTree's entries gained mode, sha and size (named gitEntry).
Why: vectorize-io/hindsight keeps its skills (a few hundred KB) beside
an app; its tarball is 188 MB gzipped, 253 MB unpacked, so any skill
in it failed with "the repository is too big to install skills from".
What was run:
- Real repo, sandbox HOME, no token: on the old code ProbeSkills
("https://github.com/vectorize-io/hindsight") fails with "too big"
after 34s. With the fix it lists all 15 skills (skills/*, the
integrations' skills; .claude/skills hidden as before) in 32s, and
installing skills/hindsight-docs writes its 160 files, the same count
GitHub's tree lists.
- New TestSkillsFromATooBigRepository and
TestTooBigRepositoryChecksWhatArrives (httptest stand-ins for codeload,
the API and raw, laid out as hindsight is, paths and tree entries
from its real listing). With the fallback taken out both fail with
"the repository is too big to install skills from (over 200 MB)".
They check raw is never asked for a file outside a skill, codeload
is asked once across two probes, a file that doesn't match its hash
is refused, and skills over the limit themselves still error.
- go test -tags nogui ./internal/library (ok, 141s); -race -count=10
-run TooBig (ok); gofmt -l clean; go vet, GOOS=linux and
GOOS=windows go vet -tags nogui ./internal/library clean.
Not tried: a private repository over the limit against real GitHub
(covered only by reading: raw 404 -> git/blobs with the token).
|
||
|
|
9dc0121f90 |
library: installing a set of skills skips the ones in the way and installs the rest; the toast names the ones already in the library and the ones skipped (lc on Discord: 安装skills的时候,没有跳过已经安装的)
installFrom stopped the whole set at the first skill whose name was taken,
and returned before change saved library.json. The folders it had already
copied for the skills before that one stayed in the library's folder,
unlisted. Every later try then failed on the first of them with "the
library's folder already has a caveman-commit in it".
Now each skill is installed on its own (InstallSkills, InstallMarketSkill
and AddNewSkills, through installChange):
- the library lists it from the same source: had already (Result.Had),
nothing written, so the user's edits stay;
- a folder in the library's folder holding exactly its files (not a link,
sameTree, which counts a failed read as different): listed where it is,
as had;
- another skill by that name, listed or only a folder, or a folder that
can't be read: left as it is, in Result.Skipped with why;
- the rest are installed (Result.Installed). Only when nothing was
installed or had does the change fail, with the first reason.
The GUI's toast and the TUI's line say how many were installed, the ones
already in the library and each one skipped with why.
Verified (temp HOME, pinned caches):
- go vet -tags nogui ./internal/library ./internal/tui ./internal/gui .;
GOOS=windows go build and GOOS=linux go build -tags nogui of
internal/library and internal/tui: clean
- go test -tags nogui ./internal/library ./internal/tui ./internal/gui: ok
- with the old skills.go, market.go and skillnew.go, TestInstallSetSkipsOneInTheWay,
TestInstallListsItsOwnLeftoverFolder (fails with lc's exact "the library's
folder already has a caveman-commit in it") and
TestInstallSetSkipsAnotherByTheSameName FAIL; TestSkillsFromGitHub's
reinstall now asserts Had
- skill-install-skip.test.cjs (Chromium + WebKit, en and zh at 440px) fails
on the old library.js ("status ok", no names) and passes now; with
gui-ja, gui-de and 11 library GUI files, 99/100 passed, and the one that
failed (by-agent, Chromium, at load average ~150) passes 3 times in a row
in both engines when run alone
- not tried in the real app, or with lc's library
|
||
|
|
bb8a3e3025 | library: a skill or server switched off for every agent is saved with "agents": [] not null, a check's finds beside skills on no agent come with [] too, and the Library page draws a find without its agents and says why when it can't draw a check's reply, where it threw on n.agents and went blank after Check for updates (#1217) | ||
|
|
92469ee9f9 |
library, gui: a check for updates lists the skills a repository added beside the library's skills from it, to Add or Ignore (Raven on Discord)
Raven: "check for updates" only updated skills already in the library; when
dontbesilent2025/dbskill or mattpocock/skills adds a skill, magpie never said.
CheckSkills now asks GitHub's git trees API once per repo@ref (ETag-cached, a
304 is free) and only when a skill folder under the installed skills' common
folder (newBase) is neither in the library nor already offered does findNew
fetch the tarball for names and descriptions. library.json's seenSkills keeps,
per repo@ref, the paths the install picker showed and the ones set aside, so
an offered skill is offered once. The Skills page shows them under "Also in
their repositories" with Add (to the agents that have the repo's other skills)
and Ignore, plus Add all / Ignore all (/api/library/skills/{add-new,ignore-new}).
Verified: TestCheckSkillsFindsNewOnes (fake repo: nothing offered after
install, no tarball on a second check; two added skills offered, a nested one
and a .wip one not; Add installs with the repo's agents; Ignore keeps it out
on the next check via 304; remove clears) fails without the change (no
NewSkills / findNew) and passes -race -count=10; TestNewBase. A real run in a
sandbox HOME against GitHub: tdd from mattpocock/skills/skills/engineering
offered its 19 siblings; dbs from dbskill offered nothing (the picker showed
all), 33 with seenSkills wiped, and Add installed dbs-action. GUI:
skill-new-in-repo.test.cjs (Chromium+WebKit, 860/440px, en+zh) fails on
main's library.js and passes; gui-ja, gui-de, click-scroll, library-items,
every-skill, pick-skills, import/remove-all-skills, skill-groups,
skill-repo-groups, github-token, library-all pass. -race on library, gui,
tui; gofmt, vet, darwin/linux/windows builds.
|