🔧 feat(skills): install to agents home

This commit is contained in:
csh
2026-02-05 15:26:48 +08:00
parent 8b75747587
commit 872c1afc24
5 changed files with 41 additions and 16 deletions
+7 -4
View File
@@ -1056,16 +1056,19 @@ def normalize_globs(raw: object) -> list[str]:
def install_skills_action(config: dict, context: dict) -> int:
mode = str(config.get("mode", "list")).lower()
codex_home = Path(config.get("codex_home", "~/.codex")).expanduser()
if not codex_home.is_absolute():
codex_home = (context["project_root"] / codex_home).resolve()
if "codex_home" in config:
print("ERROR: codex_home is no longer supported; use agents_home", file=sys.stderr)
return 2
agents_home = Path(config.get("agents_home", "~/.agents")).expanduser()
if not agents_home.is_absolute():
agents_home = (context["project_root"] / agents_home).resolve()
skills_src_root = PLAYBOOK_ROOT / "codex/skills"
if not skills_src_root.is_dir():
print(f"ERROR: skills source not found: {skills_src_root}", file=sys.stderr)
return 2
skills_dst_root = codex_home / "skills"
skills_dst_root = agents_home / "skills"
ensure_dir(skills_dst_root)
if mode == "all":