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.