ac4af582301a4e8a29245dbba767eba31334ddf9
8
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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. |
||
|
|
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).
|
||
|
|
7b121eabc3 |
library tests: skillnew_test.go's imports are gofmt'd (Gofmt red on main since bb8a3e30, run 37693090857)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
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.
|