From thrashr888-agent-kit
Design patterns for local-first AI desktop apps — provider abstraction (Ollama / OpenAI-compatible gateways), RAG retrieval and ingestion hygiene, citation UX that loops back to sources, streaming and scoped cancellation, chat-loop details, and demo-corpus design. Use when building or reviewing a local AI app, a RAG/notebook product, chat UX, or preparing AI product demos. Distilled from Alchemy (a local NotebookLM clone).
How this skill is triggered — by the user, by Claude, or both
Slash command
/thrashr888-agent-kit:building-local-ai-appsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Patterns from building a NotebookLM-style desktop app (Tauri + React + LanceDB + Ollama/gateway).
Patterns from building a NotebookLM-style desktop app (Tauri + React + LanceDB + Ollama/gateway). Organized product-outward: providers → retrieval → citations → streaming → chat loop → demos.
/chat/completions, /models, Bearer). Keep embeddings and OCR independently swappable
(local Ollama, a bundled CPU model like Model2Vec/potion, or the gateway) — users on weak
hardware want cloud chat with local embeddings so their documents never leave the machine.grep it for the API host, paths, auth header scheme, and
model-list shape. (IBM Bob: LiteLLM under the hood; static bob_ keys use Authorization: Apikey + X-API-KEY, JWTs use Bearer; chat needs x-instance-id/x-team-id from
/admin/v1/profile; usage endpoints are SSO-gated → link to the portal, don't fake accounting.)[n] hard-required
in the system prompt), persisted with the message.# heading), then a tiny LLM completion
("reply with only a 3–8 word title" + first ~1500 chars + filename). Best-effort only —
titling must never fail an import. Skip when the name already contains whitespace (human-written).A citation that dead-ends at a snippet builds no trust. The full loop: inline marker → click → source opens scrolled to the highlighted passage.
[n] markers → clickable chips. In react-markdown, a tiny dependency-free remark
plugin walking mdast text nodes: regex \[(\d{1,2})\], replace with #cite-n links (only for
n ≤ citations.length; skip inside links/code), render via the a component override as
superscript chip buttons with a hover preview (source title + snippet start).\s+ to find the start,
the last ~12 words (searched only within the chunk-length window) for the end. Highlight the
range, scrollIntoView({block:'center'}).1 - distance means nothing to users).artifact://token events into a live preview that follows its tail). A spinner for a
3-minute PRD reads as broken."chat", "artifact") in a
HashMap<String, CancellationToken> — one global token means starting a chat kills the running
document build. Race with tokio::select!; a user-initiated stop is an info toast, not an error.if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing) — without
isComposing, CJK users send mid-composition.window.confirm); wrap CRUD store
actions in a shared guard() so backend failures surface as toasts instead of silent no-ops.Fabricate an interlocking document set for a fictional company; design it so every feature has a money shot:
eng_capacity_h2_notes.txt) to demo auto-titling; give markdown files
clean # headings.DEMO-SCRIPT.md with setup steps, per-feature questions, and where the planted
conflicts are.shipping-tauri-apps — building, signing, and releasing the desktop shell.driving-tauri-apps — automating the running app for verification and screenshots.npx claudepluginhub thrashr888/thrashr888-agent-kitCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.