Skip to content

fix: skill_manage now finds skills from external_dirs - #4868

Closed
Mibayy wants to merge 1 commit into
NousResearch:mainfrom
Mibayy:fix/skill-manage-external-dirs-4759
Closed

fix: skill_manage now finds skills from external_dirs#4868
Mibayy wants to merge 1 commit into
NousResearch:mainfrom
Mibayy:fix/skill-manage-external-dirs-4759

Conversation

@Mibayy

@Mibayy Mibayy commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #4759skill_manage operations (patch, edit, delete, write_file, remove_file) fail with "Skill not found" for skills loaded from external_dirs.

Root cause: _find_skill() in tools/skill_manager_tool.py only scanned SKILLS_DIR (~/.hermes/skills/) via rglob("SKILL.md"). Skills from external_dirs configured in config.yaml were invisible to it, even though _find_all_skills() (used for listing/viewing) correctly scanned them.

Fix: Mirror the dirs_to_scan pattern from _find_all_skills() — scan both SKILLS_DIR and get_external_skills_dirs().

Changes

  • tools/skill_manager_tool.py: _find_skill() now imports get_external_skills_dirs from agent.skill_utils and scans all configured directories

Test plan

  • Configure skills.external_dirs in config.yaml pointing to a skill directory
  • skill_manage(action='patch', name='skill-from-external-dir', ...) succeeds
  • Skills in ~/.hermes/skills/ still found correctly
  • Skills not in any scanned directory still return "Skill not found"

🤖 Generated with Claude Code

)

_find_skill() only scanned SKILLS_DIR (~/.hermes/skills/) via rglob,
missing skills from external_dirs configured in config.yaml. This
caused "Skill not found" errors for patch/edit/delete operations on
skills that were visible and loadable via _find_all_skills().

Mirror the dirs_to_scan pattern from _find_all_skills() in
skills_tool.py: scan both SKILLS_DIR and get_external_skills_dirs().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution, @Mibayy! This fix was independently implemented on main by a maintainer on the same day this PR was opened.

Automated hermes-sweeper review.

  • The exact change proposed here — importing get_all_skills_dirs from agent.skill_utils and iterating all configured dirs in _find_skill() — was landed in commit ad4feeaf0 (feat: wire skills.external_dirs into all remaining discovery paths).
  • That commit also extended the same fix to several other code paths (skills_categories, credential_files, ssh.py, gateway hook), going slightly beyond the scope of this PR.
  • Current main at tools/skill_manager_tool.py lines 241–248 already matches the behavior this PR aimed to produce.

Closing as implemented on main. The underlying issue #4759 is fully resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skill_manage patch/edit/delete can't find skills from external_dirs

2 participants