Claude-skill-registry Chatbot Implementation
Details of the RAG Chatbot, including UI and backend logic.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/chatbot" ~/.claude/skills/majiayu000-claude-skill-registry-chatbot-implementation && rm -rf "$T"
manifest:
skills/data/chatbot/SKILL.mdsource content
Chatbot Logic
Overview
A specialized RAG (Retrieval Augmented Generation) chatbot that helps users learn from the textbook content.
Backend
- Route:
app/api/chat/route.ts - Logic:
- Receives
andquery
.history - Embeds query using Gemini or OpenAI embedding model.
- Searches Qdrant (vector DB) for relevant textbook chunks.
- Constructs context from matches.
- Generates response using Gemini Flash/Pro.
- Receives
Vector Search (Qdrant)
We use Qdrant for storing embeddings of the textbook.
- Collection:
(or similar).textbook_chunks - Fields:
,text
,source
.chunk_id
UI Component
- Location:
.textbook/src/components/Chatbot/index.tsx - Features:
- Floating chat window.
- Size controls (Small, Medium, Large).
- Markdown rendering of responses.
- Context selection (highlight text to ask about it).
- Mobile responsive design.
- Auth awareness (personalizes answer based on user profile).
Styling
- CSS:
(Premium animations, shadow effects).styles.module.css - Themes: Dark/Light mode compatible (using
variables).--ifm