Imagine a folder called ~/skills, split by team into team-a and team-b, each split again by topic, with the real skills at the bottom. That is a sensible way to organize things. The problem was on the other side: until recently, a HagiCode skill library only recognized the skills sitting directly inside it. To make it see team-a and team-b, you had to register every parent folder one by one, one form submission each.
It was like hiring a stock clerk who could only count the boxes at the warehouse door. There were boxes inside boxes, and she could see them but was not allowed in.
We have since loosened her rules. This post is about that clerk: how deep she can go now, which rooms she still stays out of, how we seal them, and what kind of receipt she hands back after the count.
Going in: one folder, searched all the way down
Registering a skill library now means the server walks down its subfolders to any depth and finds every skill. The rule is simple: a folder that contains SKILL.md is a skill. The clerk writes it down and does not go any deeper into it. Skills do not have to move. She counts them where you already keep them.
A few things stay the same, so you do not need to reorganize:
- A nested skill takes its name from its own folder name. The on/off switches you already saved (keyed by library id plus name) still apply, and the logic that loads skills when an Agent starts is unchanged.
- If two skills with the same name appear in one library, the one that comes first in path order wins, and the other is shown as a conflict. The same happens when a name matches a built-in skill: the duplicate does not load, and its switch is locked until you rename or remove the other one.
- Libraries you already registered do not need to be registered again, and there is no "recursive" checkbox to tick. The first scan after the update uses the new method: skills found before keep their names and switches, and deeper skills appear as new rows.
The clerk also watches for one mistake. You cannot register a folder inside an already registered library, or a parent folder that contains one. With recursive discovery, that kind of overlap would make each skill collide with itself, so the server rejects it outright.
Rooms she does not enter, and closing time
A recursive scan that goes everywhere will eventually be pointed at a whole home directory. So the clerk has a list of places she never enters, at any depth:
- Every hidden folder whose name starts with a dot, such as
.git,.venvor.cache. - Folders that hold dependencies, build output or tool caches, matched by exact name and case-insensitively:
node_modules,bower_components,__pycache__,venv,site-packages,dist,build,target,bin,objandcoverage. - Symbolic-link folders, both to prevent loops and to keep her from wandering outside the library.
The list only controls whether she goes inside. A folder named build that contains its own SKILL.md is still a skill and is still counted.
The clerk also has closing time. Discovery goes down to 6 levels (the library itself is level 0), looks at up to 2,000 folders in one pass, and reports up to 200 skills per library. These limits exist because the scan also runs every time an Agent starts, and one library that points at a huge directory should not hold up startup. When a limit cuts the scan short, it is not silent: the library's row says "listing only the first 200 skills", and a note next to the total says the number is a lower bound.
One list, and a few seals
The form for registering a library now takes one folder per line, up to 20 at a time:
~/skills/team-a ~/skills/team-b After you submit, the page reports how many were added and which ones failed and why. The failed lines stay in the input box, so you can fix them and submit again. Remember that the paths are read on the machine running HagiCode, not on the device you are using.
If there is a folder you do not want the clerk to see, such as team/archive, each library has an "excluded folders" field, one relative path per line. Exclusion is complete: that folder's own SKILL.md and every skill below it are not reported, and they are not loaded when an Agent starts. Each library can exclude up to 50 folders.
It is easier to use the "exclude folder" button on each custom skill row in the skill list. When two skills with the same name clash, click the losing row, and its folder is added to the excluded list. To undo it, remove that line from the library's excluded folders on its source page and save. The old switch state is kept the whole time, so when the clerk reaches that skill again, everything returns as it was.
A receipt after the count
The worst kind of count is one where nobody says anything afterwards. This version adds a receipt. Each library reports three numbers: total, succeeded and failed. Folders that cannot be read are no longer skipped silently. They appear as scan problems, and the other skills load as usual. The skill drawer's header shows an error count whenever there are errors.
Every line on the receipt is clickable. A failed skill takes you back to its row in the skill list, scrolls it into view and highlights it briefly. A folder that cannot be read, or a library that is unavailable, moves the cursor to the excluded-folders field, which is where you can act on it.
About the employer
HagiCode is a platform for getting development work done with Agents. Proposals, Saga, the various Agent CLIs and skills are all managed in one workspace. The website is https://hagicode.com. The skill library is a small part of it: it lets your own skill folders keep the layout you already use, rather than forcing you to reshape them for the tool.
These changes come from a few items in the v0.2.0 release notes: recursive discovery of user skills, excluded folders per library, and reporting of scan problems and skill status counts. Nothing dramatic. You no longer have to register the same folder ten times. Next time you tidy ~/skills, nest it as deep as you like, and keep a SKILL.md at the very bottom.
