From ee614eebb4ba89353caf29ad84782ad63885950c Mon Sep 17 00:00:00 2001 From: chmod777john Date: Mon, 12 Jan 2026 11:23:21 +0800 Subject: [PATCH] fix(skill): align path patterns with Agent Skills specification Update directory path patterns to match the official Agent Skills specification at https://agentskills.io/specification#optional-directories Changes: - Replace `reference/` with `references/` (plural, as per spec) - Remove `examples/` and `templates/` (not in spec) - Add `assets/` (defined in spec) The specification defines these optional directories: - scripts/ - Executable code - references/ - Additional documentation - assets/ - Static resources (templates, images, data files) This ensures the skill loader correctly processes paths that follow the official Agent Skills format. --- mini_agent/tools/skill_loader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mini_agent/tools/skill_loader.py b/mini_agent/tools/skill_loader.py index fde62b4..2529b93 100644 --- a/mini_agent/tools/skill_loader.py +++ b/mini_agent/tools/skill_loader.py @@ -125,7 +125,8 @@ def _process_skill_paths(self, content: str, skill_dir: Path) -> str: """ import re - # Pattern 1: Directory-based paths (scripts/, examples/, templates/, reference/) + # Pattern 1: Directory-based paths (scripts/, references/, assets/) + # See https://agentskills.io/specification#optional-directories def replace_dir_path(match): prefix = match.group(1) # e.g., "python " or "`" rel_path = match.group(2) # e.g., "scripts/with_server.py" @@ -135,7 +136,7 @@ def replace_dir_path(match): return f"{prefix}{abs_path}" return match.group(0) - pattern_dirs = r"(python\s+|`)((?:scripts|examples|templates|reference)/[^\s`\)]+)" + pattern_dirs = r"(python\s+|`)((?:scripts|references|assets)/[^\s`\)]+)" content = re.sub(pattern_dirs, replace_dir_path, content) # Pattern 2: Direct markdown/document references (forms.md, reference.md, etc.)