fix: flatten nested skills to /group-action so Claude Code discovers them#6
Merged
Conversation
…rs them Claude Code scans skills only one level deep and uses the folder name as the slash-command name; it does not recurse into nested group folders. The installer symlinked/copied whole group folders (~/.claude/skills/fix -> assets/skills/fix), so all 21 namespaced skills were invisible (/fix:root-cause returned "No commands match"). - listSkillsNested: flatten <group>/<action> to <group>-<action> (hyphen, since ':' is an invalid filename character on Windows); skip non-dir entries (.DS_Store) - install/native.ts: install flat single-level skill entries for Claude - install/skill-editor.ts: same flattening for Codex/Antigravity skill folders - uninstall.ts: include flattened names in managed-names so they get removed - docs: switch to /<group>-<action> and correct the skill-discovery explanation
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.
Vấn đề
Claude Code chỉ scan skills một cấp (
~/.claude/skills/<name>/SKILL.md) và lấy tên thư mục làm slash command — nó không đệ quy vào folder nhóm lồng nhau. Installer hiện symlink/copy nguyên folder nhóm (~/.claude/skills/fix→assets/skills/fix), nên toàn bộ 21 skill namespaced biến mất — gõ/fix:root-causebáoNo commands match.Đã verify bằng test thực tế: folder tên có dấu
:thì Claude Code nhận, nhưng:cấm trong tên file trên Windows → chọn flatten bằng dấu-cho nhất quán mọi OS.Thay đổi
symlink.ts—listSkillsNestedflatten<group>/<action>→<group>-<action>(hyphen, vì:invalid trên Windows); bỏ qua entry không phải thư mục (vd.DS_Store).install/native.ts— Claude install tạo entry skill phẳng 1 cấp thay vì symlink folder nhóm.install/skill-editor.ts— flatten tương tự cho Codex/Antigravity.uninstall.ts— managed-names gồm cả tên phẳng để gỡ đúng (Claude/Codex/Antigravity) + dọn rác nhóm cũ./<group>-<action>và sửa lại phần giải thích cơ chế (vốn mô tả sai).Kết quả
21 skill cài ra
/docs-sync,/feature-new,/fix-root-cause,/review-branch, ... Verify: 21/21 symlink phẳng,SKILL.mdđọc được, frontmattername:khớp 100% tên phẳng.Lưu ý cho reviewer
Trong lúc điều tra phát hiện thêm 1 footgun (chưa fix trong PR này):
uninstallcó nhánh|| item.isSymlinknên xoá mọi symlink trong~/.claude/skills, kể cả skill ngoài moicle. Nên cân nhắc siết lại match theo target nằm trong moicle assets — đề xuất PR riêng.