mistral-reference-architecture
Implement Mistral AI reference architecture with best-practice project layout.\nUse when designing new Mistral AI integrations, reviewing project structure,\nor establishing architecture standards for Mistral AI applications.\nTrigger with phrases like \
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Implement Mistral AI reference architecture with best-practice project layout.\nUse when designing new Mistral AI integrations, reviewing project structure,\nor establishing architecture standards for Mistral AI applications.\nTrigger with phrases like \
How to use
Upewnij się, że Twój projekt to TypeScript/Node.js z obsługą ESM. Zainstaluj wymagane zależności:
@mistralai/mistralaiSDK,zoddo walidacji konfiguracji oraz framework testowy (np. Vitest).Stwórz strukturę katalogów zgodnie z architekturą warstwową: katalog
mistral/z plikamiclient.ts(singleton klienta),config.ts(konfiguracja walidowana Zodem),errors.ts(niestandardowe klasy błędów),types.ts(wspólne typy) iprompts.ts(szablony promptów).W katalogu
services/utwórz moduły biznesowe:chat.service.tsz cachowaniem i retry'ami,embed.service.tsdo embeddings i wyszukiwania,rag.service.tsdla pipeline'u RAG.Dodaj warstwę API w katalogu
api/z plikamichat.route.ts(endpointy HTTP) ihealth.route.ts(health check).Skonfiguruj zarządzanie konfiguracją w katalogu
config/z plikamibase.ts(wspólne ustawienia),development.ts(przesłonięcia dla dev) iproduction.ts(przesłonięcia dla prod).Wyzwól skill frazami takimi jak "mistral architecture", "mistral best practices", "mistral project structure" lub "how to organize mistral" – skill przeanalizuje Twój projekt i zaproponuje dostosowania do wzorcowej architektury.