Skip to content

feat: /skills slash command lists and filters available Hermes skills - #257

Closed
nesquena-hermes wants to merge 3 commits into
masterfrom
feat/skills-slash-command
Closed

feat: /skills slash command lists and filters available Hermes skills#257
nesquena-hermes wants to merge 3 commits into
masterfrom
feat/skills-slash-command

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Summary

Adds a /skills [query] slash command that lists available Hermes skills from the sidebar panel, directly in the chat.

What it does

/skills — lists all available skills grouped by category, formatted as an assistant message
/skills docker — filters by name, description, or category (case-insensitive)

Output format:

Available skills (42):

**devops**
  `background-checkpoint-worker` — Set up a background checkpoint review...
  `cron-digest-pattern` — Design pattern for cron-based activity digests...

**github**
  `github-issues` — Create, manage, triage, and close GitHub issues...

Changes

static/commands.js

  • Added /skills to COMMANDS array with arg:'query' (shows in autocomplete)
  • New async function cmdSkills(args): fetches /api/skills, optionally filters, groups by category, renders as assistant message

static/i18n.js

  • Added cmd_skills key to en, de, zh, zh-Hant locales

tests/test_regressions.py

  • Added test_skills_slash_command_defined(): verifies COMMANDS entry, function definition, and i18n key wiring

Tests

624 passed, 0 failed, 0 skipped

Fixes #248

…Router

When base_url is configured, resolve_model_provider() now trusts the
configured provider/base_url and skips the slash-based OpenRouter heuristic.
Fixes the case where model: google/gemma-4-26b-a4b with provider: custom
would be silently routed to OpenRouter, resulting in 401 errors.

Fixes #230
…own visibility

Fixes #247: toggleMobileFiles() now shows/hides the mobile overlay and
a new closeMobileFiles() helper closes the right panel. The overlay's
onclick now calls both closeMobileSidebar() and closeMobileFiles().
A mobile-only close button is added to the workspace panel header.

Fixes #246: profile dropdown no longer clipped by overflow-x:auto on
mobile. At max-width:900px the dropdown uses position:fixed below the
topbar (top:56px, right:8px), escaping the overflow stacking context.
Adds /skills [query] command that fetches from /api/skills, groups
results by category, and displays them as a formatted assistant message.
Optional query argument filters by name, description, or category.

Fixes #248
@nesquena

Copy link
Copy Markdown
Owner

Full Review: PR #257 — /skills slash command

Security Audit

Clean. The /skills command fetches from the existing /api/skills endpoint (read-only, same-origin). Skill names and descriptions are inserted into the assistant message via template literals that go through renderMd() — the esc() in inlineMd() handles any special characters. No new endpoints, no user input sent to the server.

Code Review

cmdSkills() in commands.js:

  • Fetches /api/skills, optionally filters by query (name, description, category substring match — case-insensitive)
  • Groups results by category, formats as markdown with code-fenced skill names and truncated descriptions (80 chars)
  • Pushes as an assistant message and renders — consistent with how /help and other info commands work
  • Empty results handled gracefully with distinct messages for filtered vs unfiltered

The implementation is clean and follows the existing command pattern exactly.

i18n: cmd_skills key added to all 4 locales. Correct.

Regression test: Verifies name:'skills' in COMMANDS array, cmdSkills function defined, and cmd_skills i18n key referenced. Good.

Stacked Branch

This includes both #255 (config.py) and #256 (mobile fixes). Merge order: #255#256#257, with rebases after each.

One note

The skill description truncation (s.description.slice(0,80)) doesn't handle multi-byte characters gracefully — a CJK description could be cut mid-character. In practice this is cosmetic (the ... suffix makes it clear it's truncated), but substring with a word-boundary check would be slightly more polished. Not a blocker.

Tests

575 passed, 0 failed.

Verdict

Approved. Clean feature addition following established patterns. Ready to merge after #255 and #256.

@nesquena-hermes

Copy link
Copy Markdown
Collaborator Author

Agent review — APPROVED ✅ (merged to stage)

/skills command is cleanly implemented: fetches from /api/skills, groups by category with alphabetical sort, filters on name/description/category when a query arg is provided, renders as a formatted assistant message with bold category headers and inline-code skill names. Error handling via showToast. i18n key cmd_skills added to all 4 locales (en, de, zh, zh-Hant). The command shows up in the / autocomplete dropdown.

Regression test in test_regressions.py verifies COMMANDS entry, function definition, and i18n wiring.

Tests: 626 passed (+1 regression test) on review branch. Stage total: 645 passed, 0 failed.
Merged to stage branch.

nesquena-hermes pushed a commit that referenced this pull request Apr 11, 2026
…#257)

Adds /skills [query] command to commands.js. Fetches from /api/skills,
groups by category (alphabetically sorted), displays as a formatted
assistant message. Optional query filters by name, description, or category.
i18n keys added for en, de, zh, zh-Hant. 1 regression test added.

Fixes #248
nesquena-hermes added a commit that referenced this pull request Apr 11, 2026
* fix: custom provider with slash model name no longer rerouted to OpenRouter (#255)

When base_url is configured in config.yaml, resolve_model_provider() now
trusts the configured provider/base_url entirely and skips the slash-based
OpenRouter heuristic. Fixes google/gemma-4-26b-a4b with provider:custom
being silently routed to OpenRouter, resulting in 401 errors.

Fixes #230

* test: mobile layout regression suite — 14 tests for every QA run (#254)

Adds tests/test_mobile_layout.py with 14 static regression tests that run
on every QA pass to catch mobile layout breakage before it reaches prod.
Covers: breakpoints at 900px/640px, right panel slide-over CSS, mobile
overlay, bottom nav, files button, profile dropdown z-index, chip overflow,
workspace close, 100dvh, 44px touch targets, 16px font-size on textarea.

* feat: /skills slash command lists and filters available Hermes skills (#257)

Adds /skills [query] command to commands.js. Fetches from /api/skills,
groups by category (alphabetically sorted), displays as a formatted
assistant message. Optional query filters by name, description, or category.
i18n keys added for en, de, zh, zh-Hant. 1 regression test added.

Fixes #248

* feat: shared app dialogs replace native confirm()/prompt() calls (#251)

Adds showConfirmDialog() and showPromptDialog() helpers to ui.js, backed
by a themed #appDialogOverlay. Replaces all 11 native browser confirm/prompt
call sites across panels.js, sessions.js, ui.js, workspace.js.

Supports: danger mode, keyboard focus trap (Tab/Escape/Enter), focus restore,
ARIA roles, mobile-responsive stacked buttons at 640px. i18n for en/de/zh/zh-Hant.
5 new tests in test_sprint33.py verify markup, CSS, helpers, and absence of
native dialog calls.

Extracted from PR #242.

* fix: Android Chrome mobile — workspace panel close + profile dropdown (#256)

Fix #247: toggleMobileFiles() now shows/hides the mobile overlay when
toggling the right workspace panel. New closeMobileFiles() helper closes
the panel with correct overlay state tracking. Overlay onclick calls both
closeMobileSidebar() and closeMobileFiles(). Mobile-only close button (x)
added to workspace panel header.

Fix #246: profile dropdown uses position:fixed;top:56px;right:8px at
max-width:900px, escaping the overflow-x:auto stacking context that was
clipping it on Android Chrome.

Fix applied during review: closeMobileSidebar() now checks if the right
panel is still open before hiding the overlay, preventing the overlay from
disappearing when only the sidebar is closed.

Fixes #247 Fixes #246

* feat: session ⋯ action dropdown replaces per-row buttons (#252)

Replaces the 5 per-row hover action buttons (pin/move/archive/duplicate/trash)
with a single ⋯ trigger that opens a positioned dropdown menu. Menu has full
keyboard (Escape), click-outside, scroll, and resize-reposition handling.
Position:fixed prevents sidebar clipping.

5 actions: Pin/Unpin, Move to project, Archive/Unarchive, Duplicate, Delete
(danger style). Each with icon and descriptive subtitle.

Updated test_sprint16.py: test_sessions_js_uses_action_menu_not_per_row_buttons
asserts the new trigger and menu functions exist, old per-row classes are gone.

Extracted from PR #242.

* docs: v0.47.0 release notes, bump version, update test counts (645)

---------

Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
@nesquena-hermes

Copy link
Copy Markdown
Collaborator Author

Merged to master via stage branch in PR #258 (v0.47.0).

@nesquena-hermes
nesquena-hermes deleted the feat/skills-slash-command branch April 12, 2026 03:14
JKJameson pushed a commit to JKJameson/hermes-webui that referenced this pull request Apr 25, 2026
* fix: custom provider with slash model name no longer rerouted to OpenRouter (nesquena#255)

When base_url is configured in config.yaml, resolve_model_provider() now
trusts the configured provider/base_url entirely and skips the slash-based
OpenRouter heuristic. Fixes google/gemma-4-26b-a4b with provider:custom
being silently routed to OpenRouter, resulting in 401 errors.

Fixes nesquena#230

* test: mobile layout regression suite — 14 tests for every QA run (nesquena#254)

Adds tests/test_mobile_layout.py with 14 static regression tests that run
on every QA pass to catch mobile layout breakage before it reaches prod.
Covers: breakpoints at 900px/640px, right panel slide-over CSS, mobile
overlay, bottom nav, files button, profile dropdown z-index, chip overflow,
workspace close, 100dvh, 44px touch targets, 16px font-size on textarea.

* feat: /skills slash command lists and filters available Hermes skills (nesquena#257)

Adds /skills [query] command to commands.js. Fetches from /api/skills,
groups by category (alphabetically sorted), displays as a formatted
assistant message. Optional query filters by name, description, or category.
i18n keys added for en, de, zh, zh-Hant. 1 regression test added.

Fixes nesquena#248

* feat: shared app dialogs replace native confirm()/prompt() calls (nesquena#251)

Adds showConfirmDialog() and showPromptDialog() helpers to ui.js, backed
by a themed #appDialogOverlay. Replaces all 11 native browser confirm/prompt
call sites across panels.js, sessions.js, ui.js, workspace.js.

Supports: danger mode, keyboard focus trap (Tab/Escape/Enter), focus restore,
ARIA roles, mobile-responsive stacked buttons at 640px. i18n for en/de/zh/zh-Hant.
5 new tests in test_sprint33.py verify markup, CSS, helpers, and absence of
native dialog calls.

Extracted from PR nesquena#242.

* fix: Android Chrome mobile — workspace panel close + profile dropdown (nesquena#256)

Fix nesquena#247: toggleMobileFiles() now shows/hides the mobile overlay when
toggling the right workspace panel. New closeMobileFiles() helper closes
the panel with correct overlay state tracking. Overlay onclick calls both
closeMobileSidebar() and closeMobileFiles(). Mobile-only close button (x)
added to workspace panel header.

Fix nesquena#246: profile dropdown uses position:fixed;top:56px;right:8px at
max-width:900px, escaping the overflow-x:auto stacking context that was
clipping it on Android Chrome.

Fix applied during review: closeMobileSidebar() now checks if the right
panel is still open before hiding the overlay, preventing the overlay from
disappearing when only the sidebar is closed.

Fixes nesquena#247 Fixes nesquena#246

* feat: session ⋯ action dropdown replaces per-row buttons (nesquena#252)

Replaces the 5 per-row hover action buttons (pin/move/archive/duplicate/trash)
with a single ⋯ trigger that opens a positioned dropdown menu. Menu has full
keyboard (Escape), click-outside, scroll, and resize-reposition handling.
Position:fixed prevents sidebar clipping.

5 actions: Pin/Unpin, Move to project, Archive/Unarchive, Duplicate, Delete
(danger style). Each with icon and descriptive subtitle.

Updated test_sprint16.py: test_sessions_js_uses_action_menu_not_per_row_buttons
asserts the new trigger and menu functions exist, old per-row classes are gone.

Extracted from PR nesquena#242.

* docs: v0.47.0 release notes, bump version, update test counts (645)

---------

Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
* fix: custom provider with slash model name no longer rerouted to OpenRouter (nesquena#255)

When base_url is configured in config.yaml, resolve_model_provider() now
trusts the configured provider/base_url entirely and skips the slash-based
OpenRouter heuristic. Fixes google/gemma-4-26b-a4b with provider:custom
being silently routed to OpenRouter, resulting in 401 errors.

Fixes nesquena#230

* test: mobile layout regression suite — 14 tests for every QA run (nesquena#254)

Adds tests/test_mobile_layout.py with 14 static regression tests that run
on every QA pass to catch mobile layout breakage before it reaches prod.
Covers: breakpoints at 900px/640px, right panel slide-over CSS, mobile
overlay, bottom nav, files button, profile dropdown z-index, chip overflow,
workspace close, 100dvh, 44px touch targets, 16px font-size on textarea.

* feat: /skills slash command lists and filters available Hermes skills (nesquena#257)

Adds /skills [query] command to commands.js. Fetches from /api/skills,
groups by category (alphabetically sorted), displays as a formatted
assistant message. Optional query filters by name, description, or category.
i18n keys added for en, de, zh, zh-Hant. 1 regression test added.

Fixes nesquena#248

* feat: shared app dialogs replace native confirm()/prompt() calls (nesquena#251)

Adds showConfirmDialog() and showPromptDialog() helpers to ui.js, backed
by a themed #appDialogOverlay. Replaces all 11 native browser confirm/prompt
call sites across panels.js, sessions.js, ui.js, workspace.js.

Supports: danger mode, keyboard focus trap (Tab/Escape/Enter), focus restore,
ARIA roles, mobile-responsive stacked buttons at 640px. i18n for en/de/zh/zh-Hant.
5 new tests in test_sprint33.py verify markup, CSS, helpers, and absence of
native dialog calls.

Extracted from PR nesquena#242.

* fix: Android Chrome mobile — workspace panel close + profile dropdown (nesquena#256)

Fix nesquena#247: toggleMobileFiles() now shows/hides the mobile overlay when
toggling the right workspace panel. New closeMobileFiles() helper closes
the panel with correct overlay state tracking. Overlay onclick calls both
closeMobileSidebar() and closeMobileFiles(). Mobile-only close button (x)
added to workspace panel header.

Fix nesquena#246: profile dropdown uses position:fixed;top:56px;right:8px at
max-width:900px, escaping the overflow-x:auto stacking context that was
clipping it on Android Chrome.

Fix applied during review: closeMobileSidebar() now checks if the right
panel is still open before hiding the overlay, preventing the overlay from
disappearing when only the sidebar is closed.

Fixes nesquena#247 Fixes nesquena#246

* feat: session ⋯ action dropdown replaces per-row buttons (nesquena#252)

Replaces the 5 per-row hover action buttons (pin/move/archive/duplicate/trash)
with a single ⋯ trigger that opens a positioned dropdown menu. Menu has full
keyboard (Escape), click-outside, scroll, and resize-reposition handling.
Position:fixed prevents sidebar clipping.

5 actions: Pin/Unpin, Move to project, Archive/Unarchive, Duplicate, Delete
(danger style). Each with icon and descriptive subtitle.

Updated test_sprint16.py: test_sessions_js_uses_action_menu_not_per_row_buttons
asserts the new trigger and menu functions exist, old per-row classes are gone.

Extracted from PR nesquena#242.

* docs: v0.47.0 release notes, bump version, update test counts (645)

---------

Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
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.

slash commands to list all skills

2 participants