Skip to content
Skills Library
Programming · Building & coding

mistral-sdk-patterns

/mistral-sdk-patterns

Design a pinned Mistral client adapter with typed results, cancellation, retry classification, and usage accounting. Use when implementing or refactoring SDK access. Trigger with "wrap the Mistral SDK", "review Mistral client code", or "standardize Mistral calls".

Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Design a pinned Mistral client adapter with typed results, cancellation, retry classification, and usage accounting. Use when implementing or refactoring SDK access. Trigger with "wrap the Mistral SDK", "review Mistral client code", or "standardize Mistral calls".

Triggers from the description

wrap the Mistral SDKreview Mistral client codestandardize Mistral calls

Arguments

/mistral-sdk-patterns <runtime> <client-version> <application-boundary>
Original author description

Design a pinned Mistral client adapter with typed results, cancellation, retry classification, and usage accounting. Use when implementing or refactoring SDK access. Trigger with "wrap the Mistral SDK", "review Mistral client code", or "standardize Mistral calls".

How it works

  1. Overview
  2. Prerequisites
  3. Current Contract
  4. Authentication
  5. Instructions
  6. Tool Discipline
  7. Approval Boundaries
  8. Error Handling
  9. Output
  10. Examples
Original SKILL.md headings · 61 lines, 365 words
SKILL.md preview
---
name: mistral-sdk-patterns
description: >-
  Design a pinned Mistral client adapter with typed results, cancellation, retry classification, and usage accounting. Use when implementing or refactoring SDK access. Trigger with "wrap the Mistral SDK", "review Mistral client code", or "standardize Mistral calls".
allowed-tools: Read,Glob,Grep,Write,Edit
argument-hint: "<runtime> <client-version> <application-boundary>"
version: 1.14.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags: [saas, mistral, sdk]
model: inherit
effort: high
compatibility: "Designed for Claude Code; live or external Mistral actions require network access and explicit approval"
---
# Mistral SDK Boundary Patterns

## Overview

Prevent provider-specific shapes and volatile client behavior from spreading. Centralize configuration, normalize results and errors, and expose cancellation and usage as first-class fields.

## Prerequisites

- A locked official client version and matching documentation.
- An application interface for chat, embeddings, and optional streams.
- Defined timeout, retry, observability, and redaction policies.

## Current Contract

Mistral documents official Python and TypeScript clients, but signatures can move independently of application code. REST endpoints remain the verification boundary for the pinned client.

## Authentication

Inject `MISTRAL_API_KEY` into one server-side client factory. Return no key or authorization metadata from the adapter.

## Instructions

1. Inventory imports, transport overrides, model strings, and response shapes.
2. Define normalized types including request ID, usage, finish state, and error class.
3. Create one factory with explicit host, timeout, user agent, and dependency pin.
4. Retry only classified transient failures while honoring deadline, cancellation, and budget.
5. Keep stream assembly and tool-call validation in separate tested components.
6. Add characterization tests before migrating call sites.

## Tool Discipline

Use Read, Glob, and Grep to inspect code, locks, configuration, tests, and evidence. Use Write and Edit only for approved repository changes. Invocation alone does not authorize network calls, paid usage, uploads, stateful resources, admin mutations, deployments, or deletion.

## Approval Boundaries

Require approval for dependency, transport, retry, fallback-model, or live characterization changes. Never execute returned tool arguments automatically.

## Error Handling

- Retrying every exception can multiply spend and hide invalid requests.
- Import-time client construction makes rotation and tests unsafe.
- Returning raw SDK objects couples the app to undocumented fields.

## Output

Return client pin, adapter surface, timeout/retry matrix, normalized fields, affected call sites, tests, and rollback.

## Examples

- Wrap chat and embeddings behind explicit adapter methods.
- Map `429` as retryable only within the operation deadline and budget.

## Validation

Prove only the adapter imports the SDK, errors remain typed, cancellation propagates, usage survives, and secrets do not.

## Resources

- [Current first-party evidence map](references/official-docs.md) — recheck dated sources before relying on mutable endpoints, models, limits, prices, preview status, or retention.
- Record live account observations as environment-specific evidence, not universal Mistral guarantees.
Files in this package (2)
  • SKILL.md 3 KB
  • references/official-docs.md 1 KB

Versions

The database has no other skills named mistral-sdk-patterns.

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version e2ec2b7cd832 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100mistral-reference-architecture
    Design a Mistral integration from policy gateway through adapter, queues, state reconciliation, and audited output. Use when establishing architecture. Trigger with "design a Mistral architecture", "review a Mistral platform", or "standardize Mistral services".
  • 100mistral-upgrade-migration
    Migrate a pinned Mistral client or deprecated API surface through characterization, contract diffing, and staged rollback. Use when upgrading SDKs or moving API generations. Trigger with "upgrade Mistral SDK", "migrate Mistral Agents", or "fix Mistral deprecations".
  • 100mistral-webhooks
    Receive and verify Mistral AI Studio voice agent webhooks. Use when setting up Mistral webhook handlers, debugging x-mistral-signature verification, or handling call lifecycle events like call_started, call_ended, and call_failed.
  • 100apollo-sdk-patterns
    Apply production-ready Apollo.io SDK patterns. Use when implementing Apollo integrations, refactoring API usage, or establishing team coding standards. Trigger with phrases like "apollo sdk patterns", "apollo best practices", "apollo code patterns", "idiomatic apollo", "apollo client wrapper".
  • 100mistral-router
    Choose an available Mistral tool and model for document extraction, chat, code, vision, audio, or deployed workflows. Use when the user asks which Mistral capability fits a task or needs help routing it.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.