Skip to content

fix: disabled skills respected across banner, system prompt, and slash commands#1897

Merged
teknium1 merged 3 commits intomainfrom
hermes/hermes-8112c8c8
Mar 18, 2026
Merged

fix: disabled skills respected across banner, system prompt, and slash commands#1897
teknium1 merged 3 commits intomainfrom
hermes/hermes-8112c8c8

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

@teknium1 teknium1 commented Mar 18, 2026

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

Surface Disabled filtering Platform filtering
Banner skill count & listing
System prompt <available_skills>
/skill-name slash commands
skill_view tool
skills_list tool

Fix (4 surfaces)

hermes_cli/banner.py — Replaced naive rglob scan with _find_all_skills() from tools/skills_tool.py, which already handles both platform gating and disabled-skill filtering.

agent/prompt_builder.pybuild_skills_system_prompt() now loads _get_disabled_skill_names() and skips disabled skills before they enter the <available_skills> section.

agent/skill_commands.pyscan_skill_commands() now skips disabled skills, so they no longer register as /skill-name slash commands.

tools/skills_tool.pyskill_view() now checks _is_skill_disabled() and returns a clear error telling the user to enable it via hermes skills or inspect the files directly on disk.

After

Surface Disabled filtering Platform filtering
Banner skill count & listing
System prompt <available_skills>
/skill-name slash commands
skill_view tool
skills_list tool
skill_manage tool N/A (intentional — users should be able to edit disabled skills) N/A

Files changed

  • hermes_cli/banner.py — Rewrote get_available_skills() to delegate to _find_all_skills()
  • agent/prompt_builder.py — Added disabled-skill filtering to build_skills_system_prompt()
  • agent/skill_commands.py — Added disabled-skill filtering to scan_skill_commands()
  • tools/skills_tool.py — Added disabled-skill check to skill_view()
  • tests/hermes_cli/test_banner_skills.py — 5 new tests
  • tests/agent/test_prompt_builder.py — 1 new test
  • tests/agent/test_skill_commands.py — 1 new test
  • tests/tools/test_skills_tool.py — 2 new tests

Test plan

  • Full suite: 5310 passed (24 pre-existing failures in test_delegate.py, unrelated)
Test 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.
@teknium1 teknium1 changed the title fix: banner skill count respects disabled skills and platform filtering Mar 18, 2026
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.
@teknium1 teknium1 merged commit b70dd51 into main Mar 18, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant