feat: introduce skill management tool for agent-created skills and skills migration to ~/.hermes
- Added a new `skill_manager_tool` to enable agents to create, update, and delete their own skills, enhancing procedural memory capabilities. - Updated the skills directory structure to support user-created skills in `~/.hermes/skills/`, allowing for better organization and management. - Enhanced the CLI and documentation to reflect the new skill management functionalities, including detailed instructions on creating and modifying skills. - Implemented a manifest-based syncing mechanism for bundled skills to ensure user modifications are preserved during updates.
This commit is contained in:
parent
d070b8698d
commit
4d5f29c74c
18 changed files with 1007 additions and 204 deletions
15
cli.py
15
cli.py
|
|
@ -355,33 +355,32 @@ COMPACT_BANNER = """
|
|||
|
||||
def _get_available_skills() -> Dict[str, List[str]]:
|
||||
"""
|
||||
Scan the skills directory and return skills grouped by category.
|
||||
Scan ~/.hermes/skills/ and return skills grouped by category.
|
||||
|
||||
Returns:
|
||||
Dict mapping category name to list of skill names
|
||||
"""
|
||||
skills_dir = Path(__file__).parent / "skills"
|
||||
import os
|
||||
|
||||
hermes_home = Path(os.getenv("HERMES_HOME", Path.home() / ".hermes"))
|
||||
skills_dir = hermes_home / "skills"
|
||||
skills_by_category = {}
|
||||
|
||||
if not skills_dir.exists():
|
||||
return skills_by_category
|
||||
|
||||
# Scan for SKILL.md files
|
||||
for skill_file in skills_dir.rglob("SKILL.md"):
|
||||
# Get category (parent of parent if nested, else parent)
|
||||
rel_path = skill_file.relative_to(skills_dir)
|
||||
parts = rel_path.parts
|
||||
|
||||
if len(parts) >= 2:
|
||||
category = parts[0]
|
||||
skill_name = parts[-2] # Folder containing SKILL.md
|
||||
skill_name = parts[-2]
|
||||
else:
|
||||
category = "general"
|
||||
skill_name = skill_file.parent.name
|
||||
|
||||
if category not in skills_by_category:
|
||||
skills_by_category[category] = []
|
||||
skills_by_category[category].append(skill_name)
|
||||
skills_by_category.setdefault(category, []).append(skill_name)
|
||||
|
||||
return skills_by_category
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue