debugging-hermes-tui-commands
Skill0 starsChanged 3 months agoMITView on GitHub
Debug Hermes TUI slash commands: Python, gateway, Ink UI.
We split this skill into the rules it gives an agent
12 rules. 4 are common, 0 are distinctive, and 8 are very specific to this project.
4
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 20
Use this skill when you encounter issues with slash commands in the Hermes TUI, particularly when commands aren't showing in autocomplete, …
- Common: line 72
If a command exists in the TUI but doesn't show in autocomplete:
- Very specific: line 74
Add a CommandDef entry to COMMAND_REGISTRY in hermes_cli/commands.py:
- Very specific: line 88
Ensure subcommands matches the expected tab-completion options shown by the TUI.
- Very specific: line 90
If the command runs server-side, add a handler in HermesCLI.process_command() in cli.py:
- Common: line 116
When surface-level inspection doesn't reveal the bug:
- Very specific: line 118
Python side hangs or misbehaves: use the python-debugpy skill to break inside _SlashWorker.exec or the command handler.
- Very specific: line 119
Ink side not reacting: use the node-inspect-debugger skill to break in app.tsx's slash dispatch or the local command branch.
- Very specific: line 124
Don't forget to set the appropriate category for the command in CommandDef (e.g., "Session", "Configuration", "Tools & Skills", "Info", …
- Very specific: line 125
Make sure any aliases are properly registered in the aliases tuple — no other file changes are needed, everything downstream (Telegram …
- Common: line 140
Run the TUI and test the command:
- Very specific: line 152
If the command is also gateway-available, test it from at least one messaging platform (or run the gateway tests: scripts/run_tests.sh …
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Debugging Hermes TUI Slash Commands
Overview
Hermes slash commands span three layers — Python command registry, tui_gateway JSON-RPC bridge, and the Ink/TypeScript frontend. When a command misbehaves (missing from autocomplete, works in CLI but not TUI, config persists but UI doesn't update), the bug is almost always one layer being out of sync with another.
Use this skill when you encounter issues with slash commands in the Hermes TUI, particularly when commands aren't showing in autocomplete, aren't working properly in the TUI, or need to be added/updated.
When to Use
- A slash command exists in one part of the codebase but doesn't work fully
- A command needs to be added to both backend and frontend
- Command autocomplete isn't working for specific commands
- Command behavior is inconsistent between CLI and TUI
- A command persists config but doesn't apply live in the TUI
Architecture Overview
Python backend (hermes_cli/commands.py) <- canonical COMMAND_REGISTRY
│
▼
TUI gateway (tui_gateway/server.py) <- slash.exec / command.dispatch
│
▼
TUI frontend (ui-tui/src/app/slash/) <- local handlers + fallthroughCommand definitions must be registered consistently across Python and TypeScript to work properly. The Python COMMAND_REGISTRY is the source of truth for: CLI dispatch, gateway help, Telegram BotCommand menu, Slack subcommand map, and autocomplete data shipped to Ink.
Investigation Steps
- Check if the command exists in the TUI frontend:
search_files --pattern "/commandname" --file_glob "*.ts" --path ui-tui/ search_files --pattern "/commandname" --file_glob "*.tsx" --path ui-tui/ - Examine the TUI command definition:
read_file ui-tui/src/app/slash/commands/core.ts # If not there: search_files --pattern "commandname" --path ui-tui/src/app/slash/commands --target files - Check if the command exists in the Python backend:
search_files --pattern "CommandDef" --file_glob "*.py" --path hermes_cli/ search_files --pattern "commandname" --path hermes_cli/commands.py --context 3 - Examine the gateway implementation:
search_files --pattern "complete.slash|slash.exec" --path tui_gateway/
Fix: Missing Command Autocomplete
If a command exists in the TUI but doesn't show in autocomplete:
- Add a
CommandDefentry toCOMMAND_REGISTRYinhermes_cli/commands.py:CommandDef("commandname", "Description of the command", "Session", cli_only=True, aliases=("alias",), args_hint="[arg1|arg2|arg3]", subcommands=("arg1", "arg2", "arg3")), - Pick
cli_onlyvs gateway availability carefully:cli_only=True— only in the interactive CLI/TUIgateway_only=True— only in messaging platforms- neither — available everywhere
gateway_config_gate="display.foo"— config-gated availability in the gateway
- Ensure
subcommandsmatches the expected tab-completion options shown by the TUI. - If the command runs server-side, add a handler in
HermesCLI.process_command()incli.py:elif canonical == "commandname": self._handle_commandname(cmd_original) - For gateway-available commands, add a handler in
gateway/run.py:if canonical == "commandname": return await self._handle_commandname(event)
Common Issues
- Command shows in TUI but not in autocomplete. The command is defined in the TUI codebase but missing from
COMMAND_REGISTRYinhermes_cli/commands.py. Autocomplete data ships from Python. - Command shows in autocomplete but doesn't work. Check the command handler in
tui_gateway/server.pyand the frontend handler inui-tui/src/app/createSlashHandler.ts. If the command is local-only in Ink, it must be handled inapp.tsxbuilt-in branch; otherwise it falls through toslash.execand must have a Python handler. - Command behavior differs between CLI and TUI. The command might have different implementations. Check both
cli.py::process_commandand the TUI's local handler. Local TUI handlers take precedence over gateway dispatch. - Command persists config but doesn't apply live. For TUI-local commands, updating
config.setis not enough. Also patch the relevant nanostore state immediately (usuallypatchUiState(...)) and pass any new state through rendering components. Example:/details collapsedmust update live detail visibility, not just savedetails_mode; in-session global/details <mode>may need a separate command-override flag so live commands can override built-in section defaults while startup/config sync preserves default-expanded thinking/tools behavior. - Gateway dispatch silently ignores the command. The gateway only dispatches commands it knows about. Check
GATEWAY_KNOWN_COMMANDS(derived fromCOMMAND_REGISTRYautomatically) includes the canonical name. If the command iscli_onlywith agateway_config_gate, verify the gated config value is truthy.
Debugging Tactics
When surface-level inspection doesn't reveal the bug:
- Python side hangs or misbehaves: use the
python-debugpyskill to break inside_SlashWorker.execor the command handler.remote-pdbset at the handler entry is the fastest path. - Ink side not reacting: use the
node-inspect-debuggerskill to break inapp.tsx's slash dispatch or the local command branch.sb('dist/app.js', <line>)afternpm run build. - Registry mismatch / unclear which side is wrong: compare the canonical
COMMAND_REGISTRYentry against the TUI's local command list side-by-side.
Pitfalls
- Don't forget to set the appropriate category for the command in
CommandDef(e.g., "Session", "Configuration", "Tools & Skills", "Info", "Exit") - Make sure any aliases are properly registered in the
aliasestuple — no other file changes are needed, everything downstream (Telegram menu, Slack mapping, autocomplete, help) derives from it - For commands with subcommands, ensure the
subcommandstuple inCommandDefmatches what's in the TUI code cli_only=Truecommands won't work in gateway/messaging platforms — unless you add agateway_config_gateand the gate is truthy- After adding live UI state, search every consumer of the old prop/helper and thread the new state through all render paths, not just the active streaming path. TUI detail rendering has at least two important paths: live
StreamingAssistant/ToolTrailand transcript/pendingMessageLinerows. A/cleanpass should explicitly check both. - Rebuild the TUI (
npm --prefix ui-tui run build) before testing — tsx watch mode may lag on first launch
Verification
After fixing:
- Rebuild the TUI:
cd /home/bb/hermes-agent && npm --prefix ui-tui run build - Run the TUI and test the command:
hermes --tui - Type
/and verify the command appears in autocomplete suggestions with the expected description and args hint. - Execute the command and confirm:
- Expected behavior fires
- Any persisted config updates correctly (
read_file ~/.hermes/config.yaml) - Live UI state reflects the change immediately (not just after restart)
- If the command is also gateway-available, test it from at least one messaging platform (or run the gateway tests:
scripts/run_tests.sh tests/gateway/).
Other versions5 projects use a version of this.
Word for word · 1
- wm2313/my-skills★ 0100% same
Edited · 4
- abduznik/abduznik-skills★ 2100% same
- Fahrnetic/engineering-agent-skill-workflow★ 285% same
- iberi22/skills★ 085% same
- ritengzhang77-max/gavin_skill★ 099% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository82 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apple-notesSkill
- apple-remindersSkill
- findmySkill
- imessageSkill
- macos-computer-useSkill
- claude-codeSkill
- codexSkill
- hermes-agentSkill
- kanban-codex-laneSkill
- opencodeSkill
- architecture-diagramSkill
- ascii-artSkill
- ascii-videoSkill
- baoyu-article-illustratorSkill
- baoyu-comicSkill
- baoyu-infographicSkill
- claude-designSkill
- comfyuiSkill
- ideationSkill
- design-mdSkill
- excalidrawSkill
- humanizerSkill
- manim-videoSkill
- p5jsSkill
- pixel-artSkill
- popular-web-designsSkill
- pretextSkill
- sketchSkill
- songwriting-and-ai-musicSkill
- touchdesigner-mcpSkill
- jupyter-live-kernelSkill
- kanban-orchestratorSkill
- kanban-workerSkill
- webhook-subscriptionsSkill
- dogfoodSkill
- himalayaSkill
- minecraft-modpack-serverSkill
- pokemon-playerSkill
- codebase-inspectionSkill
- github-authSkill
- github-code-reviewSkill
- github-issuesSkill
- github-pr-workflowSkill
- github-repo-managementSkill
- native-mcpSkill
- gif-searchSkill
- heartmulaSkill
- songseeSkill
- spotifySkill
- youtube-contentSkill
- huggingface-hubSkill
- obsidianSkill
- airtableSkill
- google-workspaceSkill
- linearSkill
- mapsSkill
- nano-pdfSkill
- notionSkill
- ocr-and-documentsSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

