add-ai-chat-tool

Installation
SKILL.md

Adding an AI Chat Tool

ryOS chat tools follow the Vercel AI SDK tool-loop pattern. A tool is defined on the server (name + description + Zod inputSchema), and is either:

  • Server-executed — has an execute fn that runs in api/chat/tools/ (needs Redis, secrets, server fetch). Add the name to SERVER_EXECUTED_TOOL_NAMES.
  • Client-executed — has no execute. The model emits a tool call, the browser runs a handler in src/apps/chats/tools/, and the result is sent back via addToolOutput (needs Zustand stores, IndexedDB, media/DOM APIs).

File Map

Concern File
Server: input schemas (Zod) api/chat/tools/schemas.ts
Server: descriptions + tool object + profile filtering api/chat/tools/index.ts (TOOL_DESCRIPTIONS, createChatTools)
Server: shared types/constants api/chat/tools/types.ts
Server: execute logic api/chat/tools/executors.ts, app-state-executors.ts, maps-executor.ts
Server/client: execution split source of truth src/shared/tools/serverExecuted.ts
Client: per-tool handlers src/apps/chats/tools/<name>Handler.ts
Client: handler types/registry src/apps/chats/tools/types.ts, index.ts
Client: dispatch (switch on tool name) src/apps/chats/hooks/useAiChat.ts
Installs
4
Repository
ryokun6/ryos
GitHub Stars
1.2K
First Seen
Jun 27, 2026
add-ai-chat-tool — ryokun6/ryos