diegosouzapw/awesome-omni-skill/claude-agent-ui-ts
Claude Code and agent skill by diegosouzapw/awesome-omni-skill
- community
Checking that the SKILL.md file is still in the repository.
Add a React + WebSocket UI on top of Claude Agent SDK agents with tool approval and SQLite persistence
Install
npx vskill@latest install diegosouzapw/awesome-omni-skill/claude-agent-ui-tsSKILL.md
The same SKILL.md was published earlier as diegosouzapw/awesome-omni-skill/claude-agent-ui-ts.
Claude Agent UI (TypeScript)
Add a web UI to your Claude Agent SDK agents. Includes real-time WebSocket communication, interactive tool approval, and SQLite persistence for chat history.
Prerequisites
- Node.js 18+
- Claude Agent SDK configured (see claude-agent-sdk-ts skill for setup)
Quick Start
- Copy the snippets to your project:
client.tsxfrom this skillwebsocket-server-sqlite.tsandwebsocket-types.tsfrom claude-agent-sdk-ts skill
- Install dependencies:
``bash npm install express cors ws @anthropic-ai/claude-agent-sdk better-sqlite3 react react-dom npm install -D @types/better-sqlite3 @types/express @types/cors @types/ws ``
- Edit the server CONFIG section (workingDirectory, model, allowedTools, dbPath)
- Start server:
npx tsx server.ts
- Add
client.tsxto your React app and open in browser
Architecture
Flow:
- User types message in React UI
- Message sent via WebSocket to server
- Server persists message to SQLite and forwards to Claude Agent SDK
- When agent wants to use a tool, server sends approval request to client
- User approves or rejects in UI
- Server continues or blocks tool based on response
- Agent responses persisted to SQLite and streamed back to UI
Snippets
| Snippet | Source | Description | |
|---|---|---|---|
client.tsx | This skill | React chat UI with WebSocket and tool approval buttons | |
websocket-server-sqlite.ts | claude-agent-sdk-ts | Express + WebSocket + SQLite server with SDK integration | |
websocket-types.ts | claude-agent-sdk-ts | Shared TypeScript types for messages |
Configuration
Edit the CONFIG object in the server:
See claude-agent-sdk-ts skill for detailed configuration options.
Persistence
The server uses SQLite (via better-sqlite3) to persist:
- Chat messages: All user, assistant, and tool_use messages
- SDK session ID: Captured from
system/initmessage for session resumption
Database schema:
Session Resumption: When the server restarts, it:
- Loads existing messages from SQLite
- Retrieves the stored SDK session ID
- Passes
resume: sdkSessionIdto the SDK query options - Claude resumes with full conversation context
This follows the SDK best practice of capturing session_id from the system/init message and using resume for multi-turn conversations.
Styling
The client has no styling (functional HTML only). Options:
- Add your own CSS
- Use Tailwind CSS
- Use claude-agent-terminal-ts for a styled terminal theme
Production Notes
For production deployment, consider:
- Authentication: Add user auth (not included)
- Multi-chat: Extend from single session to
Map<chatId, Session>for multiple conversations - Containerization: Isolate SDK in separate container for security
- Backup: Add SQLite backup strategy (WAL mode already enabled for durability)
- Error handling: Add retry logic and graceful degradation
Related Skills
| Skill | Use When | |
|---|---|---|
| claude-agent-sdk-ts | SDK API details, tools, hooks, configuration, shared server code | |
| claude-agent-terminal-ts | Terminal-styled UI with dark theme and keyboard shortcuts |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/development/claude-agent-ui-ts/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/diegosouzapw/awesome-omni-skill/claude-agent-ui-ts)