ai-sdk
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: \
How to use
Sprawdź, czy pakiet
aijest zainstalowany w projekcie — szukaj folderunode_modules/ai/docs/. Jeśli go nie ma, zainstaluj pakiet za pomocą menadżera projektów (np.pnpm add ai). Na tym etapie nie instaluj innych pakietów.Zadaj pytanie o konkretną funkcję SDK (np. generateText, streamText, ToolLoopAgent, embed) lub o budowanie agenta, chatbota, systemu RAG albo funkcji generowania tekstu. Skill automatycznie wyszuka odpowiedź w dokumentacji.
Jeśli planujesz używać React hooks (useChat, useCompletion), upewnij się, że pytasz o ich aktualną implementację — API mogło się zmienić. Skill sprawdzi dokumentację przed udzieleniem odpowiedzi.
Gdy będziesz potrzebować konkretnego dostawcy AI (OpenAI, Anthropic, Google), wskaż go w pytaniu. Skill zasugeruje Vercel AI Gateway, chyba że określisz inny wybór.
Dla każdego kodu zawierającego ID modelu upewnij się, że skill pobierze aktualne ID z dokumentacji — nigdy nie polegaj na starych wartościach z pamięci.
Jeśli napotkasz błędy związane z useChat lub inną funkcją, skill sprawdzi sekcję Common Errors w dokumentacji, aby znaleźć rozwiązanie.