# feat(install): 目录条目展开为子级安装,支持与用户自定义 skills 共存#19
Open
ranger1112 wants to merge 1 commit intotelagod:mainfrom
Open
# feat(install): 目录条目展开为子级安装,支持与用户自定义 skills 共存#19ranger1112 wants to merge 1 commit intotelagod:mainfrom
ranger1112 wants to merge 1 commit intotelagod:mainfrom
Conversation
…stence Replace monolithic directory copy with child-level installation in installCore(). User files in target dirs (skills/, output-styles/, bin/lib/) are now preserved — only Code Abyss entries are backed up and replaced individually. Also enable empty-parent-dir pruning for all manifest entries during uninstall, removing the cross-root restriction so stale dirs from child-level install are cleaned up regardless of root domain. Rebased on v2.1.8 (telagod/main). Verified: - npm test --runInBand: 217 passed (5 pre-existing Windows-only failures) - npm run verify:skills: 26 skills - Smoke: 12/12 (Claude/Codex/Gemini/OpenClaw) - No explicit commands generated by default - User skills survive install→uninstall cycle - .sage-backup/manifest.json restore chain compatible
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Supersedes #18
问题
当前
installCore()将skills/、output-styles/、bin/lib/等目录视为单一整体单元:整体备份 → 删除 → 全量覆盖。这导致用户原有的自定义 skills 在安装期间被"冻结"到.sage-backup/中,只有卸载时才能恢复,无法与 Code Abyss skills 共存。方案
将目录类安装条目展开为 immediate children 逐个安装,而不是整个目录替换。
installCore()改动:filesToInstall条目检测srcPath是否为目录fs.readdirSync()枚举 children,过滤shouldSkip()后逐个安装{root: "claude", path: "skills/domains"}而非{path: "skills"})runUninstall()+uninstall.js改动:normalized.root !== tgt守卫验证
基于
v2.1.8(telagod/main) rebase,按最新口径全部重新验证:npm run verify:skillsnpm test -- --runInBandcommands/目录不存在 ✅.sage-backup/manifest.json恢复链兼容改动文件
bin/install.jsbin/uninstall.js向后兼容
{path: "skills"}整目录条目仍以rmSafe删除,行为不变{path: "skills/domains"}等子条目逐条删除 + 空目录裁剪