hermes - 💡(How to fix) Fix skill_manage(action='create') ignores skills.external_dirs, always writes to ~/.hermes/skills/ [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fixed

Code Example

def _find_slot(name, category, target_root=None):
    root = target_root or _default_creation_dir()
    if category:
        return root / category / name
    return root / name

def _default_creation_dir():
    from agent.skill_utils import get_external_skills_dirs
    ext = get_external_skills_dirs()
    return ext[0] if ext else SKILLS_DIR
RAW_BUFFERClick to expand / collapse

Problem

When skills.external_dirs is configured in config.yaml, the agent discovers and loads skills from both ~/.hermes/skills/ and external directories. However, skill_manage(action='create') hardcodes the target to ~/.hermes/skills/ via SKILLS_DIR, ignoring external dirs entirely.

This creates an inconsistency: users who maintain skills in a separate git repository via external_dirs cannot use skill_manage to create skills there. They must use write_file directly and manually ensure correct SKILL.md structure, defeating the purpose of the tool.

Proposed Fix

When external_dirs is configured, use the first entry as the default creation target instead of SKILLS_DIR. Optionally accept a target_dir parameter to explicitly select among configured dirs.

def _find_slot(name, category, target_root=None):
    root = target_root or _default_creation_dir()
    if category:
        return root / category / name
    return root / name

def _default_creation_dir():
    from agent.skill_utils import get_external_skills_dirs
    ext = get_external_skills_dirs()
    return ext[0] if ext else SKILLS_DIR

Expected Behavior

  • No external_dirs configured → create in ~/.hermes/skills/ (current behavior, no regression)
  • external_dirs configured → create in first external dir by default
  • target_dir parameter provided → create in specified dir (must be in configured dirs)

Steps to Reproduce

  1. Add skills.external_dirs: ["~/my-skills"] to config.yaml
  2. Call skill_manage(action='create', name='test-skill', content='...')
  3. Observe skill created in ~/.hermes/skills/test-skill/ instead of ~/my-skills/test-skill/

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING