hermes - ✅(Solved) Fix [Feature]: Skill subcommand tab-completion via metadata.hermes.ui.subcommands [1 pull requests, 1 participants]

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…
GitHub stats
NousResearch/hermes-agent#17621Fetched 2026-04-30 06:46:22
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #17630: feat: skill subcommand completions via metadata.hermes.ui

Description (problem / solution / changelog)

What does this PR do?

Add support for skill-declared subcommand tab-completion without requiring a CommandDef entry in COMMAND_REGISTRY.

Motivation: Custom skills registered via /skill-name feel like second-class commands compared to built-ins like /skin or /model — no tab-completion, no display_meta, no subcommand hints. This makes skills feel disconnected from Hermes Agent itself, even when they have well-defined subcommands.

By extracting subcommand metadata from SKILL.md frontmatter, custom skills now get the same first-class autocomplete experience as built-in commands.

Skills declare their subcommands in SKILL.md frontmatter:

    metadata:
      hermes:
        ui:
          subcommands:
            list: Show all ideas in a table
            new: Create a new idea from user input
            status: Show full status of a specific idea

Descriptions are shown as display_meta in tab-completion (max 50 chars, truncated with '...' if longer). No changes to COMMAND_REGISTRY required — fully additive.

Related Issue

<!-- Link the issue this PR addresses. If no issue exists, consider creating one first. -->

Fixes #17621

Type of Change

<!-- Check the one that applies. -->
  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • agent/skill_commands.py: scan_skill_commands() now extracts metadata.hermes.ui.subcommands (dict {subcommand: description}) from SKILL.md frontmatter into the _skill_commands dict.
  • hermes_cli/commands.py: SlashCommandCompleter.get_completions() checks _skill_commands for matching skill subcommands after static SUBCOMMANDS, yielding Completion objects with display_meta from the subcommand description.
  • skills/software-development/hermes-agent-skill-authoring/SKILL.md: Documents the metadata.hermes.ui convention with examples.
  • CONTRIBUTING.md: Added documentation for new subcommand parsing functionality.

How to Test

  1. Register a skill with metadata.hermes.ui.subcommands — add this to any skill's SKILL.md frontmatter:
metadata:
  hermes:
    ui:
      subcommands:
        list: Show all items in a table
        find: Search by name or content
  1. Restart Hermes (/reset or /restart) so the skill loader picks up the new directory

  2. Type the skill command + space, then press Tab — you should see the subcommands listed with their descriptions as display_meta:

/ideas li<Tab>  →  /ideas list    Show all items in a table
  1. Type a partial subcommand — completions are filtered to matching entries:
/ideas f<Tab>  →  /ideas find    Search by name or content
  1. Skills without ui.subcommands yield no completions — no crash, no output
  2. Descriptions over 50 chars are truncated with ... at 50 chars
  3. Run the new tests:
pytest tests/agent/test_skill_ui_subcommands.py tests/hermes_cli/test_skill_subcommand_completions.py -v

Expected: 15/15 pass

Checklist

<!-- Complete these before requesting review. -->

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Debian 13

Documentation & Housekeeping

<!-- Check all that apply. It's OK to check "N/A" if a category doesn't apply to your change. -->
  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • [N/A] I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • [N/A] I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

<img width="470" height="158" alt="image" src="https://github.com/user-attachments/assets/53b3a6e5-8857-4c2a-9ce0-d8a520bdac54" />

Changed files

  • CONTRIBUTING.md (modified, +17/-0)
  • agent/skill_commands.py (modified, +6/-0)
  • hermes_cli/commands.py (modified, +19/-0)
  • skills/software-development/hermes-agent-skill-authoring/SKILL.md (modified, +4/-0)
  • tests/agent/test_skill_ui_subcommands.py (added, +110/-0)
  • tests/hermes_cli/test_skill_subcommand_completions.py (added, +236/-0)

Code Example

metadata:
  hermes:
    ui:
      subcommands:
        sub1: Short description (<= 50 chars)
        sub2: Description for second subcommand

---
RAW_BUFFERClick to expand / collapse

Problem or Use Case

Custom skills registered via /skill-name feel like second-class commands compared to built-ins like /skin or /model. Built-in commands get native tab-completion, display_meta descriptions, and Telegram BotCommand menu support. Custom skills get none of this — the only registration path is COMMAND_REGISTRY in hermes_cli/commands.py, which requires a committed code change to the Hermes repo itself.

This makes it awkward to develop and distribute skill-embedded workflows. A skill author who adds subcommands to their skill's UX cannot expose those subcommands in tab-completion without forking Hermes.

Proposed Solution

Allow skills to declare subcommand metadata in SKILL.md frontmatter. scan_skill_commands() extracts metadata.hermes.ui.subcommands as a dict of {subcommand: description}. The CLI completer yields matching subcommands when completing after a skill command, with descriptions shown as display_meta. No CommandDef or COMMAND_REGISTRY change required.

metadata:
  hermes:
    ui:
      subcommands:
        sub1: Short description (<= 50 chars)
        sub2: Description for second subcommand

Alternatives Considered

No response

Feature Type

CLI improvement

Scope

Medium (few files, < 300 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

extent analysis

TL;DR

Allow skills to declare subcommand metadata in SKILL.md frontmatter to enable native tab-completion and display_meta descriptions.

Guidance

  • Extract subcommand metadata from SKILL.md frontmatter using scan_skill_commands() function to populate a dict of subcommands and their descriptions.
  • Modify the CLI completer to yield matching subcommands when completing after a skill command, displaying descriptions as display_meta.
  • Ensure no changes are required to CommandDef or COMMAND_REGISTRY to maintain compatibility.
  • Test the implementation with various skill commands and subcommands to verify correct tab-completion and description display.

Example

metadata:
  hermes:
    ui:
      subcommands:
        sub1: Short description
        sub2: Description for second subcommand

This example shows how a skill author can declare subcommand metadata in SKILL.md frontmatter.

Notes

This solution assumes that the scan_skill_commands() function can correctly extract metadata from SKILL.md frontmatter and that the CLI completer can be modified to support subcommand completion.

Recommendation

Apply workaround by implementing the proposed solution, as it provides a clean and compatible way to enable native tab-completion and display_meta descriptions for custom skills without requiring changes to the Hermes repo.

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

hermes - ✅(Solved) Fix [Feature]: Skill subcommand tab-completion via metadata.hermes.ui.subcommands [1 pull requests, 1 participants]