What problem does it solve?
This Skill provides production-ready patterns and recipes to integrate large language models into applications, addressing streaming, structured outputs, retrieval-augmented generation, embeddings, and cost management so teams can avoid common pitfalls and ship reliable AI features faster.
Core Features & Use Cases
- Streaming & UX: Best practices to stream tokens to the client to keep UIs responsive and avoid blocking.
- RAG & Embeddings: Examples for indexing, embedding generation, semantic search, and composing context for RAG-based answers.
- Anthropic-first with fallbacks: Default guidance for Claude/Anthropic APIs with OpenAI fallback, model selection, and structured tool/function outputs.
- Cost control & observability: Token accounting, pricing calculations, caching, and middleware patterns for cost tracking and alerts.
- Use Case: Build a streaming chat app that searches a pgvector-backed document store, composes focused context, streams Claude responses, and records token costs per request.
Quick Start
Implement a streaming Claude-based chat endpoint that searches your vector store for context, composes a system prompt, streams tokens to the client, and logs token usage and cost.