The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(skills): load a plugin skill called with the index heading as a prefix
Teknium9515798e454b
diff --git a/tests/tools/test_plugin_skills.py b/tests/tools/test_plugin_skills.pyindex 83538831e7a..59dcdd703a8 100644--- a/tests/tools/test_plugin_skills.py+++ b/tests/tools/test_plugin_skills.py@@ -195,6 +195,18 @@ class TestSkillViewQualifiedName:assert result["name"] == "superpowers:writing-plans"assert "writing-plans body." in result["content"]+ def test_resolves_index_heading_written_as_prefix(self, tmp_path):+ """The skills index groups plugin skills under a ``plugin`` heading; models call+ ``plugin:<namespace>:<skill>``, which must load the same skill."""+ from tools.skills_tool import skill_view++ self._register_skill(tmp_path, plugin="agent-plugin-blender-5a80e4ba", name="blender")+ result = json.loads(skill_view("plugin:agent-plugin-blender-5a80e4ba:blender"))++ assert result["success"] is True+ assert result["name"] == "agent-plugin-blender-5a80e4ba:blender"+ assert "blender body." in result["content"]+def test_reads_supporting_file_with_containment(self, tmp_path):from tools.skills_tool import skill_viewdiff --git a/tools/skills_tool.py b/tools/skills_tool.pyindex 75694c6c53e..8b4e6c04e8b 100644--- a/tools/skills_tool.py+++ b/tools/skills_tool.py@@ -336,6 +336,12 @@ def _resolve_plugin_skill(name, file_path, task_id, preprocess):from agent.skill_utils import is_valid_namespace, parse_qualified_namefrom hermes_cli.plugins import discover_plugins, get_plugin_managernamespace, bare = parse_qualified_name(name)+ if namespace == "plugin" and ":" in bare:+ # The skills index lists plugin skills under a "plugin" heading, and models write that+ # heading as a prefix ("plugin:agent-plugin-blender-5a80e4ba:blender"). A bare skill name+ # never holds a colon, so the remainder is the real qualified name.+ name = bare+ namespace, bare = parse_qualified_name(name)if not is_valid_namespace(namespace):return _fail(f"Invalid namespace '{namespace}' in '{name}'. Namespaces must match [a-zA-Z0-9_-]+."), Nonediscover_plugins() # idempotent