refactor: flatten skills to top-level directories - #28
Merged
Merged
Conversation
Each skill is now its own directory at the repo root, so the whole catalogue is visible from the repository listing instead of being buried two levels down under skills/security/<domain>/. 38 skills move: 8 axguard-* orchestration skills and 30 security domain skills. All moves are renames, so history follows. Domain grouping is not lost — ai, application, discovery, identity, infrastructure and operations survive in the domain: field of the registry, which moves from skills/index.yaml to skills-index.yaml at the root. install.sh and uninstall.sh now discover skills by globbing top-level directories that contain a SKILL.md. Both previously carried the list by hand, and uninstall.sh had drifted: it omitted the axguard-security skill and the axguard-contribute.md and axguard-privacy.md commands, so those were left behind on removal. Deriving both lists from the repo fixes that and stops it recurring. validate_skills.py identified domain skills by their skills/security/ path. That signal is gone, so it now treats any skill not named axguard-* as a domain skill — the same 30/8 split — and keeps enforcing version, domain, license, ## Purpose and ## Research Provenance on them. test_skills.py asserted exactly 30 entries matching path: skills/security/. It now asserts every skill on disk is registered in skills-index.yaml, which is a stronger check and layout-independent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every skill becomes its own top-level directory, so the full catalogue is visible in the repository listing instead of being buried under
skills/security/<domain>/<name>/.Before, finding a skill meant four levels:
skills/security/identity/jwt-security/SKILL.md. Now it isjwt-security/SKILL.md.What moved
38 skills: 8
axguard-*orchestration skills and 30 security domain skills. Every move is a rename, sogit log --followstill works on each file.The registry moves with them:
skills/index.yaml→skills-index.yamlat the root, with theskills/prefix stripped from all 38 path entries.No grouping is lost.
ai,application,discovery,identity,infrastructureandoperationswere only ever directory names — the registry already stored the same value in each skill'sdomain:field, and still does.What had to change with it
install.sh— replacedcopy_tree_items "skills/*"plus a separateinstall_security_skillspass with oneinstall_skillsfunction that globs top-level directories containing aSKILL.md. The two-pass split only existed to handle the nesting.uninstall.sh— this carried its skill and command lists by hand, and they had drifted. The arrays were missing theaxguard-securityskill and theaxguard-contribute.mdandaxguard-privacy.mdcommands, so an uninstall silently left three files behind. Both lists are now derived from the repo the same wayinstall.shderives them, so they cannot drift again.scripts/validate_skills.py— identified domain skills by testing forskills/security/in the path, which no longer exists. It now treats any skill not namedaxguard-*as a domain skill. That is the identical 30/8 split, and the strict checks on domain skills are unchanged:version,domain,license,## Purpose,## Research Provenance, and no placeholder CWE/WSTG ids.tests/test_skills.py— assertedtext.count("path: skills/security/") == 30, which is a layout assertion rather than a correctness one. It now asserts that every skill on disk appears inskills-index.yaml. That is strictly stronger and survives future moves.tests/test_mcp_skill.py— pointed atROOT / "skills" / "axguard-security". Repointed.Docs — 12 files updated for the new paths. Two links inside
axguard-security/were broken by the depth change (../../docs/…resolving one level too high) and are fixed.Verification
install.sh --agent all --project→ 38 skills and 31 commands in each of.claude,.cursor,.opencode,.codex; 38 skills and 0 commands in.agents, which is correct since shared Agent Skills have no slash commands. Identical to the counts before this change.uninstall.sh --agent all --project→ 0 skills and 0 commands remaining in all five. Before this change it would have left 3 files.python scripts/validate_skills.py→skills scanned: 38 OK, with the domain/orchestration split confirmed at 30/8.domain:key and breaking a## Purposeheading in a scratch copy still producesFAILwith both errors named.test_skills.py— all 3 tests pass.skills/security,skills/index.yamlorskills/axguardremain anywhere in the repo.test_mcp_skill.pyimports pytest, which is not installable on my machine (noensurepip, nopip), so that module is verified by CI rather than locally. Its only change is the one path constant, and the file it points at exists.Packaging is unaffected —
pyproject.tomlpinsinclude = ["cli*", "engines*"], so the new root directories are not picked up by setuptools discovery.