Unify skills under repository root

This commit is contained in:
武阳
2026-05-08 10:54:27 +08:00
parent dcc43adaa6
commit 37fc367304
16 changed files with 967 additions and 6 deletions
+5 -5
View File
@@ -1,12 +1,12 @@
"""Bundled skill definitions — prompt-type skills invocable via the Skill tool.
"""Skill definitions — prompt-type skills invocable via the Skill tool.
Mirrors the npm ``src/skills/bundled/`` module.
Bundled skills differ from slash commands:
Directory skills differ from slash commands:
- They generate AI prompts sent to the model (prompt-type).
- They carry ``when_to_use`` guidance for model auto-invocation.
- They can restrict ``allowed_tools`` during execution.
- They appear in system-reminder skill listings for model discovery.
Project-maintained skills live under the repository root ``skills/`` directory.
"""
from __future__ import annotations
@@ -196,7 +196,7 @@ def load_directory_skills(
*,
source: str = 'directory',
) -> tuple[BundledSkill, ...]:
skill_root = root or (Path(__file__).resolve().parent / 'skills' / 'bundled')
skill_root = root or (Path(__file__).resolve().parent.parent / 'skills')
if not skill_root.exists() or not skill_root.is_dir():
return ()
skills: list[BundledSkill] = []