mistral-prod-checklist
Execute Mistral AI production deployment checklist and rollback procedures. Use when deploying Mistral AI integrations to production, preparing for launch, or implementing go-live procedures. Trigger with phrases like "mistral production", "deploy mistral", "mistral go-live", "mistral launch checklist".
What this skill does
# Mistral AI Production Checklist
## Overview
Complete checklist for deploying Mistral AI integrations to production. Covers credential management, code quality gates, health endpoints, circuit breaker resilience, gradual rollout, and rollback procedures.
## Prerequisites
- Staging environment tested and verified
- Production API keys from La Plateforme
- Deployment pipeline (CI/CD) configured
- Monitoring and alerting ready (see `mistral-observability`)
## Instructions
### Step 1: Pre-Deployment Verification
**Credentials**
- [ ] Production API key stored in secret manager (never in env files or code)
- [ ] Key tested with `curl -H "Authorization: Bearer $KEY" https://api.mistral.ai/v1/models`
- [ ] Key has appropriate model access scope
- [ ] Fallback key available for rotation
**Code Quality**
- [ ] `npm run typecheck` passes
- [ ] `npm test` passes (unit + integration)
- [ ] No hardcoded keys: `grep -r "MISTRAL_API_KEY\|sk-" src/ --include="*.ts"`
- [ ] Error handling covers 401, 429, 500+ status codes
- [ ] Rate limiting/backoff implemented
- [ ] Logging excludes message content and API keys
**Model Configuration**
- [ ] Using versioned model IDs or `-latest` aliases intentionally
- [ ] `maxTokens` set to prevent runaway costs
- [ ] `temperature` set appropriately (0 for deterministic, 0.7 for creative)
- [ ] Token budget alerts configured
### Step 2: Health Check Endpoint
```typescript
import { Mistral } from '@mistralai/mistralai';
interface HealthStatus {
status: 'healthy' | 'degraded' | 'unhealthy';
provider: 'mistral';
latencyMs: number;
model?: string;
error?: string;
}
export async function checkHealth(): Promise<HealthStatus> {
const start = performance.now();
try {
const client = new Mistral({ apiKey: process.env.MISTRAL_API_KEY! });
const models = await client.models.list();
const latencyMs = Math.round(performance.now() - start);
return {
status: latencyMs > 5000 ? 'degraded' : 'healthy',
provider: 'mistral',
latencyMs,
model: models.data?.[0]?.id,
};
} catch (error: any) {
return {
status: 'unhealthy',
provider: 'mistral',
latencyMs: Math.round(performance.now() - start),
error: error.message,
};
}
}
// Express route
app.get('/health', async (req, res) => {
const health = await checkHealth();
res.status(health.status === 'unhealthy' ? 503 : 200).json(health);
});
```
### Step 3: Circuit Breaker
```typescript
class MistralCircuitBreaker {
private failures = 0;
private lastFailure = 0;
private state: 'closed' | 'open' | 'half-open' = 'closed';
private readonly threshold = 5;
private readonly resetMs = 60_000;
async execute<T>(fn: () => Promise<T>, fallback?: () => T): Promise<T> {
if (this.state === 'open') {
if (Date.now() - this.lastFailure > this.resetMs) {
this.state = 'half-open';
} else if (fallback) {
return fallback();
} else {
throw new Error('Circuit breaker open — Mistral unavailable');
}
}
try {
const result = await fn();
if (this.state === 'half-open') {
this.state = 'closed';
this.failures = 0;
}
return result;
} catch (error: any) {
if (error.status >= 500 || error.status === 429) {
this.failures++;
this.lastFailure = Date.now();
if (this.failures >= this.threshold) {
this.state = 'open';
}
}
throw error;
}
}
}
```
### Step 4: Gradual Rollout
```bash
set -euo pipefail
# Deploy to canary (10% traffic)
kubectl set image deployment/mistral-app app=mistral-app:v2
kubectl rollout pause deployment/mistral-app
# Monitor for 10 minutes
echo "Monitoring canary..."
for i in $(seq 1 10); do
curl -sf https://yourapp.com/health | jq '.services.mistral'
sleep 60
done
# If healthy, resume rollout
kubectl rollout resume deployment/mistral-app
kubectl rollout status deployment/mistral-app
```
### Step 5: Post-Deployment Verification
```bash
set -euo pipefail
# 1. Health check
curl -sf https://yourapp.com/health | jq '.'
# 2. Smoke test
curl -X POST https://yourapp.com/api/chat \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"ping"}]}' | jq '.choices[0].message.content'
# 3. Check error rate in monitoring
echo "Check Grafana/Datadog for mistral_errors_total"
```
### Step 6: Emergency Rollback
```bash
set -euo pipefail
# Immediate rollback
kubectl rollout undo deployment/mistral-app
kubectl rollout status deployment/mistral-app
# Verify
curl -sf https://yourapp.com/health | jq '.'
```
## Alert Configuration
| Alert | Condition | Severity |
|-------|-----------|----------|
| API Down | 5xx errors > 10/min | P1 |
| High Latency | p95 > 5000ms for 5min | P2 |
| Rate Limited | 429 errors > 5/min | P2 |
| Auth Failure | Any 401 error | P1 |
| Circuit Open | Breaker triggered | P2 |
| Cost Spike | Spend > $10/hour | P3 |
## Documentation Requirements
- [ ] Incident runbook created (see `mistral-incident-runbook`)
- [ ] Key rotation procedure documented
- [ ] Rollback procedure tested
- [ ] On-call escalation path defined
- [ ] API usage limits documented
## Output
- Production deployment with verified credentials
- Health check endpoint with latency monitoring
- Circuit breaker for graceful degradation
- Gradual rollout procedure
- Emergency rollback tested
## Error Handling
| Issue | Detection | Resolution |
|-------|-----------|------------|
| Deploy failure | `kubectl rollout status` | `kubectl rollout undo` |
| Health check 503 | Alert triggered | Check Mistral status, verify credentials |
| Circuit open | Metrics alert | Investigate availability, wait for reset |
| High error rate | Monitoring alert | Check logs, consider rollback |
## Resources
- [Mistral AI Status](https://status.mistral.ai/)
- [Mistral AI Console](https://console.mistral.ai/)
- [Rate Limits](https://docs.mistral.ai/deployment/ai-studio/tier/)
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.