Files
pipelines/app/notes/chat-harness-commands.md
T
alan d1390994cc Chat: offer the session's Claude Code skills and slash commands in the palette
The server reads the commands Claude Code's initialize response lists (bundled,
user, project, plugin and claude.ai-synced skills plus CLI commands, with
descriptions and argument hints), drops terminal-only ones, and serves them per
chat over a new chat_commands request without waiting for a CLI start. The
composer palette lists them after the recorded commands; choosing one inserts
"/<name> " and sending passes it to the harness as an ordinary prompt.
Codex, OpenCode and Pi chats reply with an empty list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 20:53:57 +00:00

2.1 KiB

Chat harness commands and skills in the slash palette

User request (2026-11-25): the chat should offer every skill / slash command the operator's Claude Code has (bundled ones like code-review, ~/.claude/skills, plugin and claude.ai-synced skills) with no import step.

Verified live (Claude Code 2.1.332, haiku, scratch dir, no persistence)

  • The initialize control response carries commands: [{name, description, argumentHint}] (80 entries here): skills of every source, with the source in the description ((user), (claude.ai sync), (dynamic workflow)), and the CLI's own commands. It arrives before any turn.
  • The system/init line (only after the first user message) has slash_commands, skills (names only), plugins and terminal_slash_commands (doctor, color, focus, reload-plugins).
  • A stream-json user message /probe-skill banana expanded a project skill; /code-review low ran the bundled skill (as a forked subagent, final answer on the main thread); /import-memory resolved to anthropic-skills:import-memory. So sending the slash text as an ordinary prompt is the supported path.

Server

chat_commands (ChatQuery → chat_commands: [{name, description, argument_hint}]). Claude parses the initialize commands (dropping __… internals and duplicates), removes terminal_slash_commands once the init line names them, and never waits for a CLI: without a live CLI it answers from the latest list a CLI in the same directory reported and starts the CLI in the background. Codex, OpenCode and Pi reply with an empty list (not implemented).

App

The composer asks for chat_commands on the first slash draft (retrying an empty reply after 3 s) and lists them after the recorded commands, filtered by prefix (a plugin:skill name also matches on skill). A harness name equal to a recorded command is shadowed. Choosing one inserts /<name> ; sending a draft whose slash word is a harness command goes out as an ordinary prompt. Unknown slash words still get the local "Send as message" offer.

Unverified: rendered browser capture of the palette; device behaviour.