mistral-reference-architecture

Featured

Implement Mistral AI reference architecture with best-practice project layout. Use when designing new Mistral AI integrations, reviewing project structure, or establishing architecture standards for Mistral AI applications. Trigger with phrases like "mistral architecture", "mistral best practices", "mistral project structure", "how to organize mistral".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Mistral AI Reference Architecture ## Overview Production-ready architecture patterns for Mistral AI integrations: layered project structure, singleton client, Zod-validated config, custom error classes, service layer with caching, health checks, prompt templates, and model routing. ## Prerequisites - TypeScript/Node.js project (ESM) - `@mistralai/mistralai` SDK - `zod` for config validation - Testing framework (Vitest) ## Layer Architecture ``` API Layer (Routes, Controllers, Middleware) | Service Layer (Business Logic, Orchestration) | Mistral Layer (Client, Config, Errors, Prompts) | Infrastructure Layer (Cache, Queue, Monitoring) ``` ## Instructions ### Step 1: Directory Structure ``` src/ ���─��� mistral/ │ ├── client.ts # Singleton client factory │ ├── config.ts # Zod-validated config │ ├── errors.ts # Custom error classes │ ├── types.ts # Shared types │ └── prompts.ts # Prompt templates ├── services/ │ ├── chat.service.ts # Chat with caching + retry │ ├── embed.service.ts # Embeddings + search │ └── rag.service.ts # RAG pipeline ├── api/ │ ├── chat.route.ts # HTTP endpoints │ └── health.route.ts # Health check └── config/ ├── base.ts # Shared config ├── development.ts # Dev overrides └── production.ts # Prod overrides ``` ### Step 2: Config with Zod Validation ```typescript // src/mistral/config.ts import { z } from 'zod'; const MistralConfigSchem...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category