fix: disabled skills respected across banner, system prompt, and slash commands#1897
Merged
fix: disabled skills respected across banner, system prompt, and slash commands#1897
Conversation
added 2 commits
March 18, 2026 02:27
…tering The banner's get_available_skills() was doing a raw rglob scan of ~/.hermes/skills/ without checking: - Whether skills are disabled (skills.disabled config) - Whether skills match the current platform (platforms: frontmatter) This caused the banner to show inflated skill counts (e.g. '100 skills' when many are disabled) and list macOS-only skills on Linux. Fix: delegate to _find_all_skills() from tools/skills_tool which already handles both platform gating and disabled-skill filtering.
Two more places where disabled skills were still surfaced: 1. build_skills_system_prompt() in prompt_builder.py — disabled skills appeared in the <available_skills> system prompt section, causing the agent to suggest/load them despite being disabled. 2. scan_skill_commands() in skill_commands.py — disabled skills still registered as /skill-name slash commands in CLI help and could be invoked. Both now load _get_disabled_skill_names() and filter accordingly.
skill_view() checked platform compatibility but not disabled state, so the agent could still load and read disabled skills directly. Now returns a clear error when a disabled skill is requested, telling the user to enable it via hermes skills or inspect the files manually.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Disabled skills (via
hermes skills) and platform-incompatible skills (e.g. macOS-only on Linux) were leaking through in four places. This PR fixes all of them.Problem
<available_skills>/skill-nameslash commandsskill_viewtoolskills_listtoolFix (4 surfaces)
hermes_cli/banner.py— Replaced naiverglobscan with_find_all_skills()fromtools/skills_tool.py, which already handles both platform gating and disabled-skill filtering.agent/prompt_builder.py—build_skills_system_prompt()now loads_get_disabled_skill_names()and skips disabled skills before they enter the<available_skills>section.agent/skill_commands.py—scan_skill_commands()now skips disabled skills, so they no longer register as/skill-nameslash commands.tools/skills_tool.py—skill_view()now checks_is_skill_disabled()and returns a clear error telling the user to enable it viahermes skillsor inspect the files directly on disk.After
<available_skills>/skill-nameslash commandsskill_viewtoolskills_listtoolskill_managetoolFiles changed
hermes_cli/banner.py— Rewroteget_available_skills()to delegate to_find_all_skills()agent/prompt_builder.py— Added disabled-skill filtering tobuild_skills_system_prompt()agent/skill_commands.py— Added disabled-skill filtering toscan_skill_commands()tools/skills_tool.py— Added disabled-skill check toskill_view()tests/hermes_cli/test_banner_skills.py— 5 new teststests/agent/test_prompt_builder.py— 1 new testtests/agent/test_skill_commands.py— 1 new testtests/tools/test_skills_tool.py— 2 new testsTest plan