Skip to content

Bug: skills_sync.py uses directory name instead of SKILL.md name field, causing builtin skills misclassified as local #6835

@Tony-ooo

Description

@Tony-ooo

Bug Description

There is an inconsistency in how skill names are handled across different modules, causing 9 official builtin skills to be incorrectly classified as local instead of builtin.

Root Cause

Different modules use different methods to identify skills:

File Function Method Status
tools/skills_sync.py _discover_bundled_skills() Uses directory name (skill_dir.name) ❌ Inconsistent
tools/skills_tool.py _find_all_skills() Uses SKILL.md name: field (frontmatter.get("name", ...)) ✅ Correct
hermes_cli/skills_hub.py do_list() Compares using skill["name"] ✅ Correct

Code Evidence

skills_sync.py (Line 126):

skill_name = skill_dir.name  # ❌ Bug: uses directory name

skills_tool.py (Line 558):

name = frontmatter.get("name", skill_dir.name)  # ✅ Uses name field

skills_hub.py (Lines 523, 532):

name = skill["name"]
elif name in builtin_names:  # Never matches due to inconsistency

Affected Skills

Skills where directory name differs from SKILL.md name: field:

Directory SKILL.md name: field Wrong Class Correct Class
audiocraft audiocraft-audio-generation local builtin
gguf gguf-quantization local builtin
modal modal-serverless-gpu local builtin
peft peft-fine-tuning local builtin
vllm serving-llms-vllm local builtin
segment-anything segment-anything-model local builtin
stable-diffusion stable-diffusion-image-generation local builtin
lm-evaluation-harness evaluating-llms-harness local builtin
trl-fine-tuning fine-tuning-with-trl local builtin

Impact

  • Users see official builtin skills classified as local in hermes skills list
  • .bundled_manifest uses directory names, but skill scanning uses name: field
  • The comparison name in builtin_names in do_list() never matches for affected skills

Reproduction Steps

  1. Install Hermes Agent with bundled skills
  2. Run hermes skills list
  3. Observe that skills like audiocraft-audio-generation show as local instead of builtin

Expected Behavior

All skills in ~/.hermes/hermes-agent/skills/ should be classified as builtin when listed.

Suggested Fix

Update tools/skills_sync.py to read the name: field from SKILL.md instead of using directory name:

def _discover_bundled_skills(bundled_dir: Path) -> List[Tuple[str, Path]]:
    skills = []
    for skill_md in bundled_dir.rglob("SKILL.md"):
        if "/.git/" in str(skill_md):
            continue
        skill_dir = skill_md.parent
        
        # Read name from SKILL.md frontmatter
        content = skill_md.read_text()[:4000]
        skill_name = None
        for line in content.split('\n'):
            if line.startswith('name:'):
                skill_name = line.split(':', 1)[1].strip()
                break
        if not skill_name:
            skill_name = skill_dir.name  # fallback
        
        skills.append((skill_name, skill_dir))
    return skills

Workaround (Until Fixed)

Manually update ~/.hermes/skills/.bundled_manifest to use SKILL.md name: field values instead of directory names:

# Wrong (directory name)
audiocraft:hash123

# Correct (SKILL.md name field)
audiocraft-audio-generation:hash123

Environment

  • Hermes Agent: Latest version from main branch
  • OS: Ubuntu Linux
  • Python: 3.x

Additional Context

This bug affects any skill where the directory name differs from the name: field in SKILL.md frontmatter. The inconsistency between skills_sync.py and skills_tool.py/skills_hub.py causes the manifest-based classification to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions