Contract: Chat Command β /skills
Feature: 097-skills-middleware-integration | Date: 2026-03-18
Overviewβ
When the user types the designated command (e.g. /skills) in the chat window, the client does not send it as a normal message to the assistant. It calls the shared catalog API and displays the list of skills in the conversation. This contract defines the client and API behavior.
Command triggerβ
- Trigger: User input that matches the agreed slash-command. Exact match recommended for v1 (e.g.
/skills); optional: trim whitespace, case-insensitive. - When: On submit (e.g. Enter or Send). If the input is exactly the command (after trim), treat as command; otherwise send as normal message.
Client behaviorβ
- Detect: Before sending, check if the trimmed input equals the command string (e.g.
/skills). - If command:
- Do not call the A2A/send-message endpoint.
- Call
GET /api/skills(or equivalent catalog API). - If 200: Render the list in the chat as a dedicated message (e.g. βHere are the skills available to the assistant:β followed by the list). Optionally show loading state while the request is in flight.
- If 503 or catalog error: Show a clear, non-technical message (e.g. βSkills are temporarily unavailable. Please try again later.β) in the chat.
- If catalog returns empty list: Show message like βNo skills available at the moment.β
- If not command: Send the message normally to the assistant.
API dependencyβ
- The chat command relies on the same catalog API as the skills gallery (
GET /api/skills). Contract for that API is incontracts/catalog-api.md. No separate βchat commandβ endpoint; the client uses the catalog response to render the list.
UX details (informative)β
- List can be rendered as markdown, cards, or compact list; spec does not mandate format.
- List must match the central catalog (same as used by the assistant and by the rest of the UI) β guaranteed by using the same API.
- No automatic display of skills when the user has not typed the command; the list appears only when the user invokes the command (FR-003, acceptance scenario 3).
- Direct users to /skills (FR-002): After removing "run in chat," the UI MUST direct users to use the
/skillscommand to see their loaded skills β e.g. chat input placeholder "Type /skills to see available skills," or tooltip/help text in the chat panel.